Skip to content

Conversation

@kengggg
Copy link
Member

@kengggg kengggg commented Apr 22, 2025

This pull request updates the ed25519-dalek dependency to version 2 and refactors the key generation logic to align with the new API. The changes primarily involve replacing the deprecated Keypair struct with the new SigningKey and VerifyingKey types, ensuring compatibility with the updated library.

Dependency Update:

  • Updated ed25519-dalek dependency from version 1.0.1 to 2 in Cargo.toml. This change ensures the project uses the latest version of the library, which introduces a new API for key generation.

Key Generation Refactor:

  • Refactored the generate_key_pair function in src/keygen.rs to replace the deprecated Keypair::generate method with explicit creation of SecretKey, SigningKey, and VerifyingKey. This aligns with the new ed25519-dalek API and ensures compatibility with version 2.
  • Updated the generate_openssh_key_pair function in src/keygen.rs to use the new SigningKey and VerifyingKey types for generating OpenSSH-compatible key pairs. Adjusted the handling of raw key bytes and the encoding functions accordingly.

@kengggg kengggg requested a review from Copilot April 22, 2025 17:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the ed25519-dalek dependency to v2 and refactors the key generation logic to use the new API.

  • Updated the dependency version in Cargo.toml.
  • Refactored generate_key_pair and generate_openssh_key_pair in src/keygen.rs to use SecretKey, SigningKey, and VerifyingKey.
  • Adjusted key byte handling for compatibility with hexadecimal and OpenSSH encoding.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/keygen.rs Replaced Keypair generation with explicit creation of secret, signing, and verifying keys.
Cargo.toml Updated the ed25519-dalek dependency from version 1.0.1 to 2.

@kengggg kengggg merged commit 060fb06 into main Apr 22, 2025
6 checks passed
@kengggg kengggg deleted the bumping-ed25519-dalek branch April 22, 2025 17:43
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