Skip to content

Conversation

@iquerejeta
Copy link

@iquerejeta iquerejeta commented May 5, 2023

This PR Includes BLS12-381 and JubJub curve to halo2curves.

The implementation of BLS12-381 uses the library's macros to derive the curve implementations (new_curve_impl). The rest of the code is taken from zkcrypto/bls12-381, with the notable exception of the endianness of serialisation of Fp elements. zkcrypto's implementation uses big endian, but in order to be compatible with the curve macros, we had to change it to little endian.

Couldn't use the field_common macro, as it is aimed for 32 bytes prime fields. Would be happy to generalise the macro if that is something of interest.

The implementation of JubJub is taken from zkcrypto/jubjub, as the new_curve_impl cannot be used for elliptic curves in edwards form.

@iquerejeta iquerejeta changed the title Add BLS12-381 Add BLS12-381 and JubJub May 5, 2023
@CPerezz
Copy link
Contributor

CPerezz commented Aug 1, 2023

https://github.com/zkcrypto/group/pull/48/files will unblock this

@davidnevadoc
Copy link
Contributor

Bls12_381 is now being added in PR #87, can we close this PR?

@CPerezz
Copy link
Contributor

CPerezz commented Nov 5, 2023

Closing as Bls has already been given support for this crate in #87

@CPerezz CPerezz closed this Nov 5, 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.

3 participants