X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sshecdsag.c;h=4bd9e8f74a394bc1e0fd02094d6d9bdae4d3b854;hb=541abf92583cd93f3952aa0e3b8f61ba9251f3fa;hp=049967d6acb5972576b6c46ee4c63902a943ad49;hpb=2bf868835591b39f17a157b1511b1e2f4b6e77da;p=PuTTY.git diff --git a/sshecdsag.c b/sshecdsag.c index 049967d6..4bd9e8f7 100644 --- a/sshecdsag.c +++ b/sshecdsag.c @@ -22,10 +22,10 @@ int ec_generate(struct ec_key *key, int bits, progfn_t pfn, return 0; } - key->privateKey = bignum_random_in_range(One, key->publicKey.curve->n); + key->privateKey = bignum_random_in_range(One, key->publicKey.curve->w.n); if (!key->privateKey) return 0; - publicKey = ecp_mul(&key->publicKey.curve->G, key->privateKey); + publicKey = ec_public(key->privateKey, key->publicKey.curve); if (!publicKey) { freebn(key->privateKey); key->privateKey = NULL;