Closed levyfan closed 1 year ago
This API is useful for only SECP*
curve. Is it okay?
I see. I need a base point for BN254.
I don't think that the base point of BN254 is defined. If you want to set it as a point (x, y), then use setStr(P, "1 <x> <y>", 10)
.
https://github.com/herumi/mcl/blob/master/api.md#set-string
As the curve is Y²=X³+3, I guess we can just set X=1 and Y=2? https://github.com/ConsenSys/gnark-crypto/blob/7fcb6a36443a7c998756e3910d0d99aeb37d0213/ecc/bn254/bn254.go#L108
Yes. You can useg1Gen.SetString("1 1 2", 10)
. The first 1
means Affine format string.
All right, they are 2 different curves. I can use the G here https://neuromancer.sk/std/other/Fp254BNb.
BN254 -> alt_bn_128(Y²=X³+3) https://github.com/ConsenSys/gnark-crypto/tree/master/ecc/bn254 BN254 -> Fp254BNb(Y²=X³+2) https://neuromancer.sk/std/other/Fp254BNb
There is an article about it https://hackmd.io/@jpw/bn254
How about MCL_BN_SNARK1
?
ok get that~
Hi @herumi , I add the G1GetBasePoint api to golang. Please let me known if this is OK.