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

Add Bn254 GroupElement implementations #763

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open

Conversation

jonas-lj
Copy link
Contributor

@jonas-lj jonas-lj commented Apr 9, 2024

Implementation of GroupElement + Pairing for the BN254 curve construction.

Under the hood it's wrapping Arkworks' implementation from the ark_bn254 crate. This is already used elsewhere, eg. in zkLogin.


impl ToFromByteArray<SCALAR_LENGTH> for Scalar {
fn from_byte_array(bytes: &[u8; SCALAR_LENGTH]) -> Result<Self, FastCryptoError> {
// Note that arkworks uses little-endian byte order for serialization here.
Copy link
Contributor Author

@jonas-lj jonas-lj Apr 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other groups uses big-endian so perhaps we should also do it here also, but the groth16 api expects little-endian representations, so it's not entirely consistent. Any opinions on this?

@jonas-lj jonas-lj marked this pull request as ready for review October 21, 2024 07:04
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.

1 participant