|
|
@ -27,6 +27,39 @@ p(z) = 36z^4 + 36z^3 + 24z^2 + 6z + 1. |
|
|
|
* CurveFp381 ; a BN curve over the 381-bit prime p(z) where z = -(2^94 + 2^76 + 2^72 + 1). |
|
|
|
* CurveFp381 ; a BN curve over the 381-bit prime p(z) where z = -(2^94 + 2^76 + 2^72 + 1). |
|
|
|
* CurveFp462 ; a BN curve over the 462-bit prime p(z) where z = 2^114 + 2^101 - 2^14 - 1. |
|
|
|
* CurveFp462 ; a BN curve over the 462-bit prime p(z) where z = 2^114 + 2^101 - 2^14 - 1. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Benchmark |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A benchmark of a BN curve CurveFp254BNb(2016/12/25). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* x64, x86 ; Inte Core i7-6700 3.4GHz(Skylake) upto 4GHz on Ubuntu 16.04. |
|
|
|
|
|
|
|
* `sudo cpufreq-set -g performance` |
|
|
|
|
|
|
|
* arm ; 900MHz quad-core ARM Cortex-A7 on Raspberry Pi2, Linux 4.4.11-v7+ |
|
|
|
|
|
|
|
* arm64 ; 1.2GHz ARM Cortex-A53 [HiKey](http://www.96boards.org/product/hikey/) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
software | x64| x86| arm|arm64(msec) |
|
|
|
|
|
|
|
---------------------------------------------------------|------|-----|----|----- |
|
|
|
|
|
|
|
[ate-pairing](https://github.com/herumi/ate-pairing) | 0.21 | - | - | - |
|
|
|
|
|
|
|
mcl | 0.31 | 1.6 |22.6| 3.9 |
|
|
|
|
|
|
|
[TEPLA](http://www.cipher.risk.tsukuba.ac.jp/tepla/) | 1.76 | 3.7 | 37 | 17.9 |
|
|
|
|
|
|
|
[RELIC](https://github.com/relic-toolkit/relic) PRIME=254| 0.30 | 3.5 | 36 | - |
|
|
|
|
|
|
|
[MIRACL](https://github.com/miracl/MIRACL) ake12bnx | 4.2 | - | 78 | - |
|
|
|
|
|
|
|
[NEONabe](http://sandia.cs.cinvestav.mx/Site/NEONabe) | - | - | 16 | - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* compile option for RELIC |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
cmake -DARITH=x64-asm-254 -DFP_PRIME=254 -DFPX_METHD="INTEG;INTEG;LAZYR" -DPP_METHD="LAZYR;OATEP" |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
## Higher-bit BN curve benchmark by mcl |
|
|
|
|
|
|
|
see `test/bn384_test.cpp` and `test/bn512_test.cpp`. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Benchmark on Kaby Lake Core i7-7700(3.6GHz) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paramter | x64(msec)| |
|
|
|
|
|
|
|
----------------|------------| |
|
|
|
|
|
|
|
CurveFpBN254BNb | 0.34| |
|
|
|
|
|
|
|
CurveFp382_1 | 0.95| |
|
|
|
|
|
|
|
CurveFp461 | 2.16| |
|
|
|
|
|
|
|
|
|
|
|
# Installation Requirements |
|
|
|
# Installation Requirements |
|
|
|
|
|
|
|
|
|
|
|
* [GMP](https://gmplib.org/) and OpenSSL |
|
|
|
* [GMP](https://gmplib.org/) and OpenSSL |
|
|
@ -245,39 +278,6 @@ getStr() method gets |
|
|
|
`G2::set()`, `G2::setStr` and `operator<<` also check the order. |
|
|
|
`G2::set()`, `G2::setStr` and `operator<<` also check the order. |
|
|
|
If you check it out of the library, then you can stop the verification by calling `G2::setOrder(0)`. |
|
|
|
If you check it out of the library, then you can stop the verification by calling `G2::setOrder(0)`. |
|
|
|
|
|
|
|
|
|
|
|
# Benchmark |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A benchmark of a BN curve CurveFp254BNb(2016/12/25). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* x64, x86 ; Inte Core i7-6700 3.4GHz(Skylake) upto 4GHz on Ubuntu 16.04. |
|
|
|
|
|
|
|
* `sudo cpufreq-set -g performance` |
|
|
|
|
|
|
|
* arm ; 900MHz quad-core ARM Cortex-A7 on Raspberry Pi2, Linux 4.4.11-v7+ |
|
|
|
|
|
|
|
* arm64 ; 1.2GHz ARM Cortex-A53 [HiKey](http://www.96boards.org/product/hikey/) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
software | x64| x86| arm|arm64(msec) |
|
|
|
|
|
|
|
---------------------------------------------------------|------|-----|----|----- |
|
|
|
|
|
|
|
[ate-pairing](https://github.com/herumi/ate-pairing) | 0.21 | - | - | - |
|
|
|
|
|
|
|
mcl | 0.31 | 1.6 |22.6| 3.9 |
|
|
|
|
|
|
|
[TEPLA](http://www.cipher.risk.tsukuba.ac.jp/tepla/) | 1.76 | 3.7 | 37 | 17.9 |
|
|
|
|
|
|
|
[RELIC](https://github.com/relic-toolkit/relic) PRIME=254| 0.30 | 3.5 | 36 | - |
|
|
|
|
|
|
|
[MIRACL](https://github.com/miracl/MIRACL) ake12bnx | 4.2 | - | 78 | - |
|
|
|
|
|
|
|
[NEONabe](http://sandia.cs.cinvestav.mx/Site/NEONabe) | - | - | 16 | - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* compile option for RELIC |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
cmake -DARITH=x64-asm-254 -DFP_PRIME=254 -DFPX_METHD="INTEG;INTEG;LAZYR" -DPP_METHD="LAZYR;OATEP" |
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
# Higher-bit BN curve benchmark by mcl |
|
|
|
|
|
|
|
see `test/bn384_test.cpp` and `test/bn512_test.cpp`. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Benchmark on Kaby Lake Core i7-7700(3.6GHz) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
paramter | x64(msec)| |
|
|
|
|
|
|
|
----------------|------------| |
|
|
|
|
|
|
|
CurveFpBN254BNb | 0.34| |
|
|
|
|
|
|
|
CurveFp382_1 | 0.95| |
|
|
|
|
|
|
|
CurveFp461 | 2.16| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# How to make asm files (optional) |
|
|
|
# How to make asm files (optional) |
|
|
|
The asm files generated by this way are already put in `src/asm`, then it is not necessary to do this. |
|
|
|
The asm files generated by this way are already put in `src/asm`, then it is not necessary to do this. |
|
|
|
|
|
|
|
|
|
|
|