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

Decide which library will be used for BLS bilinear pairings #13236

Closed
Tracked by #13316
poulok opened this issue May 13, 2024 · 3 comments
Closed
Tracked by #13316

Decide which library will be used for BLS bilinear pairings #13236

poulok opened this issue May 13, 2024 · 3 comments
Assignees
Labels
Platform Tickets pertaining to the platform

Comments

@poulok
Copy link
Member

poulok commented May 13, 2024

Based on which elliptic curve @rsinha decides we should use, determine the library that needs to be wrapped and used by the Cryptography Module.

@AlfredoG87 needs to verify that the selection will work for smart contracts.

@rsinha
Copy link

rsinha commented May 13, 2024

Given the precompiles that are available, we can go with the BN254 curve. The interface for pairings is generic, so we can later swap this for a different curve as well, giving us crypto agility.

Some of the popular libraries implementing this curve are listed here: https://hackmd.io/@gnark/eccbench
Choosing arkworks crate (https://docs.rs/ark-bn254/latest/ark_bn254/) allows for supporting a large number of curves with the same generic interface, allowing for crypto agility.

@poulok poulok closed this as completed May 16, 2024
@poulok poulok reopened this May 16, 2024
@poulok poulok added the Platform Tickets pertaining to the platform label Jun 4, 2024
@AlfredoG87
Copy link

@timo0 @rsinha

EVM chains will not support natively BN254 curve, the only one that is supported natively is alt_bn128 other curves might be supported using custom math, however Gas costs will make them undesirable to be used.

This are the available precompiles for EVM:

image

https://www.evm.codes/precompiled

@rsinha
Copy link

rsinha commented Jun 12, 2024

Ah, BN254 is the other name for alt_bn128. All good here :)

@timo0 timo0 closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform Tickets pertaining to the platform
Projects
None yet
Development

No branches or pull requests

4 participants