diff options
Diffstat (limited to 'src/crypto/zinc/curve25519/curve25519.c')
-rw-r--r-- | src/crypto/zinc/curve25519/curve25519.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/crypto/zinc/curve25519/curve25519.c b/src/crypto/zinc/curve25519/curve25519.c index 6b3f12a..82c669e 100644 --- a/src/crypto/zinc/curve25519/curve25519.c +++ b/src/crypto/zinc/curve25519/curve25519.c @@ -20,13 +20,6 @@ #include <linux/init.h> #include <crypto/algapi.h> // For crypto_memneq. -static __always_inline void clamp_secret(u8 secret[CURVE25519_KEY_SIZE]) -{ - secret[0] &= 248; - secret[31] &= 127; - secret[31] |= 64; -} - #if defined(CONFIG_ZINC_ARCH_X86_64) #include "curve25519-x86_64-glue.c" #elif defined(CONFIG_ZINC_ARCH_ARM) @@ -84,7 +77,7 @@ EXPORT_SYMBOL(curve25519_generate_public); void curve25519_generate_secret(u8 secret[CURVE25519_KEY_SIZE]) { get_random_bytes_wait(secret, CURVE25519_KEY_SIZE); - clamp_secret(secret); + curve25519_clamp_secret(secret); } EXPORT_SYMBOL(curve25519_generate_secret); |