diff --git a/sshcrypto_kex_curve25519.c b/sshcrypto_kex_curve25519.c index e6ad299..fd333ca 100644 --- a/sshcrypto_kex_curve25519.c +++ b/sshcrypto_kex_curve25519.c @@ -22,7 +22,7 @@ int curve25519_enc(unsigned char *c, unsigned char *k, const unsigned char *pk) purge(onetimesk, sizeof onetimesk); for (i = 0; i < crypto_dh_x25519_BYTES; ++i) d |= k[i]; - return crypto_int16_nonzero_mask(d); + return crypto_int16_zero_mask(d); } void curve25519_putkemkey(struct buf *b, const unsigned char *x) {