From 3a6fccd389de63c80b45c08cf62b6d867e36597a Mon Sep 17 00:00:00 2001 From: Dankrad Feist Date: Tue, 14 Feb 2023 20:17:25 +0000 Subject: [PATCH] Remove double hashing --- specs/deneb/polynomial-commitments.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/specs/deneb/polynomial-commitments.md b/specs/deneb/polynomial-commitments.md index c9d7496fa..e4e899d67 100644 --- a/specs/deneb/polynomial-commitments.md +++ b/specs/deneb/polynomial-commitments.md @@ -248,8 +248,7 @@ def compute_challenge(blob: Blob, data += commitment # Transcript has been prepared: time to create the challenges - hashed_data = hash(data) - return hash_to_bls_field(hashed_data + b'\x00') + return hash_to_bls_field(data) ``` #### `bls_modular_inverse` @@ -413,8 +412,7 @@ def verify_kzg_proof_multi(commitments: Sequence[KZGCommitment], + int.to_bytes(y, BYTES_PER_FIELD_ELEMENT, ENDIANNESS) \ + proof - hashed_data = hash(data) - r = hash_to_bls_field(hashed_data + b'\x00') + r = hash_to_bls_field(data) r_powers = compute_powers(r, len(commitments)) # Verify: e(sum r^i proof_i, [s]) ==