Sign/verify by digest update, StreamVerifier refactoring #583
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 replaces dalek-cryptography/ed25519-dalek#304
Rebases #556
@mkj wrote:
I'd like to be able to sign/verify non-prehash signatures without the whole message in memory. The use case is for running on no_std embedded where the message is serialized directly into the sha512 digest. It's for SSH protocol so I can't use ed25519 prehashed.
The
StreamVerifier
pull request #542 provides similar functionality, though streaming is only possible for verify (signing needs two passes). Instead I've addedraw_sign_byupdate()
andraw_verify_byupdate()
that take a closure to update the message digest.I've included the
StreamVerifier
commit from #542 and movedrecompute_R
into its own structRCompute
. That lets all the verifier options use the same code path._byupdate
isn't the best name, but other names I came up with would get confused with prehashed methods. I'm open to other suggestions.