diff options
Diffstat (limited to 'src/libcryptobox/curve25519/curve25519-donna.c')
-rw-r--r-- | src/libcryptobox/curve25519/curve25519-donna.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libcryptobox/curve25519/curve25519-donna.c b/src/libcryptobox/curve25519/curve25519-donna.c index f9f19a632..e6a50b87f 100644 --- a/src/libcryptobox/curve25519/curve25519-donna.c +++ b/src/libcryptobox/curve25519/curve25519-donna.c @@ -894,17 +894,10 @@ static void crecip (limb *out, const limb *z) int curve25519 (u8 *mypublic, const u8 *secret, const u8 *basepoint) { limb bp[10], x[10], z[11], zmone[10]; - uint8_t e[32]; int i; - for (i = 0; i < 32; ++i) - e[i] = secret[i]; - e[0] &= 248; - e[31] &= 127; - e[31] |= 64; - fexpand (bp, basepoint); - cmult (x, z, e, bp); + cmult (x, z, secret, bp); crecip (zmone, z); fmul (z, x, zmone); fcontract (mypublic, z); |