Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

6 роки тому
cSIDH-511: (#26) 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 * Go code has very similar performance when compared to C implementation. Results from sidh_torturer (4e2996e12d68364761064341cbe1d1b47efafe23) github.com:henrydcase/sidh-torture/csidh | TestName |Go | C | |------------------|----------|----------| |TestSharedSecret | 57.95774 | 57.91092 | |TestKeyGeneration | 62.23614 | 58.12980 | |TestSharedSecret | 55.28988 | 57.23132 | |TestKeyGeneration | 61.68745 | 58.66396 | |TestSharedSecret | 63.19408 | 58.64774 | |TestKeyGeneration | 62.34022 | 61.62539 | |TestSharedSecret | 62.85453 | 68.74503 | |TestKeyGeneration | 52.58518 | 58.40115 | |TestSharedSecret | 50.77081 | 61.91699 | |TestKeyGeneration | 59.91843 | 61.09266 | |TestSharedSecret | 59.97962 | 62.98151 | |TestKeyGeneration | 64.57525 | 56.22863 | |TestSharedSecret | 56.40521 | 55.77447 | |TestKeyGeneration | 67.85850 | 58.52604 | |TestSharedSecret | 60.54290 | 65.14052 | |TestKeyGeneration | 65.45766 | 58.42823 | On average Go implementation is 2% faster.
4 роки тому
6 роки тому
5 роки тому
5 роки тому
5 роки тому
6 роки тому
1234567891011121314151617181920212223242526272829303132333435363738
  1. sudo: required
  2. language: go
  3. go:
  4. - 1.13.x
  5. - 1.14.x
  6. - master
  7. matrix:
  8. include:
  9. - name: "Go on x86-64"
  10. os: linux
  11. script:
  12. - make clean
  13. - NOASM=0 make test
  14. - NOASM=1 make test
  15. - name: "Go 1.13 on ARM64"
  16. services: docker
  17. os: linux
  18. script:
  19. - docker run --rm --privileged multiarch/qemu-user-static:register --reset
  20. - docker run --rm -v `pwd`:`pwd` -w `pwd` "flowher/debian-buster-aarch64-go-1.13" /bin/bash -c "NOASM=0 make test"
  21. - docker run --rm -v `pwd`:`pwd` -w `pwd` "flowher/debian-buster-aarch64-go-1.13" /bin/bash -c "NOASM=1 make test"
  22. - name: "Go 1.14 on ARM64"
  23. services: docker
  24. os: linux
  25. script:
  26. - docker run --rm --privileged multiarch/qemu-user-static:register --reset
  27. - docker run --rm -v `pwd`:`pwd` -w `pwd` "flowher/debian-buster-aarch64-go-1.14" /bin/bash -c "NOASM=0 make test"
  28. - docker run --rm -v `pwd`:`pwd` -w `pwd` "flowher/debian-buster-aarch64-go-1.14" /bin/bash -c "NOASM=1 make test"
  29. - name: "Coverage"
  30. os: linux
  31. script:
  32. - NOASM=0 make cover
  33. - NOASM=1 make cover
  34. after_script:
  35. - bash <(curl -s https://codecov.io/bash) -t 8a75b459-85b1-4e5d-aa12-4dd705914700