X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshecc.c;h=46e6fadbec500c077e886ff01c64f074f8b56139;hb=15386cbe927fc85ac2fed0bb47704645c4b67dad;hp=3912c5f1bd3e82ee58a032e13ead034124a1af66;hpb=12702cb17ebe3c6a79284a3d24e95df745aac5e3;p=PuTTY.git diff --git a/sshecc.c b/sshecc.c index 3912c5f1..46e6fadb 100644 --- a/sshecc.c +++ b/sshecc.c @@ -2761,10 +2761,7 @@ void *ssh_ecdhkex_newkey(const struct ssh_kex *kex) bytes[31] &= 127; bytes[31] |= 64; key->privateKey = bignum_from_bytes(bytes, sizeof(bytes)); - for (i = 0; i < sizeof(bytes); ++i) - { - ((volatile char*)bytes)[i] = 0; - } + smemclr(bytes, sizeof(bytes)); if (!key->privateKey) { sfree(key); return NULL; @@ -2940,6 +2937,9 @@ const unsigned char *ec_alg_oid(const struct ssh_signkey *alg, return extra->oid; } +const int ec_nist_curve_lengths[] = { 256, 384, 521 }; +const int n_ec_nist_curve_lengths = lenof(ec_nist_curve_lengths); + const int ec_nist_alg_and_curve_by_bits(int bits, const struct ec_curve **curve, const struct ssh_signkey **alg)