#sha-256 #sha-2 #hash #ethereum #ring #hashing #switch

yanked sean_test_eth2_hashing

Hashing primitives used in Ethereum 2.0

0.1.1 Jul 16, 2021

#56 in #sha-2


Used in 2 crates (via sean_test_tree_hash)

Apache-2.0

9KB
175 lines

Optimized SHA256 for use in Ethereum 2.0.

The initial purpose of this crate was to provide an abstraction over the hash function used in Ethereum 2.0. 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–8MB
~235K SLoC