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

Update crates to digest v0.10 #217

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Update crates to digest v0.10 #217

merged 1 commit into from
Dec 7, 2021

Conversation

newpavlov
Copy link
Member

@newpavlov newpavlov commented Jan 18, 2021

Depends on RustCrypto/traits#819.

Notable changes:

  • ripemd160, ripemd256, and ripemd320 merged into ripemd.
  • Complete rewrite of the groestl crate using (public domain) code from the NIST submission as a reference. Now the crate has an acceptable performance (~100 MB/s vs ~1 MB/s). It can be improved even further by utilizing AES-NI and SIMD in general, but I don't plan to work on it myself.
  • Use LE table for Whirlpool, thus improving performance a bit on LE targets.
  • Added Tiger2 variant.
  • fsb improvements.
  • sha2, streebog, and shabal are implemented in terms of the VariableOutputCore trait. For example, Sha512VarCore implements it, but supports initialization only for 4 sizes and its variants are defined as:
pub type Sha512_224 = CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, U28>>;
pub type Sha512_256 = CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, U32>>;
pub type Sha384 = CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, U48>>;
pub type Sha512 = CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, U64>>;

Closes #67
Closes #317
Closes #330

@newpavlov newpavlov mentioned this pull request Jan 29, 2021
@tarcieri
Copy link
Member

tarcieri commented Feb 5, 2021

FYI, I just merged Tiger in #229, so you'll probably want to rebase

Cargo.toml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@atenjin
Copy link

atenjin commented Mar 12, 2021

Our bitcoin lib need to be compiled in Wasm, 0.9.0 can't work now... I try 0.10 is ok, hoping this pr could be merged soon...
And thanks for your work all in all.

@newpavlov
Copy link
Member Author

0.9 versions should work fine on WASM. If it's a problem with our crates, can you please open an issue with a description and reproduction steps?

@newpavlov
Copy link
Member Author

BTW I wonder if we should synchronize all hasher crate versions to v0.10. It would make it much easier to see at a single glance which trait version a crate implements, but it would mean we will have a discontinuity in minor versions for some crates, e.g. sm3 will jump from v0.3 to v0.10.

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