Commit 7205f69
Alex C
keygen: fix over-stripping of ED25519 public key bytes
parseDERs() removed *all* leading 0x00 bytes from the ED25519
SubjectPublicKeyInfo BIT STRING content instead of exactly the one
mandatory 'unused bits' marker byte. Whenever the raw 32-byte public
key itself happened to start with 0x00 (~1/256 keys), the loop
over-stripped real key material, producing a truncated key that
parseKey() then correctly rejected as 'Malformed OpenSSH public key'.
Fixes #1514.1 parent a3a39d7 commit 7205f69
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
| |||
0 commit comments