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

@ploxiln ploxiln commented Mar 2, 2019

fixes #1306

@ploxiln
Copy link
Contributor Author

@ploxiln ploxiln 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 ed25519_unpad_fix branch from 5006243 to 4b064c5 May 23, 2019
@ploxiln
Copy link
Contributor Author

@ploxiln ploxiln commented May 23, 2019

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

@bitprophet
Copy link
Member

@bitprophet bitprophet 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 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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants