Skip to content
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

fix ed25519 ssh key unpad() when padding not present (not needed) #1400

Closed
wants to merge 1 commit into from

Conversation

@ploxiln
Copy link
Contributor

commented Mar 2, 2019

fixes #1306

@ploxiln

This comment has been minimized.

Copy link
Contributor Author

commented Mar 2, 2019

8-byte blocksize assumption based on https://coolaj86.com/articles/the-openssh-private-key-format/ and experiments in #1306 but test key seems to have 8 bytes padding (not sure if hand-crafted or realistic) and if this code is moved and used for new-openssh-format rsa keys too it might need to support more padding.

@ploxiln ploxiln force-pushed the ploxiln:ed25519_unpad_fix branch from 5006243 to 4b064c5 May 23, 2019

@ploxiln

This comment has been minimized.

Copy link
Contributor Author

commented May 23, 2019

(squashed in and force-pushed a tiny fix to the comment ascii range)

@bitprophet

This comment has been minimized.

Copy link
Member

commented Jun 21, 2019

Cherry-picked back to Paramiko 2.2+ (as that's apparently when we added Ed25519 support). Also added tests, by which I mean I just recreated the old Ed25519 test keys with ones whose comments exposed the original bug. (FWIW, in future please try to add tests for this kind of crucial fix - no tests == no way to prove it was really fixed 😇 )

@bitprophet bitprophet closed this Jun 21, 2019

@ploxiln ploxiln deleted the ploxiln:ed25519_unpad_fix branch Jul 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.