aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/blake2b/blake2b_test.go
diff options
context:
space:
mode:
authorPiotr Dyraga <piotr.dyraga@keep.network>2019-06-18 01:19:47 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-08-21 18:09:15 +0800
commit2890f060b7f9f13649a7e0ec95393f61f1d254a0 (patch)
tree1cccfe8bf1ea84b405c456ec129527e3fa11023d /crypto/blake2b/blake2b_test.go
parentdbb03fe9893dd19f6b1de1ee3b768317f22fd135 (diff)
downloadgo-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.tar
go-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.tar.gz
go-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.tar.bz2
go-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.tar.lz
go-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.tar.xz
go-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.tar.zst
go-tangerine-2890f060b7f9f13649a7e0ec95393f61f1d254a0.zip
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.
Diffstat (limited to 'crypto/blake2b/blake2b_test.go')
0 files changed, 0 insertions, 0 deletions