Skip to content

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

Merged
lbajolet-hashicorp merged 1 commit intohashicorp:mainfrom
nikolaymatrosov:ssh-usable-ed25519
Aug 12, 2022
Merged

Make ed25519 keys generated by Packer serialize in the format usable by ssh#120
lbajolet-hashicorp merged 1 commit intohashicorp:mainfrom
nikolaymatrosov:ssh-usable-ed25519

Conversation

@nikolaymatrosov
Copy link
Copy Markdown
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
Copy Markdown

hashicorp-cla commented Aug 7, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Copy Markdown
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.

3 participants