Re: [PATCH v2 18/20] crypto: arm/Curve25519 - wire up NEON implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 02, 2019 at 04:17:11PM +0200, Ard Biesheuvel wrote:
> +bool curve25519_arch(u8 out[CURVE25519_KEY_SIZE],
> +		     const u8 scalar[CURVE25519_KEY_SIZE],
> +		     const u8 point[CURVE25519_KEY_SIZE])
> +{
> +	if (!have_neon || !crypto_simd_usable())
> +		return false;
> +	kernel_neon_begin();
> +	curve25519_neon(out, scalar, point);
> +	kernel_neon_end();
> +	return true;
> +}
> +EXPORT_SYMBOL(curve25519_arch);

This now looks more like the Zinc way of doing things, with the _arch
function returning true or false based on whether or not the
implementation was available, allowing the generic implementation to
run.

I thought, from looking at the chacha commits earlier, you had done away
with that style of things in favor of weak symbols, whereby the arch
implementation would fall back to the generic one, instead of the other
way around?



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux