Skip to content

Conversation

luojiyin1987
Copy link

Security improvements:

  • Replace unwrap() with expect() in copy() methods to provide clear error messages
  • Remove unnecessary from_bytes() reconstruction in private() methods
  • Add safety comments explaining copy_key feature usage

API improvements:

  • Move signing methods from KeyPair to PrivateKey in secp256k1 module
  • Standardize field naming (secret -> private) across all key pair types
  • Ensure consistent KeyPair trait implementation patterns

Performance improvements:

  • Make private() method O(1) by returning owned field directly
  • Eliminate redundant serialization/deserialization operations

Affects: BLS12381KeyPair, Ed25519KeyPair, Secp256k1KeyPair

   Security improvements:
   - Replace unwrap() with expect() in copy() methods to provide clear error messages
   - Remove unnecessary from_bytes() reconstruction in private() methods
   - Add safety comments explaining copy_key feature usage

   API improvements:
   - Move signing methods from KeyPair to PrivateKey in secp256k1 module
   - Standardize field naming (secret -> private) across all key pair types
   - Ensure consistent KeyPair trait implementation patterns

   Performance improvements:
   - Make private() method O(1) by returning owned field directly
   - Eliminate redundant serialization/deserialization operations

   Affects: BLS12381KeyPair, Ed25519KeyPair, Secp256k1KeyPair
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.

1 participant