diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-01-15 11:34:31 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-01-18 11:26:09 +0100 |
commit | 96157fdaa9e13dbe06af12e671f2bd3448a6534f (patch) | |
tree | 335afb1743fa8b69671e12c5eae63b899e23a8b5 /src/crypto/curve25519-arm.h | |
parent | poly1305: remove indirect calls (diff) | |
download | wireguard-monolithic-historical-96157fdaa9e13dbe06af12e671f2bd3448a6534f.tar.xz wireguard-monolithic-historical-96157fdaa9e13dbe06af12e671f2bd3448a6534f.zip |
curve25519: modularize implementation
Diffstat (limited to 'src/crypto/curve25519-arm.h')
-rw-r--r-- | src/crypto/curve25519-arm.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/crypto/curve25519-arm.h b/src/crypto/curve25519-arm.h new file mode 100644 index 0000000..4142e4e --- /dev/null +++ b/src/crypto/curve25519-arm.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0 + * + * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. + */ + +#include <asm/hwcap.h> +#include <asm/neon.h> +#include <asm/simd.h> +asmlinkage void curve25519_neon(u8 mypublic[CURVE25519_POINT_SIZE], const u8 secret[CURVE25519_POINT_SIZE], const u8 basepoint[CURVE25519_POINT_SIZE]); +static bool curve25519_use_neon __read_mostly; +void __init curve25519_fpu_init(void) +{ + curve25519_use_neon = elf_hwcap & HWCAP_NEON; +} |