You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mclwrap provides a wrapper around the BN-254 bilinear group implemented in the [MCL library](https://github.com/herumi/mcl). As the bilinear groups implemented in the Cryptimeleon Math library are not particulary efficient, use of this wrapper is recommended for proper benchmarks.
7
+
Mclwrap provides a wrapper around the BN-254 and BLS12-381 bilinear group implemented in the [MCL library](https://github.com/herumi/mcl). As the bilinear groups implemented in the Cryptimeleon Math library are not particulary efficient, use of this wrapper is recommended for proper benchmarks.
8
8
Specifically, the Mclwrap implementation's group operations are roughly 100 times as fast as our own implementation.
9
9
10
10
## Security Disclaimer
@@ -21,7 +21,9 @@ Specifically, the Mclwrap implementation's group operations are roughly 100 time
21
21
22
22
## Quickstart
23
23
24
-
Simply add mclwrap as a dependency (see below for [maven](#adding-mclwrap-dependency-with-maven) and [gradle](#adding-mclwrap-dependency-with-gradle) snippets) and start using the `MclBilinearGroup` in your code.
24
+
Simply add mclwrap as a dependency (see below for [maven](#adding-mclwrap-dependency-with-maven) and [gradle](#adding-mclwrap-dependency-with-gradle) snippets) and start using the `MclBilinearGroup` in your code.
25
+
You can pass `GroupChoice.BN254` or `GroupChoice.BLS12_381` to the constructor of `MclBilinearGroup` to choose which group to use.
26
+
Note that we currently do not support instantiating both groups at the same time.
25
27
26
28
For full performance, you should compile the underlying mcl library for your system yourself (by default, a precompiled maximum-compatibility version of mcl is used, which may miss out on some modern processor features).
System.err.println("If you get this error, the required native library " + libName + " was not found and none of the included libraries could be used!");
131
-
System.err.println("You need to retrieve the native mcljava library that is appropriate for your platform and install it into one of the lib directories:");
System.err.println("The required native mcl library was not found on this system, but one of the included pre-compiled libraries could be used.");
137
-
System.err.println("mclwrap will work as expected, but for optimal run-time performance, please compile the mcljava library from source and install it into one of the lib directories:");
thrownewIllegalArgumentException("mcl has already been initialized with " + initializedGroup + ", you're trying to instantiate " + groupChoice + ". " +
119
+
"We currently do not support running multiple mcl settings at once. It's a known limitation of mcl's Java wrapper. " +
120
+
"If you promise you won't use the old GroupElements anymore (or don't fear undefined behavior), you can call MclBilinearGroupImpl.resetMclInitialization() and then retry.");
121
+
//If you really, really want to make the two settings work concurrently, feel free to pull request that. It's nontrivial though.
122
+
//You'd need to adapt the Java wrapper in this project and the corresponding C code in mcl, see discussion here: https://github.com/cryptimeleon/mclwrap/issues/5.
System.err.println("If you get this error, the required native library " + libName + " was not found and none of the included libraries could be used!");
133
+
System.err.println("You need to retrieve the native mcljava library that is appropriate for your platform and install it into one of the lib directories:");
System.err.println("The required native mcl library was not found on this system, but one of the included pre-compiled libraries could be used.");
139
+
System.err.println("mclwrap will work as expected, but for optimal run-time performance, please compile the mcljava library from source and install it into one of the lib directories:");
0 commit comments