Skip to content

Store seed || pubkey for generated Ed25519 keys - #45

Merged
timweri merged 3 commits into
mainfrom
fix-invalid-ed25519-keys
Sep 24, 2026
Merged

timweri merged 3 commits into
mainfrom
fix-invalid-ed25519-keys

Conversation

@timweri

@timweri timweri commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Flagged by Opus 5.5: PrivateKey::new stored only the 32-byte seed, which OpenSSH rejects as an invalid format. Store the 32-byte seed || public key form that OpenSSH expects and that the parser already produces.

PrivateKey::new stored only the 32-byte seed, which OpenSSH rejects as an invalid format. Store the 64-byte seed || public key form that OpenSSH expects and that the parser already produces.
@timweri timweri changed the title fix(ssh): store seed||pubkey for generated Ed25519 keys Store seed || pubkey for generated Ed25519 keys Sep 23, 2026
@timweri
timweri marked this pull request as ready for review September 23, 2026 22:02
@timweri
timweri requested a balanced review from Copilot September 23, 2026 22:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The implementation and tests address the key-format issue with no unresolved concerns.

Review effort: Balanced
Findings: None

What changed in this PR

Updates generated Ed25519 private keys to use OpenSSH’s required 64-byte seed || public key representation.

Changes:

  • Stores the public key alongside the generated seed.
  • Adds round-trip serialization and signature verification tests.
File Description
tests/​privkey.rs Tests key layout, round-tripping, and signing.
src/​ssh/​privkey.rs Generates OpenSSH-compatible Ed25519 private key material.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@timweri
timweri requested a review from obelisk September 24, 2026 16:32
@timweri timweri added the conformance For issues or PRs that deal with conformance to the SSH standard label Sep 24, 2026
@timweri
timweri merged commit 7291a87 into main Sep 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conformance For issues or PRs that deal with conformance to the SSH standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants