Skip to content

Conversation

@brucechin
Copy link

@brucechin brucechin commented Apr 13, 2022

In the original fixed base MSM G1 and G2 profiling code, the code involving Java’s BigInteger.bitSize() is tricky

final BN254aG1 groupFactory = new BN254aG1Parameters().ONE();
final int scalarSize = groupFactory.bitSize();

Because of Java BigInteger property, the bitSize of groupFactory here is 1 instead of 254. Therefore, we should first generate a random BN254G1/G2 generator using groupFactory, then use the bitSize of the generator.

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.

1 participant