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

Question about point serialization #8

Open
gimre-xymcity opened this issue Oct 12, 2020 · 1 comment
Open

Question about point serialization #8

gimre-xymcity opened this issue Oct 12, 2020 · 1 comment

Comments

@gimre-xymcity
Copy link

Py implementation mentions zkcrypto repository. Older version of readme contains statement:

Fq2 elements are encoded in big-endian form, meaning that the Fq element c0 + c1 * u is represented by the Fq element c1 followed by the Fq element c0. This means Fq2 elements occupy 96 bytes in this form.

newer implementation do this as well:
https://github.com/zkcrypto/bls12_381/blob/bc1706f6426aca52b9a99e5f100bdb7d119305d3/src/g2.rs#L249

I see that both py and rust implementations in algorand follow that.

Is there any particular reason for <c1, c0> vs <c0, c1> (is it specified in some doc?) or was the choice arbitrary?

@gimre-xymcity
Copy link
Author

Ok, I've found some rationale behind that decision here:
zcash/zcash#2517 (comment)

feel free to close the issue.

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

No branches or pull requests

1 participant