Added Appendix A - Hash function
This commit is contained in:
parent
3bef7c9fe8
commit
56e597187e
|
@ -441,5 +441,14 @@ Slashing conditions may include:
|
||||||
Proof of custody no secret reveal
|
Proof of custody no secret reveal
|
||||||
RANDAO leak
|
RANDAO leak
|
||||||
|
|
||||||
|
# Appendix
|
||||||
|
## Appendix A - Hash function
|
||||||
|
The general hash function `hash(x)` in this specification is defined as:
|
||||||
|
|
||||||
|
`hash(x) := BLAKE2b(x)[0:32]`, where `BLAKE2b` algorithm is deifned in [RFC7693](https://tools.ietf.org/html/rfc7693) and input `x` is bytes type.
|
||||||
|
|
||||||
|
* The output of *default* `BLAKE2b` algorithm is a 64-byte type. To get a 32-byte result, the general hash function output is defined as the leftmost 32 bytes of `BLAKE2b` hash output.
|
||||||
|
* The design rationale is keeping using the default algorithm and avoiding too much dependency on external hash function libraries.
|
||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
|
||||||
|
|
Loading…
Reference in New Issue