bls_sigs_ref icon indicating copy to clipboard operation
bls_sigs_ref copied to clipboard

Question about point serialization

Open gimre-xymcity opened this issue 4 years ago • 1 comments

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 avatar Oct 12 '20 11:10 gimre-xymcity

Ok, I've found some rationale behind that decision here: https://github.com/zcash/zcash/issues/2517#issuecomment-314200853

feel free to close the issue.

gimre-xymcity avatar Oct 13 '20 11:10 gimre-xymcity