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

Curve question #184

Closed
darcys22 opened this issue Jul 20, 2023 · 2 comments
Closed

Curve question #184

darcys22 opened this issue Jul 20, 2023 · 2 comments

Comments

@darcys22
Copy link

is MCL_BN_SNARK1 the same as alt_bn128 used in ethereum precompiles?

https://gurukamath.github.io/execution-specs/autoapi/ethereum/crypto/alt_bn128/index.html

@herumi
Copy link
Owner

herumi commented Jul 20, 2023

The pairing is the same.
cat t.cpp

#include <mcl/bn.hpp>

int main()
{
    using namespace mcl::bn;
    initPairing(mcl::BN_SNARK1);
    printf("p=%s\n", Fp::getOp().mp.getStr().c_str());
}
g++ t.cpp -I include/ lib/libmcl.a && ./a.out
p=21888242871839275222246405745257275088696311157297823662689037894645226208583

@darcys22
Copy link
Author

Thank you!

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

No branches or pull requests

2 participants