update code
Project: http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/commit/c25f9e5c Tree: http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/tree/c25f9e5c Diff: http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/diff/c25f9e5c Branch: refs/heads/master Commit: c25f9e5cead3a168605e91ef0ae191977f19996e Parents: 1add756 Author: Brian Spector <[email protected]> Authored: Tue Jan 15 16:15:05 2019 +0000 Committer: Brian Spector <[email protected]> Committed: Tue Jan 15 16:15:05 2019 +0000 ---------------------------------------------------------------------- LICENSE-2.0.TXT | 202 ++ NOTICE.txt | 5 + readme.txt | 61 + version22/amcl22.pdf | Bin 0 -> 419918 bytes version22/bigtobig.cpp | 292 ++ version22/blsgen.cpp | 194 ++ version22/bngen.cpp | 251 ++ version22/c/CARSK.pem | 54 + version22/c/aes.c | 702 +++++ version22/c/amcl.h | 2935 ++++++++++++++++++ version22/c/arch.h | 119 + version22/c/benchtest_ec.c | 212 ++ version22/c/benchtest_pair.c | 257 ++ version22/c/big.c | 1525 +++++++++ version22/c/build_ec | 22 + version22/c/build_ec.bat | 22 + version22/c/build_pair | 27 + version22/c/build_pair.bat | 27 + version22/c/ca.crt | 23 + version22/c/eccert.pem | 17 + version22/c/ecdh.c | 751 +++++ version22/c/ecdh.h | 206 ++ version22/c/ecp.c | 1176 +++++++ version22/c/ecp2.c | 696 +++++ version22/c/faster.c | 98 + version22/c/faster.txt | 25 + version22/c/ff.c | 1150 +++++++ version22/c/fp.c | 608 ++++ version22/c/fp12.c | 727 +++++ version22/c/fp2.c | 435 +++ version22/c/fp4.c | 651 ++++ version22/c/gcm.c | 411 +++ version22/c/hash.c | 422 +++ version22/c/maxstack.c | 62 + version22/c/mpin.c | 1212 ++++++++ version22/c/mpin.h | 408 +++ version22/c/oct.c | 428 +++ version22/c/pair.c | 828 +++++ version22/c/rand.c | 172 + version22/c/randapi.c | 15 + version22/c/randapi.h | 20 + version22/c/readme.txt | 77 + version22/c/rom.c | 1206 +++++++ version22/c/rsa.c | 394 +++ version22/c/rsa.h | 99 + version22/c/testecdh.c | 207 ++ version22/c/testmpin.c | 313 ++ version22/c/testrsa.c | 104 + version22/c/x509.c | 1079 +++++++ version22/c/x509.h | 113 + version22/check.cpp | 100 + version22/cs/readme.txt | 36 + version22/ecgen.cpp | 125 + version22/go/AES.go | 634 ++++ version22/go/BIG.go | 850 +++++ version22/go/BenchtestEC.go | 154 + version22/go/BenchtestPAIR.go | 206 ++ version22/go/DBIG.go | 256 ++ version22/go/ECDH.go | 547 ++++ version22/go/ECP.go | 893 ++++++ version22/go/ECP2.go | 568 ++++ version22/go/FF.go | 905 ++++++ version22/go/FP.go | 279 ++ version22/go/FP12.go | 551 ++++ version22/go/FP2.go | 300 ++ version22/go/FP4.go | 479 +++ version22/go/GCM.go | 337 ++ version22/go/HASH256.go | 192 ++ version22/go/HASH384.go | 204 ++ version22/go/HASH512.go | 204 ++ version22/go/MPIN.go | 769 +++++ version22/go/PAIR.go | 641 ++++ version22/go/RAND.go | 153 + version22/go/ROM32.go | 825 +++++ version22/go/ROM64.go | 826 +++++ version22/go/RSA.go | 363 +++ version22/go/TestECDH.go | 164 + version22/go/TestMPIN.go | 241 ++ version22/go/TestRSA.go | 98 + version22/go/readme.txt | 50 + version22/java/AES.java | 695 +++++ version22/java/BIG32.java | 1016 ++++++ version22/java/BIG64.java | 1040 +++++++ version22/java/BenchtestEC.java | 160 + version22/java/BenchtestPAIR.java | 208 ++ version22/java/DBIG32.java | 308 ++ version22/java/DBIG64.java | 306 ++ version22/java/ECDH.java | 581 ++++ version22/java/ECP.java | 917 ++++++ version22/java/ECP2.java | 624 ++++ version22/java/FF.java | 941 ++++++ version22/java/FP.java | 345 ++ version22/java/FP12.java | 641 ++++ version22/java/FP2.java | 393 +++ version22/java/FP4.java | 584 ++++ version22/java/GCM.java | 374 +++ version22/java/HASH256.java | 216 ++ version22/java/HASH384.java | 227 ++ version22/java/HASH512.java | 229 ++ version22/java/MPIN.java | 853 +++++ version22/java/PAIR.java | 685 ++++ version22/java/RAND.java | 161 + version22/java/ROM32.java | 714 +++++ version22/java/ROM64.java | 703 +++++ version22/java/RSA.java | 362 +++ version22/java/TestECDH.java | 179 ++ version22/java/TestMPIN.java | 270 ++ version22/java/TestRSA.java | 92 + version22/java/readme.txt | 61 + version22/java/rsa_private_key.java | 13 + version22/java/rsa_public_key.java | 11 + version22/js/AES.js | 634 ++++ version22/js/BIG.js | 1037 +++++++ version22/js/BenchtestEC.html | 162 + version22/js/BenchtestPAIR.html | 226 ++ version22/js/DBIG.js | 284 ++ version22/js/ECDH.js | 585 ++++ version22/js/ECP.js | 903 ++++++ version22/js/ECP2.js | 604 ++++ version22/js/FF.js | 947 ++++++ version22/js/FP.js | 360 +++ version22/js/FP12.js | 558 ++++ version22/js/FP2.js | 321 ++ version22/js/FP4.js | 501 +++ version22/js/GCM.js | 305 ++ version22/js/HASH256.js | 180 ++ version22/js/HASH384.js | 238 ++ version22/js/HASH512.js | 236 ++ version22/js/MPIN.js | 933 ++++++ version22/js/PAIR.js | 650 ++++ version22/js/RAND.js | 148 + version22/js/ROM.js | 716 +++++ version22/js/RSA.js | 392 +++ version22/js/TestECDH.html | 143 + version22/js/TestMPIN.html | 330 ++ version22/js/TestRSA.html | 115 + version22/js/UInt64.js | 54 + version22/js/readme.txt | 41 + version22/rust/.gitignore | 5 + version22/rust/Cargo.toml | 24 + version22/rust/readme.txt | 56 + version22/rust/src/aes.rs | 628 ++++ version22/rust/src/big.rs | 1217 ++++++++ version22/rust/src/dbig.rs | 249 ++ version22/rust/src/ecdh.rs | 585 ++++ version22/rust/src/ecp.rs | 955 ++++++ version22/rust/src/ecp2.rs | 677 ++++ version22/rust/src/ff.rs | 944 ++++++ version22/rust/src/fp.rs | 349 +++ version22/rust/src/fp12.rs | 628 ++++ version22/rust/src/fp2.rs | 366 +++ version22/rust/src/fp4.rs | 563 ++++ version22/rust/src/gcm.rs | 356 +++ version22/rust/src/hash256.rs | 182 ++ version22/rust/src/hash384.rs | 188 ++ version22/rust/src/hash512.rs | 189 ++ version22/rust/src/lib.rs | 36 + version22/rust/src/mpin.rs | 768 +++++ version22/rust/src/pair.rs | 674 ++++ version22/rust/src/rand.rs | 147 + version22/rust/src/rom32.rs | 349 +++ version22/rust/src/rom64.rs | 348 +++ version22/rust/src/rsa.rs | 372 +++ version22/rust/tests/benchtest_ec.rs | 185 ++ version22/rust/tests/benchtest_pair.rs | 245 ++ version22/rust/tests/test_ecdh.rs | 180 ++ version22/rust/tests/test_mpin.rs | 217 ++ version22/rust/tests/test_rsa.rs | 109 + version22/swift/BenchtestEC.swift | 161 + version22/swift/BenchtestPAIR.swift | 206 ++ version22/swift/TestECDH.swift | 167 + version22/swift/TestMPIN.swift | 259 ++ version22/swift/TestRSA.swift | 100 + version22/swift/aes.swift | 639 ++++ version22/swift/big.swift | 1169 +++++++ version22/swift/dbig.swift | 265 ++ version22/swift/ecdh.swift | 587 ++++ version22/swift/ecp.swift | 923 ++++++ version22/swift/ecp2.swift | 618 ++++ version22/swift/ff.swift | 927 ++++++ version22/swift/fp.swift | 309 ++ version22/swift/fp12.swift | 584 ++++ version22/swift/fp2.swift | 329 ++ version22/swift/fp4.swift | 517 +++ version22/swift/gcm.swift | 326 ++ version22/swift/hash256.swift | 188 ++ version22/swift/hash384.swift | 198 ++ version22/swift/hash512.swift | 198 ++ version22/swift/main.swift | 13 + version22/swift/mpin.swift | 833 +++++ version22/swift/pair.swift | 592 ++++ version22/swift/rand.swift | 131 + version22/swift/readme.txt | 135 + version22/swift/rom32.swift | 645 ++++ version22/swift/rom64.swift | 258 ++ version22/swift/rsa.swift | 400 +++ version3/LICENSE-2.0.TXT | 202 ++ version3/NOTICE.txt | 5 + version3/amcl3.pdf | Bin 0 -> 299150 bytes version3/bestpair.cpp | 623 ++++ version3/bigtobig.cpp | 292 ++ version3/c/aes.c | 704 +++++ version3/c/amcl.h | 590 ++++ version3/c/arch.h | 129 + version3/c/benchtest_all.c | 1064 +++++++ version3/c/big.c | 1485 +++++++++ version3/c/big.h | 610 ++++ version3/c/bls.c | 89 + version3/c/bls.h | 75 + version3/c/bls192.c | 89 + version3/c/bls192.h | 75 + version3/c/bls256.c | 89 + version3/c/bls256.h | 75 + version3/c/config16.py | 381 +++ version3/c/config32.py | 687 ++++ version3/c/config64.py | 681 ++++ version3/c/config_big.h | 38 + version3/c/config_curve.h | 44 + version3/c/config_ff.h | 38 + version3/c/config_field.h | 34 + version3/c/ecdh.c | 368 +++ version3/c/ecdh.h | 146 + version3/c/ecdh_support.c | 329 ++ version3/c/ecdh_support.h | 114 + version3/c/ecp.c | 1288 ++++++++ version3/c/ecp.h | 314 ++ version3/c/ecp2.c | 724 +++++ version3/c/ecp2.h | 220 ++ version3/c/ecp4.c | 824 +++++ version3/c/ecp4.h | 232 ++ version3/c/ecp8.c | 1025 ++++++ version3/c/ecp8.h | 246 ++ version3/c/faster.c | 97 + version3/c/faster.txt | 29 + version3/c/fastest.c | 59 + version3/c/fastest.txt | 28 + version3/c/ff.c | 1096 +++++++ version3/c/ff.h | 296 ++ version3/c/fp.c | 772 +++++ version3/c/fp.h | 245 ++ version3/c/fp12.c | 726 +++++ version3/c/fp12.h | 216 ++ version3/c/fp16.c | 581 ++++ version3/c/fp16.h | 260 ++ version3/c/fp2.c | 437 +++ version3/c/fp2.h | 240 ++ version3/c/fp24.c | 825 +++++ version3/c/fp24.h | 196 ++ version3/c/fp4.c | 675 ++++ version3/c/fp4.h | 305 ++ version3/c/fp48.c | 1031 ++++++ version3/c/fp48.h | 196 ++ version3/c/fp8.c | 677 ++++ version3/c/fp8.h | 294 ++ version3/c/gcm.c | 411 +++ version3/c/hash.c | 606 ++++ version3/c/mpin.c | 933 ++++++ version3/c/mpin.h | 345 ++ version3/c/mpin192.c | 945 ++++++ version3/c/mpin192.h | 339 ++ version3/c/mpin256.c | 967 ++++++ version3/c/mpin256.h | 339 ++ version3/c/newhope.c | 510 +++ version3/c/newhope.h | 51 + version3/c/oct.c | 401 +++ version3/c/pair.c | 808 +++++ version3/c/pair.h | 103 + version3/c/pair192.c | 676 ++++ version3/c/pair192.h | 77 + version3/c/pair256.c | 746 +++++ version3/c/pair256.h | 77 + version3/c/pbc_support.c | 180 ++ version3/c/pbc_support.h | 96 + version3/c/rand.c | 172 + version3/c/randapi.c | 15 + version3/c/randapi.h | 46 + version3/c/readme.txt | 91 + version3/c/rom_curve_ANSSI.c | 33 + version3/c/rom_curve_BLS24.c | 67 + version3/c/rom_curve_BLS381.c | 62 + version3/c/rom_curve_BLS383.c | 62 + version3/c/rom_curve_BLS461.c | 59 + version3/c/rom_curve_BLS48.c | 88 + version3/c/rom_curve_BN254.c | 80 + version3/c/rom_curve_BN254CX.c | 81 + version3/c/rom_curve_BRAINPOOL.c | 36 + version3/c/rom_curve_C25519.c | 27 + version3/c/rom_curve_C41417.c | 35 + version3/c/rom_curve_ED25519.c | 45 + version3/c/rom_curve_FP256BN.c | 86 + version3/c/rom_curve_FP512BN.c | 87 + version3/c/rom_curve_GOLDILOCKS.c | 37 + version3/c/rom_curve_HIFIVE.c | 37 + version3/c/rom_curve_NIST256.c | 37 + version3/c/rom_curve_NIST384.c | 36 + version3/c/rom_curve_NIST521.c | 35 + version3/c/rom_curve_NUMS256E.c | 43 + version3/c/rom_curve_NUMS256W.c | 34 + version3/c/rom_curve_NUMS384E.c | 34 + version3/c/rom_curve_NUMS384W.c | 34 + version3/c/rom_curve_NUMS512E.c | 33 + version3/c/rom_curve_NUMS512W.c | 34 + version3/c/rom_curve_SECP256K1.c | 39 + version3/c/rom_field_25519.c | 33 + version3/c/rom_field_256PME.c | 28 + version3/c/rom_field_256PMW.c | 26 + version3/c/rom_field_384PM.c | 25 + version3/c/rom_field_512PM.c | 25 + version3/c/rom_field_ANSSI.c | 25 + version3/c/rom_field_BLS24.c | 32 + version3/c/rom_field_BLS381.c | 30 + version3/c/rom_field_BLS383.c | 30 + version3/c/rom_field_BLS461.c | 31 + version3/c/rom_field_BLS48.c | 32 + version3/c/rom_field_BN254.c | 37 + version3/c/rom_field_BN254CX.c | 38 + version3/c/rom_field_BRAINPOOL.c | 25 + version3/c/rom_field_C41417.c | 25 + version3/c/rom_field_FP256BN.c | 36 + version3/c/rom_field_FP512BN.c | 38 + version3/c/rom_field_GOLDILOCKS.c | 30 + version3/c/rom_field_HIFIVE.c | 27 + version3/c/rom_field_NIST256.c | 27 + version3/c/rom_field_NIST384.c | 27 + version3/c/rom_field_NIST521.c | 25 + version3/c/rom_field_SECP256K1.c | 28 + version3/c/rsa.c | 162 + version3/c/rsa.h | 110 + version3/c/rsa_support.c | 237 ++ version3/c/rsa_support.h | 62 + version3/c/testall.c | 1627 ++++++++++ version3/c/testbls.c | 189 ++ version3/c/testnhs.c | 71 + version3/c/x509.c | 1097 +++++++ version3/c/x509.h | 109 + version3/check.cpp | 108 + version3/cpp/aes.cpp | 706 +++++ version3/cpp/amcl.h | 585 ++++ version3/cpp/arch.h | 98 + version3/cpp/benchtest_all.cpp | 1024 ++++++ version3/cpp/big.cpp | 1457 +++++++++ version3/cpp/big.h | 595 ++++ version3/cpp/bls.cpp | 92 + version3/cpp/bls.h | 80 + version3/cpp/bls192.cpp | 92 + version3/cpp/bls192.h | 80 + version3/cpp/bls256.cpp | 92 + version3/cpp/bls256.h | 80 + version3/cpp/config16.py | 386 +++ version3/cpp/config32.py | 686 ++++ version3/cpp/config64.py | 685 ++++ version3/cpp/config_big.h | 12 + version3/cpp/config_curve.h | 47 + version3/cpp/config_ff.h | 13 + version3/cpp/config_field.h | 15 + version3/cpp/ecdh.cpp | 377 +++ version3/cpp/ecdh.h | 154 + version3/cpp/ecdh_support.cpp | 328 ++ version3/cpp/ecdh_support.h | 84 + version3/cpp/ecp.cpp | 1288 ++++++++ version3/cpp/ecp.h | 293 ++ version3/cpp/ecp2.cpp | 734 +++++ version3/cpp/ecp2.h | 203 ++ version3/cpp/ecp4.cpp | 826 +++++ version3/cpp/ecp4.h | 243 ++ version3/cpp/ecp8.cpp | 1029 ++++++ version3/cpp/ecp8.h | 253 ++ version3/cpp/ff.cpp | 1123 +++++++ version3/cpp/ff.h | 276 ++ version3/cpp/fp.cpp | 785 +++++ version3/cpp/fp.h | 229 ++ version3/cpp/fp12.cpp | 725 +++++ version3/cpp/fp12.h | 194 ++ version3/cpp/fp16.cpp | 580 ++++ version3/cpp/fp16.h | 264 ++ version3/cpp/fp2.cpp | 435 +++ version3/cpp/fp2.h | 219 ++ version3/cpp/fp24.cpp | 827 +++++ version3/cpp/fp24.h | 200 ++ version3/cpp/fp4.cpp | 685 ++++ version3/cpp/fp4.h | 286 ++ version3/cpp/fp48.cpp | 1034 ++++++ version3/cpp/fp48.h | 199 ++ version3/cpp/fp8.cpp | 673 ++++ version3/cpp/fp8.h | 301 ++ version3/cpp/gcm.cpp | 413 +++ version3/cpp/hash.cpp | 598 ++++ version3/cpp/mpin.cpp | 945 ++++++ version3/cpp/mpin.h | 340 ++ version3/cpp/mpin192.cpp | 952 ++++++ version3/cpp/mpin192.h | 340 ++ version3/cpp/mpin256.cpp | 971 ++++++ version3/cpp/mpin256.h | 340 ++ version3/cpp/newhope.cpp | 512 +++ version3/cpp/newhope.h | 54 + version3/cpp/oct.cpp | 402 +++ version3/cpp/pair.cpp | 807 +++++ version3/cpp/pair.h | 80 + version3/cpp/pair192.cpp | 684 ++++ version3/cpp/pair192.h | 80 + version3/cpp/pair256.cpp | 756 +++++ version3/cpp/pair256.h | 80 + version3/cpp/pbc_support.cpp | 179 ++ version3/cpp/pbc_support.h | 66 + version3/cpp/rand.cpp | 174 ++ version3/cpp/randapi.cpp | 17 + version3/cpp/randapi.h | 24 + version3/cpp/readme.txt | 76 + version3/cpp/rom_curve_ANSSI.cpp | 42 + version3/cpp/rom_curve_BLS24.cpp | 78 + version3/cpp/rom_curve_BLS381.cpp | 64 + version3/cpp/rom_curve_BLS383.cpp | 68 + version3/cpp/rom_curve_BLS461.cpp | 69 + version3/cpp/rom_curve_BLS48.cpp | 95 + version3/cpp/rom_curve_BN254.cpp | 89 + version3/cpp/rom_curve_BN254CX.cpp | 83 + version3/cpp/rom_curve_BRAINPOOL.cpp | 43 + version3/cpp/rom_curve_C25519.cpp | 36 + version3/cpp/rom_curve_C41417.cpp | 42 + version3/cpp/rom_curve_ED25519.cpp | 54 + version3/cpp/rom_curve_FP256BN.cpp | 86 + version3/cpp/rom_curve_FP512BN.cpp | 88 + version3/cpp/rom_curve_GOLDILOCKS.cpp | 43 + version3/cpp/rom_curve_HIFIVE.cpp | 43 + version3/cpp/rom_curve_NIST256.cpp | 44 + version3/cpp/rom_curve_NIST384.cpp | 42 + version3/cpp/rom_curve_NIST521.cpp | 42 + version3/cpp/rom_curve_NUMS256E.cpp | 53 + version3/cpp/rom_curve_NUMS256W.cpp | 44 + version3/cpp/rom_curve_NUMS384E.cpp | 42 + version3/cpp/rom_curve_NUMS384W.cpp | 42 + version3/cpp/rom_curve_NUMS512E.cpp | 42 + version3/cpp/rom_curve_NUMS512W.cpp | 42 + version3/cpp/rom_curve_SECP256K1.cpp | 45 + version3/cpp/rom_field_ANSSI.cpp | 34 + version3/cpp/rom_field_BLS24.cpp | 37 + version3/cpp/rom_field_BLS381.cpp | 39 + version3/cpp/rom_field_BLS383.cpp | 39 + version3/cpp/rom_field_BLS461.cpp | 40 + version3/cpp/rom_field_BLS48.cpp | 38 + version3/cpp/rom_field_BN254.cpp | 48 + version3/cpp/rom_field_BN254CX.cpp | 49 + version3/cpp/rom_field_BRAINPOOL.cpp | 34 + version3/cpp/rom_field_C41417.cpp | 34 + version3/cpp/rom_field_F25519.cpp | 43 + version3/cpp/rom_field_F256PME.cpp | 41 + version3/cpp/rom_field_F256PMW.cpp | 36 + version3/cpp/rom_field_F384PM.cpp | 35 + version3/cpp/rom_field_F512PM.cpp | 35 + version3/cpp/rom_field_FP256BN.cpp | 45 + version3/cpp/rom_field_FP512BN.cpp | 47 + version3/cpp/rom_field_GOLDILOCKS.cpp | 38 + version3/cpp/rom_field_HIFIVE.cpp | 35 + version3/cpp/rom_field_NIST256.cpp | 35 + version3/cpp/rom_field_NIST384.cpp | 35 + version3/cpp/rom_field_NIST521.cpp | 34 + version3/cpp/rom_field_SECP256K1.cpp | 44 + version3/cpp/rsa.cpp | 164 + version3/cpp/rsa.h | 106 + version3/cpp/rsa_support.cpp | 239 ++ version3/cpp/rsa_support.h | 49 + version3/cpp/testall.cpp | 1643 ++++++++++ version3/cpp/testbls.cpp | 199 ++ version3/cpp/testnhs.cpp | 73 + version3/cpp/x509.cpp | 1097 +++++++ version3/cpp/x509.h | 115 + version3/curves.txt | 35 + version3/go/AES.go | 697 +++++ version3/go/ARCH32.go | 27 + version3/go/ARCH64.go | 26 + version3/go/BIG32.go | 988 ++++++ version3/go/BIG64.go | 931 ++++++ version3/go/BLS.go | 84 + version3/go/BLS192.go | 84 + version3/go/BLS256.go | 84 + version3/go/BenchtestALL.go | 881 ++++++ version3/go/CONFIG_BIG.go | 16 + version3/go/CONFIG_CURVE.go | 41 + version3/go/CONFIG_FF.go | 14 + version3/go/CONFIG_FIELD.go | 20 + version3/go/DBIG.go | 278 ++ version3/go/ECDH.go | 702 +++++ version3/go/ECP.go | 1220 ++++++++ version3/go/ECP2.go | 719 +++++ version3/go/ECP4.go | 822 +++++ version3/go/ECP8.go | 1000 ++++++ version3/go/FF32.go | 948 ++++++ version3/go/FF64.go | 948 ++++++ version3/go/FP.go | 593 ++++ version3/go/FP12.go | 786 +++++ version3/go/FP16.go | 569 ++++ version3/go/FP2.go | 359 +++ version3/go/FP24.go | 961 ++++++ version3/go/FP4.go | 639 ++++ version3/go/FP48.go | 1263 ++++++++ version3/go/FP8.go | 659 ++++ version3/go/GCM.go | 439 +++ version3/go/HASH256.go | 215 ++ version3/go/HASH384.go | 229 ++ version3/go/HASH512.go | 229 ++ version3/go/MPIN.go | 834 +++++ version3/go/MPIN192.go | 852 +++++ version3/go/MPIN256.go | 885 ++++++ version3/go/NHS.go | 557 ++++ version3/go/PAIR.go | 666 ++++ version3/go/PAIR192.go | 500 +++ version3/go/PAIR256.go | 575 ++++ version3/go/RAND.go | 178 ++ version3/go/ROM_ANSSI_32.go | 40 + version3/go/ROM_ANSSI_64.go | 40 + version3/go/ROM_BLS24_32.go | 57 + version3/go/ROM_BLS24_64.go | 56 + version3/go/ROM_BLS381_32.go | 54 + version3/go/ROM_BLS381_64.go | 54 + version3/go/ROM_BLS383_32.go | 55 + version3/go/ROM_BLS383_64.go | 55 + version3/go/ROM_BLS461_32.go | 52 + version3/go/ROM_BLS461_64.go | 52 + version3/go/ROM_BLS48_32.go | 64 + version3/go/ROM_BLS48_64.go | 65 + version3/go/ROM_BN254CX_32.go | 54 + version3/go/ROM_BN254CX_64.go | 54 + version3/go/ROM_BN254_32.go | 54 + version3/go/ROM_BN254_64.go | 54 + version3/go/ROM_BRAINPOOL_32.go | 42 + version3/go/ROM_BRAINPOOL_64.go | 42 + version3/go/ROM_C25519_32.go | 40 + version3/go/ROM_C25519_64.go | 40 + version3/go/ROM_C41417_32.go | 40 + version3/go/ROM_C41417_64.go | 40 + version3/go/ROM_ED25519_32.go | 40 + version3/go/ROM_ED25519_64.go | 40 + version3/go/ROM_FP256BN_32.go | 52 + version3/go/ROM_FP256BN_64.go | 52 + version3/go/ROM_FP512BN_32.go | 53 + version3/go/ROM_FP512BN_64.go | 52 + version3/go/ROM_GOLDILOCKS_32.go | 40 + version3/go/ROM_GOLDILOCKS_64.go | 40 + version3/go/ROM_HIFIVE_32.go | 40 + version3/go/ROM_HIFIVE_64.go | 40 + version3/go/ROM_NIST256_32.go | 40 + version3/go/ROM_NIST256_64.go | 40 + version3/go/ROM_NIST384_32.go | 40 + version3/go/ROM_NIST384_64.go | 40 + version3/go/ROM_NIST521_32.go | 40 + version3/go/ROM_NIST521_64.go | 40 + version3/go/ROM_NUMS256E_32.go | 40 + version3/go/ROM_NUMS256E_64.go | 40 + version3/go/ROM_NUMS256W_32.go | 40 + version3/go/ROM_NUMS256W_64.go | 40 + version3/go/ROM_NUMS384E_32.go | 40 + version3/go/ROM_NUMS384E_64.go | 40 + version3/go/ROM_NUMS384W_32.go | 40 + version3/go/ROM_NUMS384W_64.go | 40 + version3/go/ROM_NUMS512E_32.go | 40 + version3/go/ROM_NUMS512E_64.go | 40 + version3/go/ROM_NUMS512W_32.go | 40 + version3/go/ROM_NUMS512W_64.go | 40 + version3/go/ROM_SEC256K1_64.go | 39 + version3/go/ROM_SECP256K1_32.go | 43 + version3/go/ROM_SECP256K1_64.go | 43 + version3/go/RSA.go | 453 +++ version3/go/SHA3.go | 262 ++ version3/go/TestALL.go | 1410 +++++++++ version3/go/TestBLS.go | 185 ++ version3/go/TestNHS.go | 68 + version3/go/config32.py | 374 +++ version3/go/config64.py | 374 +++ version3/go/readme.txt | 56 + version3/java/AES.java | 695 +++++ version3/java/BIG32.java | 928 ++++++ version3/java/BIG64.java | 927 ++++++ version3/java/BLS.java | 88 + version3/java/BLS192.java | 88 + version3/java/BLS256.java | 88 + version3/java/CONFIG_BIG.java | 6 + version3/java/CONFIG_CURVE.java | 30 + version3/java/CONFIG_FF.java | 6 + version3/java/CONFIG_FIELD.java | 14 + version3/java/DBIG32.java | 267 ++ version3/java/DBIG64.java | 265 ++ version3/java/ECDH.java | 582 ++++ version3/java/ECP.java | 1009 ++++++ version3/java/ECP2.java | 650 ++++ version3/java/ECP4.java | 736 +++++ version3/java/ECP8.java | 899 ++++++ version3/java/FF32.java | 1012 ++++++ version3/java/FF64.java | 1011 ++++++ version3/java/FP12.java | 720 +++++ version3/java/FP16.java | 556 ++++ version3/java/FP2.java | 350 +++ version3/java/FP24.java | 850 +++++ version3/java/FP32.java | 625 ++++ version3/java/FP4.java | 625 ++++ version3/java/FP48.java | 1058 +++++++ version3/java/FP64.java | 626 ++++ version3/java/FP8.java | 643 ++++ version3/java/GCM.java | 376 +++ version3/java/HASH256.java | 218 ++ version3/java/HASH384.java | 229 ++ version3/java/HASH512.java | 232 ++ version3/java/MPIN.java | 768 +++++ version3/java/MPIN192.java | 775 +++++ version3/java/MPIN256.java | 781 +++++ version3/java/NHS.java | 577 ++++ version3/java/OLDECP.java | 1044 +++++++ version3/java/OLDECP2.java | 781 +++++ version3/java/PAIR.java | 721 +++++ version3/java/PAIR192.java | 535 ++++ version3/java/PAIR256.java | 610 ++++ version3/java/RAND.java | 163 + version3/java/README.md | 30 + version3/java/ROM_ANSSI_32.java | 42 + version3/java/ROM_ANSSI_64.java | 43 + version3/java/ROM_BLS24_32.java | 60 + version3/java/ROM_BLS24_64.java | 60 + version3/java/ROM_BLS381_32.java | 57 + version3/java/ROM_BLS381_64.java | 57 + version3/java/ROM_BLS383_32.java | 58 + version3/java/ROM_BLS383_64.java | 55 + version3/java/ROM_BLS461_32.java | 56 + version3/java/ROM_BLS461_64.java | 56 + version3/java/ROM_BLS48_32.java | 68 + version3/java/ROM_BLS48_64.java | 68 + version3/java/ROM_BN254CX_32.java | 57 + version3/java/ROM_BN254CX_64.java | 58 + version3/java/ROM_BN254_32.java | 55 + version3/java/ROM_BN254_64.java | 55 + version3/java/ROM_BRAINPOOL_32.java | 44 + version3/java/ROM_BRAINPOOL_64.java | 43 + version3/java/ROM_C25519_32.java | 41 + version3/java/ROM_C25519_64.java | 42 + version3/java/ROM_C41417_32.java | 41 + version3/java/ROM_C41417_64.java | 44 + version3/java/ROM_ED25519_32.java | 41 + version3/java/ROM_ED25519_64.java | 43 + version3/java/ROM_FP256BN_32.java | 56 + version3/java/ROM_FP256BN_64.java | 55 + version3/java/ROM_FP512BN_32.java | 55 + version3/java/ROM_FP512BN_64.java | 56 + version3/java/ROM_GOLDILOCKS_32.java | 43 + version3/java/ROM_GOLDILOCKS_64.java | 44 + version3/java/ROM_HIFIVE_32.java | 42 + version3/java/ROM_HIFIVE_64.java | 43 + version3/java/ROM_NIST256_32.java | 45 + version3/java/ROM_NIST256_64.java | 43 + version3/java/ROM_NIST384_32.java | 43 + version3/java/ROM_NIST384_64.java | 44 + version3/java/ROM_NIST521_32.java | 43 + version3/java/ROM_NIST521_64.java | 44 + version3/java/ROM_NUMS256E_32.java | 39 + version3/java/ROM_NUMS256E_64.java | 42 + version3/java/ROM_NUMS256W_32.java | 44 + version3/java/ROM_NUMS256W_64.java | 45 + version3/java/ROM_NUMS384E_32.java | 40 + version3/java/ROM_NUMS384E_64.java | 40 + version3/java/ROM_NUMS384W_32.java | 43 + version3/java/ROM_NUMS384W_64.java | 55 + version3/java/ROM_NUMS512E_32.java | 40 + version3/java/ROM_NUMS512E_64.java | 40 + version3/java/ROM_NUMS512W_32.java | 40 + version3/java/ROM_NUMS512W_64.java | 41 + version3/java/ROM_SECP256K1_32.java | 45 + version3/java/ROM_SECP256K1_64.java | 43 + version3/java/RSA.java | 369 +++ version3/java/SHA3.java | 255 ++ version3/java/TestBLS.java | 75 + version3/java/TestBLS192.java | 75 + version3/java/TestBLS256.java | 76 + version3/java/TestECDH.java | 192 ++ version3/java/TestMPIN.java | 297 ++ version3/java/TestMPIN192.java | 297 ++ version3/java/TestMPIN256.java | 297 ++ version3/java/TestNHS.java | 70 + version3/java/TestRSA.java | 111 + version3/java/TesttimeECDH.java | 103 + version3/java/TesttimeMPIN.java | 195 ++ version3/java/TesttimeMPIN192.java | 195 ++ version3/java/TesttimeMPIN256.java | 195 ++ version3/java/TesttimeRSA.java | 99 + version3/java/config32.py | 408 +++ version3/java/config64.py | 408 +++ version3/java/pom.xml | 19 + version3/java/private_key.java | 16 + version3/java/public_key.java | 14 + version3/js/BenchtestALL.html | 1079 +++++++ version3/js/TestALL.html | 1530 +++++++++ version3/js/TestBLS.html | 249 ++ version3/js/TestNHS.html | 56 + version3/js/aes.js | 705 +++++ version3/js/big.js | 1448 +++++++++ version3/js/bls.js | 112 + version3/js/bls192.js | 112 + version3/js/bls256.js | 112 + version3/js/ctx.js | 615 ++++ version3/js/ecdh.js | 743 +++++ version3/js/ecp.js | 1337 ++++++++ version3/js/ecp2.js | 780 +++++ version3/js/ecp4.js | 839 +++++ version3/js/ecp8.js | 1045 +++++++ version3/js/ff.js | 1001 ++++++ version3/js/fp.js | 661 ++++ version3/js/fp12.js | 794 +++++ version3/js/fp16.js | 568 ++++ version3/js/fp2.js | 393 +++ version3/js/fp24.js | 962 ++++++ version3/js/fp4.js | 637 ++++ version3/js/fp48.js | 1270 ++++++++ version3/js/fp8.js | 647 ++++ version3/js/gcm.js | 428 +++ version3/js/hash256.js | 198 ++ version3/js/hash384.js | 275 ++ version3/js/hash512.js | 277 ++ version3/js/include.html | 25 + version3/js/mpin.js | 1004 ++++++ version3/js/mpin192.js | 1018 ++++++ version3/js/mpin256.js | 1051 +++++++ version3/js/nhs.js | 565 ++++ version3/js/pair.js | 732 +++++ version3/js/pair192.js | 536 ++++ version3/js/pair256.js | 613 ++++ version3/js/rand.js | 184 ++ version3/js/readme.txt | 48 + version3/js/rom_curve.js | 1127 +++++++ version3/js/rom_field.js | 425 +++ version3/js/rsa.js | 515 +++ version3/js/sha3.js | 264 ++ version3/js/uint64.js | 61 + version3/python/big.py | 159 + version3/python/bls.py | 61 + version3/python/bls381.py | 40 + version3/python/bls383.py | 40 + version3/python/bn254.py | 38 + version3/python/bn254cx.py | 39 + version3/python/c25519.py | 19 + version3/python/config.py | 178 ++ version3/python/constants.py | 17 + version3/python/ecdh.py | 162 + version3/python/ecp.py | 634 ++++ version3/python/ecp2.py | 290 ++ version3/python/ed25519.py | 19 + version3/python/fp.py | 97 + version3/python/fp12.py | 314 ++ version3/python/fp2.py | 153 + version3/python/fp4.py | 144 + version3/python/goldilocks.py | 19 + version3/python/mpin.py | 227 ++ version3/python/nist256.py | 19 + version3/python/nist384.py | 19 + version3/python/nist521.py | 20 + version3/python/pair.py | 317 ++ version3/python/readme.txt | 43 + version3/python/sec256k1.py | 19 + version3/python/test.py | 141 + version3/readme.txt | 61 + version3/romgen.cpp | 1561 ++++++++++ version3/rust/.gitignore | 5 + version3/rust/BenchtestALL.rs | 957 ++++++ version3/rust/Cargo.toml | 46 + version3/rust/TestALL.rs | 1459 +++++++++ version3/rust/TestBLS.rs | 190 ++ version3/rust/TestNHS.rs | 77 + version3/rust/readme.md | 83 + version3/rust/src/aes.rs | 752 +++++ version3/rust/src/arch/arch32.rs | 22 + version3/rust/src/arch/arch64.rs | 22 + version3/rust/src/big.rs | 1070 +++++++ version3/rust/src/bls.rs | 87 + version3/rust/src/bls192.rs | 87 + version3/rust/src/bls256.rs | 87 + version3/rust/src/dbig.rs | 285 ++ version3/rust/src/ecdh.rs | 744 +++++ version3/rust/src/ecp.rs | 1268 ++++++++ version3/rust/src/ecp2.rs | 786 +++++ version3/rust/src/ecp4.rs | 866 ++++++ version3/rust/src/ecp8.rs | 1103 +++++++ version3/rust/src/ff.rs | 1058 +++++++ version3/rust/src/fp.rs | 715 +++++ version3/rust/src/fp12.rs | 859 +++++ version3/rust/src/fp16.rs | 585 ++++ version3/rust/src/fp2.rs | 407 +++ version3/rust/src/fp24.rs | 1021 ++++++ version3/rust/src/fp4.rs | 680 ++++ version3/rust/src/fp48.rs | 1362 ++++++++ version3/rust/src/fp8.rs | 683 ++++ version3/rust/src/gcm.rs | 481 +++ version3/rust/src/hash256.rs | 216 ++ version3/rust/src/hash384.rs | 288 ++ version3/rust/src/hash512.rs | 288 ++ version3/rust/src/lib.rs | 561 ++++ version3/rust/src/mpin.rs | 945 ++++++ version3/rust/src/mpin192.rs | 960 ++++++ version3/rust/src/mpin256.rs | 993 ++++++ version3/rust/src/nhs.rs | 705 +++++ version3/rust/src/pair.rs | 666 ++++ version3/rust/src/pair192.rs | 532 ++++ version3/rust/src/pair256.rs | 650 ++++ version3/rust/src/rand.rs | 180 ++ version3/rust/src/roms/rom_anssi_32.rs | 72 + version3/rust/src/roms/rom_anssi_64.rs | 90 + version3/rust/src/roms/rom_bls24_32.rs | 239 ++ version3/rust/src/roms/rom_bls24_64.rs | 287 ++ version3/rust/src/roms/rom_bls381_32.rs | 208 ++ version3/rust/src/roms/rom_bls381_64.rs | 210 ++ version3/rust/src/roms/rom_bls383_32.rs | 206 ++ version3/rust/src/roms/rom_bls383_64.rs | 217 ++ version3/rust/src/roms/rom_bls461_32.rs | 208 ++ version3/rust/src/roms/rom_bls461_64.rs | 231 ++ version3/rust/src/roms/rom_bls48_32.rs | 308 ++ version3/rust/src/roms/rom_bls48_64.rs | 400 +++ version3/rust/src/roms/rom_bn254CX_32.rs | 182 ++ version3/rust/src/roms/rom_bn254CX_64.rs | 241 ++ version3/rust/src/roms/rom_bn254_32.rs | 170 + version3/rust/src/roms/rom_bn254_64.rs | 207 ++ version3/rust/src/roms/rom_brainpool_32.rs | 73 + version3/rust/src/roms/rom_brainpool_64.rs | 91 + version3/rust/src/roms/rom_c25519_32.rs | 58 + version3/rust/src/roms/rom_c25519_64.rs | 60 + version3/rust/src/roms/rom_c41417_32.rs | 70 + version3/rust/src/roms/rom_c41417_64.rs | 77 + version3/rust/src/roms/rom_ed25519_32.rs | 67 + version3/rust/src/roms/rom_ed25519_64.rs | 78 + version3/rust/src/roms/rom_fp256bn_32.rs | 179 ++ version3/rust/src/roms/rom_fp256bn_64.rs | 232 ++ version3/rust/src/roms/rom_fp512bn_32.rs | 248 ++ version3/rust/src/roms/rom_fp512bn_64.rs | 481 +++ version3/rust/src/roms/rom_goldilocks_32.rs | 72 + version3/rust/src/roms/rom_goldilocks_64.rs | 98 + version3/rust/src/roms/rom_hifive_32.rs | 67 + version3/rust/src/roms/rom_hifive_64.rs | 76 + version3/rust/src/roms/rom_nist256_32.rs | 73 + version3/rust/src/roms/rom_nist256_64.rs | 85 + version3/rust/src/roms/rom_nist384_32.rs | 75 + version3/rust/src/roms/rom_nist384_64.rs | 103 + version3/rust/src/roms/rom_nist521_32.rs | 78 + version3/rust/src/roms/rom_nist521_64.rs | 103 + version3/rust/src/roms/rom_nums256e_32.rs | 70 + version3/rust/src/roms/rom_nums256e_64.rs | 79 + version3/rust/src/roms/rom_nums256w_32.rs | 65 + version3/rust/src/roms/rom_nums256w_64.rs | 77 + version3/rust/src/roms/rom_nums384e_32.rs | 73 + version3/rust/src/roms/rom_nums384e_64.rs | 94 + version3/rust/src/roms/rom_nums384w_32.rs | 73 + version3/rust/src/roms/rom_nums384w_64.rs | 93 + version3/rust/src/roms/rom_nums512e_32.rs | 78 + version3/rust/src/roms/rom_nums512e_64.rs | 103 + version3/rust/src/roms/rom_nums512w_32.rs | 76 + version3/rust/src/roms/rom_nums512w_64.rs | 93 + version3/rust/src/roms/rom_rsa2048_32.rs | 3 + version3/rust/src/roms/rom_rsa2048_64.rs | 3 + version3/rust/src/roms/rom_rsa3072_32.rs | 3 + version3/rust/src/roms/rom_rsa3072_64.rs | 3 + version3/rust/src/roms/rom_rsa4096_32.rs | 3 + version3/rust/src/roms/rom_rsa4096_64.rs | 3 + version3/rust/src/roms/rom_secp256k1_32.rs | 69 + version3/rust/src/roms/rom_secp256k1_64.rs | 80 + version3/rust/src/rsa.rs | 469 +++ version3/rust/src/sha3.rs | 270 ++ version3/rust/src/types.rs | 44 + version3/swift/BenchtestALL.swift | 887 ++++++ version3/swift/TestALL.swift | 1427 +++++++++ version3/swift/TestBLS.swift | 174 ++ version3/swift/TestNHS.swift | 70 + version3/swift/aes.swift | 641 ++++ version3/swift/big.swift | 1017 ++++++ version3/swift/bls.swift | 95 + version3/swift/bls192.swift | 95 + version3/swift/bls256.swift | 95 + version3/swift/config32.py | 364 +++ version3/swift/config64.py | 362 +++ version3/swift/config_big.swift | 30 + version3/swift/config_curve.swift | 24 + version3/swift/config_ff.swift | 11 + version3/swift/config_field.swift | 16 + version3/swift/dbig.swift | 268 ++ version3/swift/ecdh.swift | 563 ++++ version3/swift/ecp.swift | 1014 ++++++ version3/swift/ecp2.swift | 619 ++++ version3/swift/ecp4.swift | 721 +++++ version3/swift/ecp8.swift | 883 ++++++ version3/swift/ff.swift | 981 ++++++ version3/swift/fp.swift | 592 ++++ version3/swift/fp12.swift | 719 +++++ version3/swift/fp16.swift | 565 ++++ version3/swift/fp2.swift | 354 +++ version3/swift/fp24.swift | 850 +++++ version3/swift/fp4.swift | 621 ++++ version3/swift/fp48.swift | 1068 +++++++ version3/swift/fp8.swift | 649 ++++ version3/swift/gcm.swift | 326 ++ version3/swift/hash256.swift | 188 ++ version3/swift/hash384.swift | 198 ++ version3/swift/hash512.swift | 198 ++ version3/swift/mpin.swift | 751 +++++ version3/swift/mpin192.swift | 759 +++++ version3/swift/mpin256.swift | 764 +++++ version3/swift/nhs.swift | 550 ++++ version3/swift/pair.swift | 686 ++++ version3/swift/pair192.swift | 503 +++ version3/swift/pair256.swift | 578 ++++ version3/swift/rand.swift | 136 + version3/swift/readme.txt | 50 + version3/swift/rom_anssi.swift | 73 + version3/swift/rom_bls24.swift | 101 + version3/swift/rom_bls381.swift | 100 + version3/swift/rom_bls383.swift | 97 + version3/swift/rom_bls461.swift | 102 + version3/swift/rom_bls48.swift | 116 + version3/swift/rom_bn254.swift | 99 + version3/swift/rom_bn254CX.swift | 102 + version3/swift/rom_brainpool.swift | 74 + version3/swift/rom_c25519.swift | 72 + version3/swift/rom_c41417.swift | 71 + version3/swift/rom_ed25519.swift | 72 + version3/swift/rom_fp256bn.swift | 98 + version3/swift/rom_fp512bn.swift | 101 + version3/swift/rom_goldilocks.swift | 70 + version3/swift/rom_hifive.swift | 72 + version3/swift/rom_nist256.swift | 70 + version3/swift/rom_nist384.swift | 70 + version3/swift/rom_nist521.swift | 71 + version3/swift/rom_nums256e.swift | 72 + version3/swift/rom_nums256w.swift | 72 + version3/swift/rom_nums384e.swift | 72 + version3/swift/rom_nums384w.swift | 73 + version3/swift/rom_nums512e.swift | 75 + version3/swift/rom_nums512w.swift | 72 + version3/swift/rom_secp256k1.swift | 70 + version3/swift/rsa.swift | 390 +++ version3/swift/sha3.swift | 264 ++ version3/version22/amcl22.pdf | Bin 0 -> 419918 bytes version3/version22/bigtobig.cpp | 292 ++ version3/version22/blsgen.cpp | 194 ++ version3/version22/bngen.cpp | 251 ++ version3/version22/c/CARSK.pem | 54 + version3/version22/c/aes.c | 702 +++++ version3/version22/c/amcl.h | 2935 ++++++++++++++++++ version3/version22/c/arch.h | 119 + version3/version22/c/benchtest_ec.c | 212 ++ version3/version22/c/benchtest_pair.c | 257 ++ version3/version22/c/big.c | 1525 +++++++++ version3/version22/c/build_ec | 22 + version3/version22/c/build_ec.bat | 22 + version3/version22/c/build_pair | 27 + version3/version22/c/build_pair.bat | 27 + version3/version22/c/ca.crt | 23 + version3/version22/c/eccert.pem | 17 + version3/version22/c/ecdh.c | 751 +++++ version3/version22/c/ecdh.h | 206 ++ version3/version22/c/ecp.c | 1176 +++++++ version3/version22/c/ecp2.c | 696 +++++ version3/version22/c/faster.c | 98 + version3/version22/c/faster.txt | 25 + version3/version22/c/ff.c | 1150 +++++++ version3/version22/c/fp.c | 608 ++++ version3/version22/c/fp12.c | 727 +++++ version3/version22/c/fp2.c | 435 +++ version3/version22/c/fp4.c | 651 ++++ version3/version22/c/gcm.c | 411 +++ version3/version22/c/hash.c | 422 +++ version3/version22/c/maxstack.c | 62 + version3/version22/c/mpin.c | 1212 ++++++++ version3/version22/c/mpin.h | 408 +++ version3/version22/c/oct.c | 428 +++ version3/version22/c/pair.c | 828 +++++ version3/version22/c/rand.c | 172 + version3/version22/c/randapi.c | 15 + version3/version22/c/randapi.h | 20 + version3/version22/c/readme.txt | 77 + version3/version22/c/rom.c | 1206 +++++++ version3/version22/c/rsa.c | 394 +++ version3/version22/c/rsa.h | 99 + version3/version22/c/testecdh.c | 207 ++ version3/version22/c/testmpin.c | 313 ++ version3/version22/c/testrsa.c | 104 + version3/version22/c/x509.c | 1079 +++++++ version3/version22/c/x509.h | 113 + version3/version22/check.cpp | 100 + version3/version22/cs/readme.txt | 36 + version3/version22/ecgen.cpp | 125 + version3/version22/go/AES.go | 634 ++++ version3/version22/go/BIG.go | 850 +++++ version3/version22/go/BenchtestEC.go | 154 + version3/version22/go/BenchtestPAIR.go | 206 ++ version3/version22/go/DBIG.go | 256 ++ version3/version22/go/ECDH.go | 547 ++++ version3/version22/go/ECP.go | 893 ++++++ version3/version22/go/ECP2.go | 568 ++++ version3/version22/go/FF.go | 905 ++++++ version3/version22/go/FP.go | 279 ++ version3/version22/go/FP12.go | 551 ++++ version3/version22/go/FP2.go | 300 ++ version3/version22/go/FP4.go | 479 +++ version3/version22/go/GCM.go | 337 ++ version3/version22/go/HASH256.go | 192 ++ version3/version22/go/HASH384.go | 204 ++ version3/version22/go/HASH512.go | 204 ++ version3/version22/go/MPIN.go | 769 +++++ version3/version22/go/PAIR.go | 641 ++++ version3/version22/go/RAND.go | 153 + version3/version22/go/ROM32.go | 825 +++++ version3/version22/go/ROM64.go | 826 +++++ version3/version22/go/RSA.go | 363 +++ version3/version22/go/TestECDH.go | 164 + version3/version22/go/TestMPIN.go | 241 ++ version3/version22/go/TestRSA.go | 98 + version3/version22/go/readme.txt | 50 + version3/version22/java/AES.java | 695 +++++ version3/version22/java/BIG32.java | 1016 ++++++ version3/version22/java/BIG64.java | 1040 +++++++ version3/version22/java/BenchtestEC.java | 160 + version3/version22/java/BenchtestPAIR.java | 208 ++ version3/version22/java/DBIG32.java | 308 ++ version3/version22/java/DBIG64.java | 306 ++ version3/version22/java/ECDH.java | 581 ++++ version3/version22/java/ECP.java | 917 ++++++ version3/version22/java/ECP2.java | 624 ++++ version3/version22/java/FF.java | 941 ++++++ version3/version22/java/FP.java | 345 ++ version3/version22/java/FP12.java | 641 ++++ version3/version22/java/FP2.java | 393 +++ version3/version22/java/FP4.java | 584 ++++ version3/version22/java/GCM.java | 374 +++ version3/version22/java/HASH256.java | 216 ++ version3/version22/java/HASH384.java | 227 ++ version3/version22/java/HASH512.java | 229 ++ version3/version22/java/MPIN.java | 853 +++++ version3/version22/java/PAIR.java | 685 ++++ version3/version22/java/RAND.java | 161 + version3/version22/java/ROM32.java | 714 +++++ version3/version22/java/ROM64.java | 703 +++++ version3/version22/java/RSA.java | 362 +++ version3/version22/java/TestECDH.java | 179 ++ version3/version22/java/TestMPIN.java | 270 ++ version3/version22/java/TestRSA.java | 92 + version3/version22/java/readme.txt | 61 + version3/version22/java/rsa_private_key.java | 13 + version3/version22/java/rsa_public_key.java | 11 + version3/version22/js/AES.js | 634 ++++ version3/version22/js/BIG.js | 1037 +++++++ version3/version22/js/BenchtestEC.html | 162 + version3/version22/js/BenchtestPAIR.html | 226 ++ version3/version22/js/DBIG.js | 284 ++ version3/version22/js/ECDH.js | 585 ++++ version3/version22/js/ECP.js | 903 ++++++ version3/version22/js/ECP2.js | 604 ++++ version3/version22/js/FF.js | 947 ++++++ version3/version22/js/FP.js | 360 +++ version3/version22/js/FP12.js | 558 ++++ version3/version22/js/FP2.js | 321 ++ version3/version22/js/FP4.js | 501 +++ version3/version22/js/GCM.js | 305 ++ version3/version22/js/HASH256.js | 180 ++ version3/version22/js/HASH384.js | 238 ++ version3/version22/js/HASH512.js | 236 ++ version3/version22/js/MPIN.js | 933 ++++++ version3/version22/js/PAIR.js | 650 ++++ version3/version22/js/RAND.js | 148 + version3/version22/js/ROM.js | 716 +++++ version3/version22/js/RSA.js | 392 +++ version3/version22/js/TestECDH.html | 143 + version3/version22/js/TestMPIN.html | 330 ++ version3/version22/js/TestRSA.html | 115 + version3/version22/js/UInt64.js | 54 + version3/version22/js/readme.txt | 41 + version3/version22/rust/.gitignore | 5 + version3/version22/rust/Cargo.toml | 24 + version3/version22/rust/readme.txt | 56 + version3/version22/rust/src/aes.rs | 628 ++++ version3/version22/rust/src/big.rs | 1217 ++++++++ version3/version22/rust/src/dbig.rs | 249 ++ version3/version22/rust/src/ecdh.rs | 585 ++++ version3/version22/rust/src/ecp.rs | 955 ++++++ version3/version22/rust/src/ecp2.rs | 677 ++++ version3/version22/rust/src/ff.rs | 944 ++++++ version3/version22/rust/src/fp.rs | 349 +++ version3/version22/rust/src/fp12.rs | 628 ++++ version3/version22/rust/src/fp2.rs | 366 +++ version3/version22/rust/src/fp4.rs | 563 ++++ version3/version22/rust/src/gcm.rs | 356 +++ version3/version22/rust/src/hash256.rs | 182 ++ version3/version22/rust/src/hash384.rs | 188 ++ version3/version22/rust/src/hash512.rs | 189 ++ version3/version22/rust/src/lib.rs | 36 + version3/version22/rust/src/mpin.rs | 768 +++++ version3/version22/rust/src/pair.rs | 674 ++++ version3/version22/rust/src/rand.rs | 147 + version3/version22/rust/src/rom32.rs | 349 +++ version3/version22/rust/src/rom64.rs | 348 +++ version3/version22/rust/src/rsa.rs | 372 +++ version3/version22/rust/tests/benchtest_ec.rs | 185 ++ version3/version22/rust/tests/benchtest_pair.rs | 245 ++ version3/version22/rust/tests/test_ecdh.rs | 180 ++ version3/version22/rust/tests/test_mpin.rs | 217 ++ version3/version22/rust/tests/test_rsa.rs | 109 + version3/version22/swift/BenchtestEC.swift | 161 + version3/version22/swift/BenchtestPAIR.swift | 206 ++ version3/version22/swift/TestECDH.swift | 167 + version3/version22/swift/TestMPIN.swift | 259 ++ version3/version22/swift/TestRSA.swift | 100 + version3/version22/swift/aes.swift | 639 ++++ version3/version22/swift/big.swift | 1169 +++++++ version3/version22/swift/dbig.swift | 265 ++ version3/version22/swift/ecdh.swift | 587 ++++ version3/version22/swift/ecp.swift | 923 ++++++ version3/version22/swift/ecp2.swift | 618 ++++ version3/version22/swift/ff.swift | 927 ++++++ version3/version22/swift/fp.swift | 309 ++ version3/version22/swift/fp12.swift | 584 ++++ version3/version22/swift/fp2.swift | 329 ++ version3/version22/swift/fp4.swift | 517 +++ version3/version22/swift/gcm.swift | 326 ++ version3/version22/swift/hash256.swift | 188 ++ version3/version22/swift/hash384.swift | 198 ++ version3/version22/swift/hash512.swift | 198 ++ version3/version22/swift/main.swift | 13 + version3/version22/swift/mpin.swift | 833 +++++ version3/version22/swift/pair.swift | 592 ++++ version3/version22/swift/rand.swift | 131 + version3/version22/swift/readme.txt | 135 + version3/version22/swift/rom32.swift | 645 ++++ version3/version22/swift/rom64.swift | 258 ++ version3/version22/swift/rsa.swift | 400 +++ version3/wasm/config.py | 717 +++++ version3/wasm/readme.txt | 73 + 1125 files changed, 385451 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/blob/c25f9e5c/LICENSE-2.0.TXT ---------------------------------------------------------------------- diff --git a/LICENSE-2.0.TXT b/LICENSE-2.0.TXT new file mode 100644 index 0000000..9b5e401 --- /dev/null +++ b/LICENSE-2.0.TXT @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/blob/c25f9e5c/NOTICE.txt ---------------------------------------------------------------------- diff --git a/NOTICE.txt b/NOTICE.txt new file mode 100644 index 0000000..2e6c028 --- /dev/null +++ b/NOTICE.txt @@ -0,0 +1,5 @@ +Apache Milagro Crypto Libraries +Copyright 2016 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/blob/c25f9e5c/readme.txt ---------------------------------------------------------------------- diff --git a/readme.txt b/readme.txt new file mode 100644 index 0000000..0726b16 --- /dev/null +++ b/readme.txt @@ -0,0 +1,61 @@ +The Apache Milagro Cryptographic Library + +Note that the AMCL currently comes in two versions, version 2.2 +and version 3.2 + +--------------------------------------- + +AMCL v2.2 is presented in what might be called a pre-library state. + +In the various supported languages the source code is made available, +but it is not organised into rigid packages/crates/jars/whatever +It is expected that the consumer will themselves take this final step, +depending on the exact requirements of their project. + +Note that version 2.2 is no longer supported. + +----------------------------------- + +AMCL v3.2 incorporates many minor improvements + +Python version +Web Assembly support +Improved side channel resistance +Faster Swift code +Better Rust build system +Improved modular inversion algorithm +General speed optimizations +Improved Javascript testbed +More curves supported +New BLS signature API +Post quantum New Hope Implementation + +----------------------------------- + +AMCL v3.1 uses a standard Python 3 script to build libraries in all +supported languages. New users should use this version. + +The main improvement is that AMCL v3 can optionally simultaneously support +multiple elliptic curves and RSA key sizes within a single appliction. + +Note that AMCL is largely configured at compile time. In version 3 this +configuration is handled by the Python script. + +AMCL is available in 32-bit and 64-bit versions in most languages. Limited +support for 16-bit processors is provided by the C version. + +Now languages like to remain "standard" irrespective of the underlying +hardware. However when it comes to optimal performance, it is impossible +to remain architecture-agnostic. If a processor supports 64-bit +instructions that operate on 64-bit registers, it will be a waste not to +use them. Therefore the 64-bit language versions should always be used +on 64-bit processors. + +Version 3.1 is a major "under the hood" upgrade. Field arithmetic is +performed using ideas from http://eprint.iacr.org/2017/437 to ensure +that critical calculations are performed in constant time. This strongly +mitigates against side-channel attacks. Exception-free formulae are +now used for Weierstrass elliptic curves. A new standardised script +builds for the same set of curves across all languages. + +--------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-milagro-crypto/blob/c25f9e5c/version22/amcl22.pdf ---------------------------------------------------------------------- diff --git a/version22/amcl22.pdf b/version22/amcl22.pdf new file mode 100644 index 0000000..b5ba27f Binary files /dev/null and b/version22/amcl22.pdf differ
