Closed tarcieri closed 1 year ago
What's remaining in terms of tests before promoting this into a sem-ver feature arithmetic
?
When #951 lands we should basically be there, although I'd also like to wire up an ECDSA feature and add the Wycheproof test vectors for it
When #951 lands we should basically be there, although I'd also like to wire up an ECDSA feature and add the Wycheproof test vectors for it
I see, are you working on this or should I create a pull request?
I'm working on it. It's somewhat involved since the ecdsa
crate assumes that the hash function output size is the same as the size of a serialized field element (it gets particularly hairy in the current RFC6979 implementation).
Fixing that will involve breaking changes to the ecdsa
crate, but in the meantime I'm adding some newtypes to work around it.
I'm working on it. It's somewhat involved since the
ecdsa
crate assumes that the hash function output size is the same as the size of a serialized field element (it gets particularly hairy in the current RFC6979 implementation).Fixing that will involve breaking changes to the
ecdsa
crate, but in the meantime I'm adding some newtypes to work around it.
Newtype for the curve's default hashing function that returns field element sized outputsize?
Newtypes for ecdsa::{SigningKey, VerifyingKey}
Newtypes for
ecdsa::{SigningKey, VerifyingKey}
Ah I see, so this eventually will require a breaking change in ecdsa crate.
@MasterAwesome I was able to make the breaking changes in the ecdsa
and rfc6979
crates:
However, the rfc6979
crate still can't correctly generate a P-521 test vector for whatever reason:
This is a tracking issue for promoting
p521
'swip-arithmetic-do-not-use
feature to a workingarithmetic
feature.Notably the base field implementation in
p521
uses code generated byfiat-crypto
specific to Solinas primes, which is different from the Montgomery representation which is easily supported using macros in theprimeorder
crate.945 fixed an issue where
fiat_p521_tight_field_element
uses a different limb representation thanU576
, however this was not sufficient to make the basic field arithmetic tests work: #946