File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -231,21 +231,16 @@ def compute_challenge(blob: Blob,
231231 commitment : KZGCommitment) -> BLSFieldElement:
232232 """
233233 Return the Fiat-Shamir challenge required by the rest of the protocol.
234- The Fiat-Shamir logic works as per the following pseudocode:
235234 """
236235
237- # Append the number of polynomials and the degree of each polynomial as a domain separator
238- num_polynomials = int .to_bytes(1 , 8 , ENDIANNESS )
239- degree_poly = int .to_bytes(FIELD_ELEMENTS_PER_BLOB , 8 , ENDIANNESS )
240- data = FIAT_SHAMIR_PROTOCOL_DOMAIN + degree_poly + num_polynomials
236+ # Append the degree of the polynomial as a domain separator
237+ degree_poly = int .to_bytes(FIELD_ELEMENTS_PER_BLOB , 16 , ENDIANNESS )
238+ data = FIAT_SHAMIR_PROTOCOL_DOMAIN + degree_poly
241239
242- # Append each polynomial which is composed by field elements
243240 data += blob
244-
245- # Append serialized G1 points
246241 data += commitment
247242
248- # Transcript has been prepared: time to create the challenges
243+ # Transcript has been prepared: time to create the challenge
249244 return hash_to_bls_field(data)
250245```
251246
You can’t perform that action at this time.
0 commit comments