[BREAK API] ECDSA.Recoverable to ECDSAWithKeyRecovery & ECDSA.NonRecoverable to ECDSA #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR changes two two namespaces:
K1.ECDSA.Recoverable
andK1.ECDSA.NonRecoverable
intoK1.ECDSAWithKeyRecovery
and justK1.ECDSA
respectively.The rationale is:
ECDSA
(which was the namespace forRecoverable
andNonRecoverable
which was kind of asymmetric w.r.t.K1.Schnorr
.K1.ECDSA
instead ofK1.ECDSA.NonRecoverable
is preferred.Drawback:
Both ECDSA variants have two structs with options used for signing and validation, named both before this PR and after this PR (i.e. unchanged)
K1.ECDSA.SigningOptions
andK1.ECDSA.ValidationOptions
, and it before this PR it was hiearcally correct that these structs was defined in the shared namespaceECDSA
. If this PR were to be merged it is less elegant that it looks like these structs belong to the non recoverable ECDSA variant, since it is used by both. However this is mostly a detail.I'm torn between what the best API... Unfortunately swift-crypto has not solved this particular problem of two variant for the same signature scheme, so I can't look for answer there (which I've otherwise done a lot when designing the API of this library).
Summary of API:
Given:
ECDSA
ECDSA With Recovery
Schnorr (unchanged)