Skip to content

Conversation

@tarcieri
Copy link
Member

@tarcieri tarcieri commented Apr 19, 2025

Followup to #351

Also includes a fix and test to ensure that short keys zero-pad MSB rather than LSB, since they're encoded as big endian.

@tarcieri tarcieri force-pushed the ssh-key/simplify-ecdsa-private-key-decoding branch 2 times, most recently from 3139b99 to d465f08 Compare April 19, 2025 16:08
@tarcieri
Copy link
Member Author

cc @zaczkows

@tarcieri tarcieri force-pushed the ssh-key/simplify-ecdsa-private-key-decoding branch from d465f08 to ee5af6f Compare April 19, 2025 16:50
Followup to #351

Also includes a fix and test to ensure that short keys zero-pad MSB
rather than LSB, since they're encoded as big endian.
@tarcieri tarcieri force-pushed the ssh-key/simplify-ecdsa-private-key-decoding branch from ee5af6f to dd30015 Compare April 19, 2025 16:51
Comment on lines +744 to +750
let keypair_data = key.key_data().ecdsa().unwrap();
assert_eq!(
keypair_data.private_key_bytes(),
hex!(
"000f65a3a88314a64da9c750b55639b5e532dae02163c8049b8b5a7085a9e24f8f2cfbb3ee5edf2def95f49819e83df6ce8695b24a207093972b0e5f745d03ed50d4"
)
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaczkows it would be good if you could confirm this is the expected private key

@tarcieri tarcieri merged commit f0b55c8 into master Apr 19, 2025
14 checks passed
@tarcieri tarcieri deleted the ssh-key/simplify-ecdsa-private-key-decoding branch April 19, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants