dalek-cryptography / ed25519-dalek

Fast and efficient ed25519 signing and verification in Rust.
BSD 3-Clause "New" or "Revised" License
677 stars 222 forks source link

Attempt at implementing streaming verification #303

Open Monadic-Cat opened 1 year ago

Monadic-Cat commented 1 year ago

As requested here, this PR contains my port of PR #196 to use the hazmat module instead of implementing any cryptographic stuff itself.

I haven't copied over the added test yet, but I have confirmed basic functionality by test using it in a demo application I have lying around.

tarcieri commented 1 year ago

Thanks for pushing this up. It's interesting you managed to make it work but I guess I misjudged whether this would be a good fit. Feels like the wrong abstraction level.

Perhaps VerifyingKey::recompute_R can be subdivided into some smaller functions (that is to say, preserve recompute_R, but have it call some other functions) which are more amenable to this streaming verification use case.

e.g. recompute_R_from_k?

tarcieri commented 1 year ago

Looks like @robjtede updated #196 so perhaps we should continue the discussion there