apache / incubator-tuweni

Apache Tuweni is a set of libraries and other tools to aid development of blockchain and other decentralized software in Java and other JVM languages. It includes a low-level bytes library, serialization and deserialization codecs (e.g. RLP), various cryptography functions and primatives, and lots of other helpful utilities.
https://tuweni.apache.org/
Apache License 2.0
173 stars 79 forks source link

Blake2b F compression #61

Closed atoulme closed 1 year ago

atoulme commented 4 years ago

EIP-152 introduced a new Blake2b precompile contract for Ethereum.

This blake2b compression is implemented by Sodium, but Ethereum chose to use a different sigma.

Motivation Current implementations of blake2b are client-specific - there exists one for each client, so far. They also are implemented in Java where ideally they should be implemented in low-level C, and introduced via bindings.

Finally, this could be easily done by adopting and extending the libsodium primitives.

Scope of work

atoulme commented 1 year ago

The java version is now implemented here: crypto/src/main/java/org/apache/tuweni/crypto/blake2bf/Blake2bfMessageDigest.java