Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix little-endian serialization in compute_challenge() #168

Merged
merged 4 commits into from
Mar 2, 2023

Conversation

asn-d6
Copy link
Contributor

@asn-d6 asn-d6 commented Mar 2, 2023

That code was supposed to be doing:

    degree_poly = int.to_bytes(FIELD_ELEMENTS_PER_BLOB, 16, 'little')
    data = FIAT_SHAMIR_PROTOCOL_DOMAIN + degree_poly

but it was not doing the endianness right.

It was supposed to do:

    degree_poly = int.to_bytes(FIELD_ELEMENTS_PER_BLOB, 16, 'little')
    data = FIAT_SHAMIR_PROTOCOL_DOMAIN + degree_poly
src/c_kzg_4844.c Outdated Show resolved Hide resolved
asn-d6 and others added 2 commits March 2, 2023 17:46
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
@asn-d6 asn-d6 force-pushed the little_endian_challenge branch 2 times, most recently from 942af78 to 3074b5c Compare March 2, 2023 16:13
@asn-d6 asn-d6 force-pushed the little_endian_challenge branch from 3074b5c to ed36a07 Compare March 2, 2023 16:17
@jtraglia jtraglia merged commit 53b38fa into ethereum:main Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants