• Piotr Dyraga's avatar
    core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09 · 2890f060
    Piotr Dyraga authored
    The precompile at 0x09 wraps the BLAKE2b F compression function:
    https://tools.ietf.org/html/rfc7693#section-3.2
    
    The precompile requires 6 inputs tightly encoded, taking exactly 213
    bytes, as explained below.
    
    - `rounds` - the number of rounds - 32-bit unsigned big-endian word
    - `h` - the state vector - 8 unsigned 64-bit little-endian words
    - `m` - the message block vector - 16 unsigned 64-bit little-endian words
    - `t_0, t_1` - offset counters - 2 unsigned 64-bit little-endian words
    - `f` - the final block indicator flag - 8-bit word
    
    [4 bytes for rounds][64 bytes for h][128 bytes for m][8 bytes for t_0]
    [8 bytes for t_1][1 byte for f]
    
    The boolean `f` parameter is considered as `true` if set to `1`.
    The boolean `f` parameter is considered as `false` if set to `0`.
    All other values yield an invalid encoding of `f` error.
    
    The precompile should compute the F function as specified in the RFC
    (https://tools.ietf.org/html/rfc7693#section-3.2) and return the updated
    state vector `h` with unchanged encoding (little-endian).
    
    See EIP-152 for details.
    2890f060
Name
Last commit
Last update
.github Loading commit data...
accounts Loading commit data...
build Loading commit data...
cmd Loading commit data...
common Loading commit data...
consensus Loading commit data...
console Loading commit data...
contracts/checkpointoracle Loading commit data...
core Loading commit data...
crypto Loading commit data...
dashboard Loading commit data...
docs/audits Loading commit data...
eth Loading commit data...
ethclient Loading commit data...
ethdb Loading commit data...
ethstats Loading commit data...
event Loading commit data...
graphql Loading commit data...
internal Loading commit data...
les Loading commit data...
light Loading commit data...
log Loading commit data...
metrics Loading commit data...
miner Loading commit data...
mobile Loading commit data...
node Loading commit data...
p2p Loading commit data...
params Loading commit data...
rlp Loading commit data...
rpc Loading commit data...
signer Loading commit data...
swarm Loading commit data...
tests Loading commit data...
trie Loading commit data...
vendor Loading commit data...
whisper Loading commit data...
.dockerignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COPYING Loading commit data...
COPYING.LESSER Loading commit data...
Dockerfile Loading commit data...
Dockerfile.alltools Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
SECURITY.md Loading commit data...
appveyor.yml Loading commit data...
circle.yml Loading commit data...
interfaces.go Loading commit data...