Fix little-endian serialization in compute_challenge() (#168)
This commit is contained in:
parent
ae0aeaf33d
commit
53b38face0
|
@ -722,12 +722,11 @@ static void compute_challenge(
|
||||||
/* Copy domain separator */
|
/* Copy domain separator */
|
||||||
memcpy(offset, FIAT_SHAMIR_PROTOCOL_DOMAIN, 16);
|
memcpy(offset, FIAT_SHAMIR_PROTOCOL_DOMAIN, 16);
|
||||||
offset += 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);
|
bytes_from_uint64(offset, FIELD_ELEMENTS_PER_BLOB);
|
||||||
offset += 8;
|
offset += 8;
|
||||||
|
/* Set all other bytes of this 16-byte (little-endian) field to zero */
|
||||||
|
bytes_from_uint64(offset, 0);
|
||||||
|
offset += 8;
|
||||||
|
|
||||||
/* Copy blob */
|
/* Copy blob */
|
||||||
memcpy(offset, blob->bytes, BYTES_PER_BLOB);
|
memcpy(offset, blob->bytes, BYTES_PER_BLOB);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
a1b505e8e7e1779eb2077464f5d793e4f36e5060970797c936370266095d048976557826ae0397d7d70256aff13cc6b0
|
9057e4724ea7b27acaae09b56155c86452a3c034b049d2d13fc2701845d2dcfa8d33612c1f9ecbaba7f7a920458eb5b8
|
|
@ -1 +1 @@
|
||||||
true
|
false
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
true
|
false
|
||||||
|
|
Loading…
Reference in New Issue