version 1.8, 2015/01/19 20:16:15 |
version 1.9, 2015/03/26 07:00:04 |
|
|
u_char shared_key[CURVE25519_SIZE]; |
u_char shared_key[CURVE25519_SIZE]; |
int r; |
int r; |
|
|
|
/* Check for all-zero public key */ |
|
explicit_bzero(shared_key, CURVE25519_SIZE); |
|
if (timingsafe_bcmp(pub, shared_key, CURVE25519_SIZE) == 0) |
|
return SSH_ERR_KEY_INVALID_EC_VALUE; |
|
|
crypto_scalarmult_curve25519(shared_key, key, pub); |
crypto_scalarmult_curve25519(shared_key, key, pub); |
#ifdef DEBUG_KEXECDH |
#ifdef DEBUG_KEXECDH |
dump_digest("shared secret", shared_key, CURVE25519_SIZE); |
dump_digest("shared secret", shared_key, CURVE25519_SIZE); |