From 4076804d2ba55db8ab817a890275b548ffd5562f Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 3 Oct 2018 15:13:29 +0100 Subject: [PATCH] Rework Appendix A on hash functions --- specs/beacon-chain.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/specs/beacon-chain.md b/specs/beacon-chain.md index 41e29a09f..651ab2771 100644 --- a/specs/beacon-chain.md +++ b/specs/beacon-chain.md @@ -634,12 +634,8 @@ Slashing conditions may include: # Appendix ## 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. - -* `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. +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`. ## Copyright Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).