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

Make ed25519 keys generated by Packer serialize in the format usable by ssh #120

Merged

Conversation

nikolaymatrosov
Copy link
Contributor

As said in the method comment, the method produced the key in a format incompatible with ssh. As a result, the key Packer SDK created resulted in the error Load key "id_ed25519": invalid format.
I found the format description and fixed the generation algorithm to fix this problem:

  • I added proper padding generation
  • and put the public key in the right place as described in the format.

As ed25519 keys are getting more popular, I think it would be helpful to have them serialize correctly.

@nikolaymatrosov nikolaymatrosov requested a review from a team as a code owner August 7, 2022 13:50
@hashicorp-cla
Copy link

hashicorp-cla commented Aug 7, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

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

Hey @nikolaymatrosov,

Great job on the research (and providing the links to the docs/specs, that's very helpful in understanding the change) and the implementation. The code looks good to me, I think we can merge this right away.

Thank you very much for this contribution!

@lbajolet-hashicorp lbajolet-hashicorp merged commit 62ac7b7 into hashicorp:main Aug 12, 2022
@nikolaymatrosov nikolaymatrosov deleted the ssh-usable-ed25519 branch August 12, 2022 19:32
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.

None yet

3 participants