Fix little-endian serialization in compute_challenge() (#168)

This commit is contained in:
George Kadianakis 2023-03-02 20:35:37 +02:00 committed by GitHub
parent ae0aeaf33d
commit 53b38face0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 7 deletions

View File

@ -722,12 +722,11 @@ static void compute_challenge(
/* Copy domain separator */
memcpy(offset, FIAT_SHAMIR_PROTOCOL_DOMAIN, 16);
offset += 16;
bytes_from_uint64(
offset, 0
); /* need to fill 16 bytes with the degree in little-endian */
offset += 8;
bytes_from_uint64(offset, FIELD_ELEMENTS_PER_BLOB);
offset += 8;
/* Set all other bytes of this 16-byte (little-endian) field to zero */
bytes_from_uint64(offset, 0);
offset += 8;
/* Copy blob */
memcpy(offset, blob->bytes, BYTES_PER_BLOB);

View File

@ -1 +1 @@
a1b505e8e7e1779eb2077464f5d793e4f36e5060970797c936370266095d048976557826ae0397d7d70256aff13cc6b0
9057e4724ea7b27acaae09b56155c86452a3c034b049d2d13fc2701845d2dcfa8d33612c1f9ecbaba7f7a920458eb5b8

View File

@ -1 +1 @@
true
false

View File

@ -1 +1 @@
true
false