Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
fix ed25519 ssh key unpad() when padding not present (not needed) #1400
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.
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