1
0
mirror of https://github.com/henrydcase/nobs.git synced 2024-11-28 18:01:21 +00:00
nobs/kem/mkem/README.md

61 lines
2.1 KiB
Markdown
Raw Normal View History

2020-08-25 11:19:07 +01:00
# mKEM for cSIDH/p512
Implementation of multi-KEM for SIKE and multi-PKE for cSIDH.
2020-08-25 11:19:07 +01:00
## Implementation
2020-08-25 11:19:07 +01:00
The implementation is done in Go. Compilation requires go 1.12 or newer to compile with ``GO111MODULE=on``. Implementation is based on cSIDH and SIDH from NOBS NOBS [library](github.com/henrydcase/nobs).
2020-08-25 11:19:07 +01:00
## Running and benchmarking
To run all benchmarks use following command
```
make run
```
It is possible to run only subset of benchmarks. The command ``make run-cycles`` will calculate CPU cycles for encryption/encapsulation to N users. The command ``make run-ns`` will produce results in nanoseconds.
### Results
Benchmarks has been run on i7-8665U (Whiskey Lake) @ 1.90GHz
* CPU cycle count
2020-08-25 11:19:07 +01:00
```
Test name: | Cycle count:
--------------------------|--------------
bench_SIKEp434_KEM | 1720710678
bench_SIKEp503_KEM | 2411750152
bench_SIKEp751_KEM | 7225841287
bench_SIKEp434_mKEM | 783353356
bench_SIKEp503_mKEM | 1100170053
bench_SIKEp751_mKEM | 3304027422
bench_CSIDH_PKE | 38200232832
bench_CSIDH_mPKE | 19203013803
2020-08-25 11:19:07 +01:00
```
* Time in ns
2020-08-25 11:19:07 +01:00
```
./mkem.test -test.run="notest" -test.bench=BenchmarkMultiEncaps -test.cpu=1
BenchmarkMultiEncaps_100keys/P-434 3 357838360 ns/op
BenchmarkMultiEncaps_100keys/P-503 2 503749852 ns/op
BenchmarkMultiEncaps_100keys/P-751 1 1514791804 ns/op
./mkem.test -test.run="notest" -test.bench=BenchmarkEncaps -test.cpu=1
BenchmarkEncaps/P-434 151 7888643 ns/op
BenchmarkEncaps/P-503 100 11150691 ns/op
BenchmarkEncaps/P-751 36 34494941 ns/op
./mkem.test -test.run="notest" -test.bench=BenchmarkEncrypt_CSIDH_p512 -test.cpu=1
BenchmarkEncrypt_CSIDH_p512 7 185828599 ns/op
2020-08-25 11:19:07 +01:00
./mkem.test -test.run="notest" -test.bench=BenchmarkMultiEncrypt_CSIDH_100keys -test.cpu=1
BenchmarkMultiEncrypt_CSIDH_100keys 1 1025902914 ns/op
2020-08-25 11:19:07 +01:00
```
2021-04-02 17:33:34 +01:00
### Paper
2021-04-02 17:34:03 +01:00
Details of this construction has been presented at [ASIACRYPT 2020](https://www.youtube.com/watch?v=0ijRmXt01Ww) and are described in the [ia.cr/2020/1107](ia.cr/2020/1107)