Skip to content

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 requested a review from kchalkias October 16, 2024 14:06
@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