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

Major refactor / rewrite #16

Merged
merged 42 commits into from
Mar 24, 2023
Merged

Major refactor / rewrite #16

merged 42 commits into from
Mar 24, 2023

Conversation

Sajjon
Copy link
Owner

@Sajjon Sajjon commented Mar 24, 2023

This is a big PR with a major refactor / rewrite of the impl which also introduces some breaking API changes.

First of all, the K1.PrivateKey / K1.PublicKey key pair has been removed, in favour of more CryptoKit like APIs splitting the keys up in multiple key pairs:
K1.ECDSA.Recoverable.PrivateKey / K1.ECDSA.Recoverable.PublicKey
K1.ECDSA.NonRecoverable.PrivateKey / K1.ECDSA.NonRecoverable.PublicKey
K1.Schnorr.PrivateKey / K1.Schnorr.PublicKey
K1.KeyAgreement.PrivateKey / K1.KeyAgreement.PublicKey

The ECDSA signing methods now use this format:
signature:for:options and signature:forUnhashed:options

The Schnorr validation methods now use this format:
isValidSignature:hashed and isValidSignature:digest andisValidSignature:unhashed

The ECDSA validation methods (shared for Recoverable and NonRecoverable) now use this format:
isValidSignature:hashed:options and isValidSignature:digest:options andisValidSignature:unhashed:options

Furthermore more Serialization and Deserialization methods have been added to:

  • (all) PrivateKey(s)
  • (all) PublicKey(s)
  • (all) ECDSASignature(s)
  • Schnorr.Signature

Such as pem, der and more.

@Sajjon Sajjon merged commit b231bad into main Mar 24, 2023
@Sajjon Sajjon deleted the refactor/main branch March 24, 2023 13:54
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