Fix Legendre bit computations

This commit is contained in:
Dankrad Feist 2020-06-12 23:44:36 +01:00
parent f857dbfac2
commit 42a9f1afdf
No known key found for this signature in database
GPG Key ID: 6815E6A20BEBBABA
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ def compute_custody_bit(key: BLSSignature, data: ByteList[MAX_SHARD_BLOCK_SIZE])
custody_atoms = get_custody_atoms(data)
secrets = get_custody_secrets(key)
uhf = universal_hash_function(custody_atoms, secrets)
legendre_bits = [legendre_bit(uhf + secrets[0], CUSTODY_PRIME) for i in range(CUSTODY_PROBABILITY_EXPONENT)]
legendre_bits = [legendre_bit(uhf + secrets[0] + i, CUSTODY_PRIME) for i in range(CUSTODY_PROBABILITY_EXPONENT)]
return all(legendre_bits)
```