Skip to content

Commit 7b8e47a

Browse files
committed
Fix too small ecdsa private key buffer
When RSA or DSS are not built, the private key buffer size is too small, resulting in a "bad_getbuf" or similar exit. This was a regression in 2025.87. Fixes: 440b7b5 ("Add sntrup761x25519-sha512 post-quantum key exchange") ECDSA private key requires around 241 bytes 4 + len("ecdsa-sha2-nistp521") + 4 + (521/8+1 + 4)*3 + 4 Fixes #368 on github.
1 parent 4a96109 commit 7b8e47a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sysoptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
#else
267267
/* 521 bit ecdsa key */
268268
#define MAX_PUBKEY_SIZE 200
269-
#define MAX_PRIVKEY_SIZE 200
269+
#define MAX_PRIVKEY_SIZE 250
270270
#endif
271271

272272
/* For kex hash buffer, worst case size for Q_C || Q_S || K */

0 commit comments

Comments
 (0)