Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time for another digest update? #16

Open
martinthomson opened this issue Jan 27, 2022 · 2 comments · May be fixed by #17
Open

Time for another digest update? #16

martinthomson opened this issue Jan 27, 2022 · 2 comments · May be fixed by #17

Comments

@martinthomson
Copy link

Using the current crate with the 0.10 version of sha2 turns out to be a little messy:

error[E0277]: the trait bound `CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>: digest::Update` is not satisfied
   --> src/user.rs:84:9
    |
84  |         RistrettoPoint::hash_from_bytes::<Sha512>(&input)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `digest::Update` is not implemented for `CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>`
    |
    = note: required because of the requirements on the impl of `digest::digest::Digest` for `CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>>>`
note: required by a bound in `RistrettoPoint::hash_from_bytes`
   --> .../curve25519-dalek-ng-4.1.1/src/ristretto.rs:689:18
    |
689 |         where D: Digest<OutputSize = U64> + Default
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `RistrettoPoint::hash_from_bytes`

It seems like the requirements from this crate are modest, but the change would be quite disruptive (for the same reason) and it might need a version bump. I'd have said a minor release is in order, but you seem to be using major versions for similar changes.

martinthomson added a commit to martinthomson/curve25519-dalek-ng that referenced this issue Jan 27, 2022
This bumps the version number and fixes the tests.  That's all.  I'm not
qualified to answer the version number question.

Fixes zkcrypto#16.
@martinthomson martinthomson linked a pull request Jan 27, 2022 that will close this issue
@Rexagon
Copy link

Rexagon commented Feb 9, 2022

Looking forward to this update. With the new object-safe Update, it's possible to use dyn to reduce code bloat for some packet processing, but signature verification requires this crate, which still uses 0.9 :(

@0xdeafbeef
Copy link

Waiting for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants