rfc6979: add generate_k_mut
; remove digest bounds
#773
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.
Adds an API which writes
k
into an output buffer rather than allocating and returning it, which also accepts slices as inputs. This makes it possible to userfc6979
to implement thedsa
crate.Also removes output size bounds on the underlying digest function, which aren't actually relevant to the implementation at all since HMAC-DRBG writes a variable-sized amount of output. This makes it possible to use
rfc6979
+ecdsa
in conjunction withp521
, which has unusually sized scalars (66-bytes) which don't match the output size of the underlying digest function (SHA-512, which has a 64-byte output).