scipr-lab / dizk

Java library for distributed zero knowledge proof systems
Other
232 stars 66 forks source link

fix fmsm benchmark #20

Open brucechin opened 2 years ago

brucechin commented 2 years ago

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.