lkml.org 
[lkml]   [2021]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v11 02/10] crypto: Add support for ECDSA signature verification
From
Date
On 3/5/21 3:59 PM, Stefan Berger wrote:
> diff --git a/crypto/Kconfig b/crypto/Kconfig
> index a367fcfeb5d4..a31df40591f5 100644
> --- a/crypto/Kconfig
> +++ b/crypto/Kconfig
> @@ -247,6 +247,16 @@ config CRYPTO_ECDH
> help
> Generic implementation of the ECDH algorithm
>
> @@ -70,6 +72,30 @@ struct ecc_curve {
> u64 *b;
> };
>
> +/**
> + * ecc_swap_digits() - Copy ndigits from big endian array to native array
> + * @in: Input array
> + * @out: Output array
> + * @ndigits: Number of digits to copy
> + */
> +static inline void ecc_swap_digits(const u64 *in, u64 *out, unsigned int ndigits)
> +{
> + const __be64 *src = (__force __be64 *)in;
> + int i;
> +
> + for (i = 0; i < ndigits; i++)
> + out[i] = be64_to_cpu(src[ndigits - 1 - i]);
> +}
> +
> +/**
> + * ecc_get_curve() - Get a curve given its curve_id
> + *

There's still an additional empty line here (as is the case with other
existing functions in this file). I will fix this one in v12.


\
 
 \ /
  Last update: 2021-03-08 18:05    [W:0.148 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site