-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Openssh-format private keys exported from putty fail to parse #316
Comments
Reopening because:
|
This is due to the padding length being over 8 bytes ("block size" for no-encryption cipher??) for unencrypted keys that PuTTY generates for some reason |
The padding seems to correctly contain a number seq as per format ( |
After bruteforcing through possible padding lengths with puttygen by changing the comment length, it appears that puttygen is using 16 as "block size" for unencrypted keys. |
Hi,
putty (putty-gen) apparently encodes keys (somehow) differently to openssh when exporting to the openssh format. These keys fail to parse with the ssh-key crate with
Encoding(Pem(Base64(InvalidEncoding)))
, but parse fine with openssh:RSA:
Ed25519:
One notable difference is that these keys have a linewidth of 64 whereas openssh uses 70.
Re-formatting the keys to be linewidth 70 in a text editor leads to an "Encoding(Length)" error.
The text was updated successfully, but these errors were encountered: