Merge pull request #32 from ethereum/JustinDrake-patch-3
Rework Appendix A on hash functions
This commit is contained in:
commit
e8034745a3
|
@ -634,12 +634,8 @@ Slashing conditions may include:
|
||||||
|
|
||||||
# Appendix
|
# Appendix
|
||||||
## Appendix A - Hash function
|
## Appendix A - Hash function
|
||||||
The general hash function `hash(x)` in this specification is defined as:
|
|
||||||
|
|
||||||
`hash(x) := BLAKE2b-512(x)[0:32]`, where `BLAKE2b-512` (`blake2b512`) algorithm is defined in [RFC 7693](https://tools.ietf.org/html/rfc7693) and input `x` is bytes type.
|
We aim to have a STARK-friendly hash function `hash(x)` for the production launch of the beacon chain. While the standardisation process for a STARK-friendly hash function takes place—led by STARKware, who will produce a detailed report with recommendations—we use `BLAKE2b-512` as a placeholder. Specifically, we set `hash(x) := BLAKE2b-512(x)[0:32]` where the `BLAKE2b-512` algorithm is defined in [RFC 7693](https://tools.ietf.org/html/rfc7693) and the input `x` is of type `bytes`.
|
||||||
|
|
||||||
* `BLAKE2b-512` is the *default* `BLAKE2b` algorithm with 64-byte digest size. To get a 32-byte result, the general hash function output is defined as the leftmost `32` bytes of `BLAKE2b-512` 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