]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - sshecc.c
Fix an assertion failure when loading Ed25519 keys.
[PuTTY.git] / sshecc.c
index bc842d0b467fa5f667d3a2856f5a6096f25e9ff4..541dd63cdb885b9b645be8aa41c9d4ac6dcfbcc8 100644 (file)
--- a/sshecc.c
+++ b/sshecc.c
@@ -1648,6 +1648,7 @@ static int decodepoint_ed(const char *p, int length, struct ec_point *point)
     /* Read x bit and then reset it */
     negative = bignum_bit(point->y, point->curve->fieldBits - 1);
     bignum_set_bit(point->y, point->curve->fieldBits - 1, 0);
+    bn_restore_invariant(point->y);
 
     /* Get the x from the y */
     point->x = ecp_edx(point->curve, point->y);