1
0
mirror of https://github.com/henrydcase/nobs.git synced 2024-11-26 00:51:22 +00:00
Go to file
Kris Kwiatkowski 1e91fe8a91 cSIDH-511:
Implementation of Commutative Supersingular Isogeny Diffie Hellman,
based on "A faster way to CSIDH" paper (2018/782).

* For fast isogeny calculation, implementation converts a curve from
  Montgomery to Edwards. All calculations are done on Edwards curve
  and then converted back to Montgomery.
* As multiplication in a field Fp511 is most expensive operation
  the implementation contains multiple multiplications. It has
  most performant, assembly implementation which uses BMI2 and
  ADOX/ADCX instructions for modern CPUs. It also contains
  slower implementation which will run on older CPUs

Benchmarks (Intel SkyLake):
----------
BenchmarkGeneratePrivate   	    6459	    172213 ns/op	       0 B/op	       0 allocs/op
BenchmarkGenerateKeyPair   	      25	  45800356 ns/op	       0 B/op	       0 allocs/op
BenchmarkValidate          	     297	   3915983 ns/op	       0 B/op	       0 allocs/op
BenchmarkValidateRandom    	  184683	      6231 ns/op	       0 B/op	       0 allocs/op
BenchmarkValidateGenerated 	      25	  48481306 ns/op	       0 B/op	       0 allocs/op
BenchmarkDerive            	      19	  60928763 ns/op	       0 B/op	       0 allocs/op
BenchmarkDeriveGenerated   	       8	 137342421 ns/op	       0 B/op	       0 allocs/op
BenchmarkXMul              	    2311	    494267 ns/op	       1 B/op	       0 allocs/op
BenchmarkXAdd              	 2396754	       501 ns/op	       0 B/op	       0 allocs/op
BenchmarkXDbl              	 2072690	       571 ns/op	       0 B/op	       0 allocs/op
BenchmarkIsom              	   78004	     15171 ns/op	       0 B/op	       0 allocs/op
BenchmarkFp512Sub          	224635152	         5.33 ns/op	       0 B/op	       0 allocs/op
BenchmarkFp512Mul          	246633255	         4.90 ns/op	       0 B/op	       0 allocs/op
BenchmarkCSwap             	233228547	         5.10 ns/op	       0 B/op	       0 allocs/op
BenchmarkAddRdc            	87348240	        12.6 ns/op	       0 B/op	       0 allocs/op
BenchmarkSubRdc            	95112787	        11.7 ns/op	       0 B/op	       0 allocs/op
BenchmarkModExpRdc         	   25436	     46878 ns/op	       0 B/op	       0 allocs/op
BenchmarkMulBmiAsm         	19527573	        60.1 ns/op	       0 B/op	       0 allocs/op
BenchmarkMulGeneric        	 7117650	       164 ns/op	       0 B/op	       0 allocs/op
2019-11-24 03:24:30 +00:00
dh cSIDH-511: 2019-11-24 03:24:30 +00:00
drbg CTR-DRBG: Use hardware acceleration on X86 (#18) 2019-04-09 23:50:21 +01:00
ec/x448 x448: Export shared secret size 2018-08-03 14:37:38 +01:00
etc cSIDH-511: 2019-11-24 03:24:30 +00:00
hash License BS for sha3 2018-10-25 15:22:28 +01:00
kem/sike complate rewrite for SIDH and SIKE. adds p503 (#5) 2018-10-25 15:22:28 +01:00
utils DRBG: Speed improvements 2019-04-09 14:37:59 +01:00
.gitignore tls: git ignore 2018-07-27 17:11:53 +01:00
.travis.yml Run tests on ARM64 (#11) 2019-02-16 21:29:20 +00:00
LICENSE SIDH: Update (#9) 2018-12-03 23:07:01 +00:00
Makefile cSIDH-511: 2019-11-24 03:24:30 +00:00
README.md readme: License 2018-10-25 15:22:28 +01:00

nobs-j-crypto

Crypto primitives implementation in Go.

Implemented primitives

  • dh/
    • SIDH
  • ec/
    • x448
  • hash/
    • cSHAKE (sha3 coppied from "golang.org/x/crypto")
    • SM3
  • rand/
    • CTR_DRBG with AES256 (NIST SP800-90A)
  • kem/
    • SIKE: version 3 (as per paper on sike.org)

Testing

make test

Licence

WTFPL except if specified differently in subfolders