go-ethereum/crypto
Piotr Dyraga 2890f060b7
core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09
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.
2019-08-21 13:09:15 +03:00
..
blake2b core/vm, crypto/blake2b: add BLAKE2b compression func at 0x09 2019-08-21 13:09:15 +03:00
bn256 crypto/bn256/cloudflare: fix comments to describe the updated curve parameters (#19577) 2019-05-28 09:13:30 +03:00
ecies all: replace t.Log(); t.FailNow() with t.Fatal() (#19849) 2019-07-18 15:21:24 +03:00
secp256k1 cmd, crypto, eth, internals: fix Typos (#19868) 2019-07-22 10:34:33 +03:00
crypto_test.go crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932) 2018-06-12 15:26:08 +02:00
crypto.go vendor, crypto, swarm: switch over to upstream sha3 package 2019-01-04 09:26:07 +02:00
signature_cgo.go crypto: fix build when CGO_ENABLED=0 (#19121) 2019-02-19 12:18:37 +01:00
signature_nocgo.go crypto: fix build when CGO_ENABLED=0 (#19121) 2019-02-19 12:18:37 +01:00
signature_test.go crypto: ensure that VerifySignature rejects malleable signatures (#15708) 2017-12-20 14:30:00 +02:00