2 releases (1 unstable)

1.0.0-beta.2 Dec 20, 2022
0.6.0 Nov 30, 2023

#2410 in Magic Beans

Download history 1057/week @ 2023-12-19 478/week @ 2023-12-26 1871/week @ 2024-01-02 2010/week @ 2024-01-09 2477/week @ 2024-01-16 3257/week @ 2024-01-23 3862/week @ 2024-01-30 2733/week @ 2024-02-06 2744/week @ 2024-02-13 2950/week @ 2024-02-20 2376/week @ 2024-02-27 3279/week @ 2024-03-05 3932/week @ 2024-03-12 2864/week @ 2024-03-19 2945/week @ 2024-03-26 2481/week @ 2024-04-02

12,999 downloads per month
Used in 3 crates (via tree_hash)

Apache-2.0

10KB
175 lines

ethereum_hashing

This package contains optimized implementations of hashing functions for Ethereum.

It is maintained by Sigma Prime for use in Lighthouse, with an eye to being useful in the Rust Ethereum ecosystem more broadly. We welcome new contributors!

Please see the docs for more information.


lib.rs:

Optimized SHA256 for use in Ethereum.

The initial purpose of this crate was to provide an abstraction over the hash function used in the beacon chain. The hash function changed during the specification process, so defining it once in this crate made it easy to replace.

Now this crate serves primarily as a wrapper over two SHA256 crates: sha2 and ring – which it switches between at runtime based on the availability of SHA intrinsics.

Dependencies

~5.5–7.5MB
~229K SLoC