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

BN curves refactor. #135

Closed
wants to merge 13 commits into from
Closed

BN curves refactor. #135

wants to merge 13 commits into from

Conversation

davidnevadoc
Copy link
Contributor

No description provided.

@mratsim
Copy link
Contributor

mratsim commented Feb 10, 2024

I suggest separating the extension fields logic from the pairing logic.

This would allow more flexibility in adding curves with embedding degrees != 12 like BW6-761 (that embeds BLS12-377) or BLS24 curves (which are more efficient than BLS12 curves for KZG as they can have a smaller base field).

For instance this works very well in Constantine:

@davidnevadoc
Copy link
Contributor Author

Thanks for the recommendation @mratsim. I think following that separation is a good idea, I'll do that!

While working on this I started thinking about the order of the extensions in the towers. The most common ordering I've seen is Fp12:Fp6:Fp2:Fp. Do you think it is fine to have only this construction in mind or should we aim to also support others?

@davidnevadoc
Copy link
Contributor Author

These changes have been mostly implemented in #161.

@mratsim
Copy link
Contributor

mratsim commented Jun 24, 2024

While working on this I started thinking about the order of the extensions in the towers. The most common ordering I've seen is Fp12:Fp6:Fp2:Fp. Do you think it is fine to have only this construction in mind or should we aim to also support others?

I forgot to reply, the Fp12->Fp4 for me is noticeably faster for BLS12-381

image
image

The tradeoff is that inversion suffers.

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.

None yet

2 participants