├── LICENSE.md ├── .github └── CODE_OF_CONDUCT.md ├── SECURITY.md ├── go.mod ├── PERFORMANCE.md ├── cmd └── edgetk │ └── README.md ├── go.sum └── README.md /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2025, Pedro F. Albanese pedroalbanese@hotmail.com 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as contributors and maintainers pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. 8 | 9 | ## Our Standards 10 | 11 | Examples of behavior that contributes to a positive environment include: 12 | 13 | - Using welcoming and inclusive language 14 | - Being respectful of differing viewpoints and experiences 15 | - Giving and gracefully accepting constructive feedback 16 | - Showing empathy toward other community members 17 | 18 | Examples of unacceptable behavior include: 19 | 20 | - The use of sexualized language or imagery 21 | - Personal attacks or insults 22 | - Trolling or insulting comments 23 | - Public or private harassment 24 | - Publishing others’ private information without explicit permission 25 | 26 | ## Enforcement Responsibilities 27 | 28 | Project maintainers are responsible for clarifying and enforcing standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior they deem inappropriate. 29 | 30 | ## Scope 31 | 32 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. 33 | 34 | ## Enforcement 35 | 36 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the maintainers at: pedroalbanese@hotmail.com. All complaints will be reviewed and investigated promptly and fairly. 37 | 38 | ## Attribution 39 | 40 | This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1. 41 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Security Assurance 4 | 5 | The EDGETk toolkit was developed by a security engineer and includes over 140 widely recognized cryptographic algorithms. Despite not having undergone a formal third-party audit yet, its correctness and security posture can be reasonably assured based on several strong indicators: 6 | 7 | - **Interoperability with Standard Tools:** 8 | EDGETk is fully compatible with widely used cryptographic toolkits such as OpenSSL, LibreSSL, and GmSSL. This ensures that its key formats, ciphertexts, hashes, and digital signatures can be validated against independent implementations. 9 | 10 | - **Initialization Vector and Parameter Compatibility:** 11 | All implemented algorithms conform to the expected behavior defined in standard documentation. EDGETk consistently produces correct outputs when tested against standardized test vectors (e.g., NIST, ISO, GOST, SM series), demonstrating adherence to cryptographic specifications. 12 | 13 | - **Cross-Platform Determinism:** 14 | The toolkit has been tested on multiple architectures (x86, ARM) and operating systems (Linux, Windows, FreeBSD), consistently yielding identical outputs for the same inputs, which strongly supports implementation correctness. 15 | 16 | - **Protocol-Level Validation:** 17 | The TLS 1.3 and TLCP implementations have been tested in real-world scenarios and communicate successfully with compliant clients and servers, further reinforcing protocol-level correctness. 18 | 19 | While independent auditing remains an important future milestone, the high degree of compatibility, adherence to international standards, and deterministic behavior across platforms provide strong practical evidence of correctness and reliability in EDGETk's cryptographic implementations. 20 | 21 | ## Reporting a Vulnerability 22 | 23 | Please send a mail to pedroalbanese@hotmail.com when you found a security issue in EDGETk, even when you are not 100% certain 24 | that it is actually a security issue. Typically, you will receive an answer within a day or even within a few hours. 25 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/pedroalbanese/edgetk 2 | 3 | go 1.23.0 4 | 5 | toolchain go1.23.3 6 | 7 | require ( 8 | gitee.com/Trisia/gotlcp v1.3.17 9 | github.com/RyuaNerin/elliptic2 v1.0.0 10 | github.com/RyuaNerin/go-krypto v1.3.0 11 | github.com/deatil/go-cryptobin v1.0.4018 12 | github.com/emmansun/certinfo v0.1.0 13 | github.com/emmansun/gmsm v0.32.0 14 | github.com/emmansun/go-pkcs12 v0.3.0 15 | github.com/kasperdi/SPHINCSPLUS-golang v0.0.0-20231223193046-84468b93f7e9 16 | github.com/pedroalbanese/IGE-go v0.0.0-20140730194654-752bc7fd80fb 17 | github.com/pedroalbanese/anubis v0.0.1 18 | github.com/pedroalbanese/bash v0.0.0-20240917213542-359ea9ed86ee 19 | github.com/pedroalbanese/belt v0.0.0-20240917222837-2f97e6235d6c 20 | github.com/pedroalbanese/bign v0.0.0-20240918155826-90ccb6b122b9 21 | github.com/pedroalbanese/bip0340 v0.0.0-20250309175356-f4246d336869 22 | github.com/pedroalbanese/bls12381 v0.0.8 23 | github.com/pedroalbanese/bmw v0.0.0-20240608175405-99257887a774 24 | github.com/pedroalbanese/bn256 v0.0.0-20241211180157-f48a503b4cc5 25 | github.com/pedroalbanese/brainpool v0.0.0-20220826183126-be5c94625a31 26 | github.com/pedroalbanese/camellia v0.0.0-20220911183557-30cc05c20118 27 | github.com/pedroalbanese/cast256 v0.0.0-20240325185652-e35cf700d5fe 28 | github.com/pedroalbanese/cast5 v0.0.0-20220924202825-3e5c3c00277c 29 | github.com/pedroalbanese/ccm v0.0.0-20230716211039-49b744fc07d4 30 | github.com/pedroalbanese/cfb1 v0.0.1 31 | github.com/pedroalbanese/cfb8 v0.0.0 32 | github.com/pedroalbanese/cmac v0.0.0-20210429130952-a58975ec8f4c 33 | github.com/pedroalbanese/crypto v0.0.0-20230125215802-8b7e99ecbad3 34 | github.com/pedroalbanese/crypton v0.0.0-20240325185448-da9f3c02e89e 35 | github.com/pedroalbanese/crystals-go v0.0.0-20240315230756-81011b679705 36 | github.com/pedroalbanese/cubehash v0.0.0 37 | github.com/pedroalbanese/cubehash256 v0.0.0-20240403151932-00980243a56a 38 | github.com/pedroalbanese/curupira1 v0.0.0-gama 39 | github.com/pedroalbanese/curve448 v0.0.0-20240514173232-895b1c6c93a1 40 | github.com/pedroalbanese/e2 v0.0.0-20240325185507-eef2e0916dc5 41 | github.com/pedroalbanese/e521 v0.0.30 42 | github.com/pedroalbanese/eac v0.0.0-20250428171516-10a5a5e733cd 43 | github.com/pedroalbanese/eax v0.0.0-20240629182935-b915af1b69bb 44 | github.com/pedroalbanese/ecb v0.0.0-20220918174126-1a696b93ae2b 45 | github.com/pedroalbanese/ecgdsa v0.0.0-20250309172633-1e9ac31fec97 46 | github.com/pedroalbanese/echo v0.0.0-20240329160327-5e65f19de84b 47 | github.com/pedroalbanese/ecsdsa v0.0.0-20250309175503-d735dfab325a 48 | github.com/pedroalbanese/esch v0.0.0-20240403151441-bc287e464d49 49 | github.com/pedroalbanese/frp256v1 v0.0.3 50 | github.com/pedroalbanese/fugue v0.0.0-20240518170253-4e3af93fc75a 51 | github.com/pedroalbanese/gmac v0.0.0-20231030174635-9eb35b8b4542 52 | github.com/pedroalbanese/go-ascon v0.0.0-20240325185942-de83d7994a95 53 | github.com/pedroalbanese/go-chaskey v0.0.0-20230117155006-a9e41c18223c 54 | github.com/pedroalbanese/go-external-ip v0.0.0-20200601212049-c872357d968e 55 | github.com/pedroalbanese/go-grain v0.0.0-20240325185755-73b4f13ea6bc 56 | github.com/pedroalbanese/go-idea v0.0.0-20170306091226-d2fb45a411fb 57 | github.com/pedroalbanese/go-kcipher2 v0.0.0-20170506094415-4fcf5aa27627 58 | github.com/pedroalbanese/go-krcrypt v0.0.0-20170928183100-a0c871728ae1 59 | github.com/pedroalbanese/go-misty1 v0.0.0-20150819220543-a3984aec4fae 60 | github.com/pedroalbanese/go-nums v0.0.0-20250217142054-d8f977c4e11d 61 | github.com/pedroalbanese/go-rc5 v0.0.0-20181025211356-a14dd155920a 62 | github.com/pedroalbanese/go-ripemd v0.0.0-20200326052756-bd1759ad7d10 63 | github.com/pedroalbanese/gogost v0.0.0-20240430171730-f95129c7a5af 64 | github.com/pedroalbanese/golang-rc6 v0.0.0-20240204183933-f7014051ac04 65 | github.com/pedroalbanese/gopass v0.0.0-20210920133722-c8aef6fb66ef 66 | github.com/pedroalbanese/groestl v1.0.1 67 | github.com/pedroalbanese/hamsi v0.0.0-20240518170147-c7c58b0f2a86 68 | github.com/pedroalbanese/haraka v0.0.0-20180824194238-3cf1081eecd7 69 | github.com/pedroalbanese/jh v0.0.0-20240624180005-e6705e517191 70 | github.com/pedroalbanese/kalyna v0.0.0-20240325185136-5fa784896340 71 | github.com/pedroalbanese/kg v0.0.5 72 | github.com/pedroalbanese/khazad v0.0.0-20240325185634-12dbcf5e3eaa 73 | github.com/pedroalbanese/kupyna v0.0.0-20240326161126-ebb2f9665eeb 74 | github.com/pedroalbanese/kuznechik v0.0.0 75 | github.com/pedroalbanese/loki97 v0.0.0-20240325185530-a0580bcacc04 76 | github.com/pedroalbanese/luffa v0.0.0-20240518171333-cf7dac6a64ae 77 | github.com/pedroalbanese/lyra2re v0.0.0-20240520232624-5764a75dde63 78 | github.com/pedroalbanese/lyra2rev2 v0.0.0-20240608181906-fe968f886565 79 | github.com/pedroalbanese/magenta v0.0.0-20241208214047-a79e5e9ef277 80 | github.com/pedroalbanese/makwa-go v0.0.0-20240816162209-f803984910a2 81 | github.com/pedroalbanese/mars v0.0.0-20240325185557-fe8b863ed824 82 | github.com/pedroalbanese/matrixgl v0.0.9 83 | github.com/pedroalbanese/md6 v0.0.0-20240815222317-052c055905a4 84 | github.com/pedroalbanese/noekeon v0.0.0-20240325185408-f90c60f5190f 85 | github.com/pedroalbanese/ocb v0.0.0-20230501153203-7d2a80fe6a75 86 | github.com/pedroalbanese/ocb3 v0.0.0-20250818172449-cf949c2a64b2 87 | github.com/pedroalbanese/panama v0.0.0-20240325185906-f9d6500cb56b 88 | github.com/pedroalbanese/pmac v0.0.0-20240715205711-f4d312cbf6c5 89 | github.com/pedroalbanese/present v0.0.0-20240325185615-de3b5340e616 90 | github.com/pedroalbanese/rabbitio v0.0.0-20230209212404-cffc97bafde8 91 | github.com/pedroalbanese/radio_gatun v0.0.0-20240520204859-03d5d3af41c3 92 | github.com/pedroalbanese/randomart v0.0.0-20130402080559-540116cac932 93 | github.com/pedroalbanese/rc2 v0.0.0-20131011165748-24b9757f5521 94 | github.com/pedroalbanese/secp256k1 v0.1.3 95 | github.com/pedroalbanese/shacal2 v0.0.0-20240911175924-cbeaa118c471 96 | github.com/pedroalbanese/shavite v0.0.0-20240518173728-5c0c7c528bc7 97 | github.com/pedroalbanese/simd v0.0.0-20240518173711-b73ebc90aae8 98 | github.com/pedroalbanese/simpleini v0.0.0 99 | github.com/pedroalbanese/siphash v1.0.1 100 | github.com/pedroalbanese/siv v0.0.2 101 | github.com/pedroalbanese/skein v0.0.0-20230124182825-ffe5e4ff3827 102 | github.com/pedroalbanese/skein-1 v0.0.0-20171112102903-d7f1022db390 103 | github.com/pedroalbanese/spritz v0.0.0-20140823220804-e125bc694ec3 104 | github.com/pedroalbanese/threefish v0.0.0-20230828205611-8dc287bb1622 105 | github.com/pedroalbanese/tiger v0.0.0-20220128183340-a7e964767a9d 106 | github.com/pedroalbanese/tom v0.0.0-20250228211028-987ea6c1589b 107 | github.com/pedroalbanese/trivium v0.0.0-20170225064545-3bc0ea456f63 108 | github.com/pedroalbanese/twine v0.0.0-20240325185833-a027b56be619 109 | github.com/pedroalbanese/uuencode v1.0.4 110 | github.com/pedroalbanese/vmac v0.0.0-20231111194716-1a03aacdcb4c 111 | github.com/pedroalbanese/whirlpool v0.0.0-20220911221330-8ad94dd14447 112 | github.com/pedroalbanese/xoodoo v0.0.0-20230124190939-64aa038b97c6 113 | github.com/pedroalbanese/xxencode v0.0.15 114 | github.com/trailofbits/lms-go v0.0.0-20250218220503-d2f2806cebf9 115 | github.com/zeebo/blake3 v0.2.3 116 | golang.org/x/crypto v0.45.0 117 | golang.org/x/term v0.32.0 118 | ) 119 | 120 | require ( 121 | github.com/codahale/makwa v0.0.0-20141227225204-3dbfaeed5fdb // indirect 122 | github.com/klauspost/cpuid/v2 v2.0.12 // indirect 123 | github.com/pedroalbanese/blake256 v0.0.0-20170713140427-6aca07c5447e // indirect 124 | github.com/pedroalbanese/bmw256 v0.0.0-20240403151626-135f0d278f9f // indirect 125 | github.com/pedroalbanese/groestl-1 v0.0.0-20230125170437-46d496027e3d // indirect 126 | github.com/pkg/errors v0.9.1 // indirect 127 | golang.org/x/sys v0.38.0 // indirect 128 | ) 129 | 130 | replace golang.org/x/crypto => golang.org/x/crypto v0.38.0 131 | 132 | replace golang.org/x/sys => golang.org/x/sys v0.25.0 133 | -------------------------------------------------------------------------------- /PERFORMANCE.md: -------------------------------------------------------------------------------- 1 | # Performance 2 | 3 | goos: windows 4 | goarch: x86 5 | AMD64 Athlon X2 (Dual-Core) 3GB RAM 6 | 7 | ## Asymmetric 8 | 9 | - **Keypair Generation:** 10 | 11 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 12 | |:---|---:|---:|---:|---:| 13 | | `Dilithium` | 0.095 ± 0.070 | 0.066 | 0.294 | 1.42 ± 1.08 | 14 | | `EC-ElGamal` | 0.067 ± 0.005 | 0.061 | 0.077 | 1.00 ± 0.15 | 15 | | `ECDSA 224-bit` | 0.077 ± 0.006 | 0.071 | 0.086 | 1.16 ± 0.18 | 16 | | `ECDSA 256-bit` | 0.099 ± 0.067 | 0.073 | 0.289 | 1.49 ± 1.03 | 17 | | `ECDSA 384-bit` | 0.159 ± 0.008 | 0.151 | 0.174 | 2.39 ± 0.34 | 18 | | `ECDSA 521-bit` | 0.354 ± 0.009 | 0.345 | 0.376 | 5.32 ± 0.73 | 19 | | `Ed25519` | 0.099 ± 0.006 | 0.095 | 0.113 | 1.50 ± 0.22 | 20 | | `Ed448` | 0.091 ± 0.011 | 0.082 | 0.120 | 1.37 ± 0.25 | 21 | | `ElGamal` | 0.471 ± 0.006 | 0.458 | 0.480 | 7.08 ± 0.96 | 22 | | `GOST 256-bit` | 0.081 ± 0.011 | 0.073 | 0.104 | 1.22 ± 0.24 | 23 | | `GOST 512-bit` | 0.127 ± 0.006 | 0.121 | 0.138 | 1.92 ± 0.27 | 24 | | `Kyber` | 0.067 ± 0.004 | 0.063 | 0.077 | 1.01 ± 0.15 | 25 | | `RSA 3072-bit` | 6.962 ± 3.262 | 2.968 | 12.902 | 104.73 ± 51.05 | 26 | | `SM2` | 0.101 ± 0.068 | 0.074 | 0.293 | 1.53 ± 1.05 | 27 | | `SPHINCS+` | 0.416 ± 0.018 | 0.403 | 0.462 | 6.25 ± 0.88 | 28 | | `X25519` | 0.066 ± 0.009 | 0.059 | 0.086 | 1.00 | 29 | | `X448` | 0.072 ± 0.013 | 0.064 | 0.107 | 1.09 ± 0.25 | 30 | 31 | - **Digital Signature:** 32 | 33 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 34 | |:---|---:|---:|---:|---:| 35 | | `Dilithium` | 0.104 ± 0.009 | 0.093 | 0.123 | 1.67 ± 0.16 | 36 | | `ECDSA 224-bit` | 0.069 ± 0.011 | 0.062 | 0.099 | 1.11 ± 0.19 | 37 | | `ECDSA 256-bit` | 0.065 ± 0.004 | 0.063 | 0.076 | 1.05 ± 0.07 | 38 | | `ECDSA 384-bit` | 0.151 ± 0.009 | 0.146 | 0.178 | 2.44 ± 0.18 | 39 | | `ECDSA 521-bit` | 0.360 ± 0.010 | 0.353 | 0.383 | 5.81 ± 0.27 | 40 | | `Ed25519` | 0.171 ± 0.003 | 0.168 | 0.179 | 2.77 ± 0.11 | 41 | | `Ed448` | 0.160 ± 0.008 | 0.154 | 0.181 | 2.59 ± 0.16 | 42 | | `ElGamal` | 0.265 ± 0.008 | 0.259 | 0.285 | 4.28 ± 0.20 | 43 | | `GOST2012 256-bit` | 0.062 ± 0.002 | 0.060 | 0.068 | 1.00 | 44 | | `GOST2012 512-bit` | 0.111 ± 0.003 | 0.107 | 0.119 | 1.79 ± 0.08 | 45 | | `RSA 3072-bit` | 0.201 ± 0.005 | 0.197 | 0.212 | 3.25 ± 0.14 | 46 | | `SM2` | 0.077 ± 0.003 | 0.074 | 0.082 | 1.24 ± 0.07 | 47 | | `SPHINCS+` | 7.023 ± 0.233 | 6.902 | 7.636 | 113.33 ± 5.50 | 48 | 49 | - **Shared Key Agreement:** 50 | 51 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 52 | |:---|---:|---:|---:|---:| 53 | | `ECDSA 224-bit` | 0.064 ± 0.008 | 0.058 | 0.080 | 1.19 ± 0.55 | 54 | | `ECDSA 256-bit` | 0.062 ± 0.007 | 0.058 | 0.080 | 1.17 ± 0.53 | 55 | | `ECDSA 384-bit` | 0.159 ± 0.003 | 0.157 | 0.168 | 3.00 ± 1.33 | 56 | | `ECDSA 521-bit` | 0.407 ± 0.011 | 0.400 | 0.434 | 7.65 ± 3.40 | 57 | | `GOST2012 256-bit` | 0.062 ± 0.009 | 0.053 | 0.082 | 1.16 ± 0.54 | 58 | | `GOST2012 512-bit` | 0.104 ± 0.006 | 0.101 | 0.122 | 1.96 ± 0.88 | 59 | | `SM2` | 0.066 ± 0.008 | 0.061 | 0.088 | 1.24 ± 0.57 | 60 | | `X25519` | 0.053 ± 0.024 | 0.042 | 0.120 | 1.00 | 61 | | `X448` | 0.055 ± 0.001 | 0.054 | 0.057 | 1.04 ± 0.46 | 62 | 63 | ## Symmetric 64 | 65 | - **Stream Ciphers:** 66 | 67 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 68 | |:---|---:|---:|---:|---:| 69 | | `Chacha20Poly1305` | 0.076 ± 0.012 | 0.070 | 0.110 | 1.93 ± 0.33 | 70 | | `Chacha20` | 0.049 ± 0.002 | 0.047 | 0.055 | 1.24 ± 0.09 | 71 | | `HC-128` | 0.039 ± 0.002 | 0.037 | 0.044 | 1.00 | 72 | | `HC-256` | 0.045 ± 0.008 | 0.040 | 0.065 | 1.15 ± 0.20 | 73 | | `KCipher-2` | 0.082 ± 0.002 | 0.080 | 0.088 | 2.09 ± 0.13 | 74 | | `RC4` | 0.050 ± 0.005 | 0.046 | 0.059 | 1.28 ± 0.14 | 75 | | `Rabbit` | 0.050 ± 0.003 | 0.047 | 0.056 | 1.27 ± 0.11 | 76 | | `Salsa20` | 0.044 ± 0.006 | 0.041 | 0.060 | 1.13 ± 0.16 | 77 | | `Skein512` | 0.061 ± 0.003 | 0.060 | 0.068 | 1.56 ± 0.11 | 78 | | `Spritz` | 0.107 ± 0.004 | 0.104 | 0.117 | 2.73 ± 0.18 | 79 | | `Trivium` | 0.252 ± 0.006 | 0.245 | 0.266 | 6.44 ± 0.40 | 80 | | `ZUC-128` | 0.071 ± 0.003 | 0.068 | 0.078 | 1.82 ± 0.13 | 81 | | `ZUC-256` | 0.072 ± 0.006 | 0.067 | 0.084 | 1.84 ± 0.18 | 82 | 83 | - **128-bit> Block Ciphers:** 84 | 85 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 86 | |:---|---:|---:|---:|---:| 87 | | `AES` | 0.084 ± 0.006 | 0.078 | 0.098 | 1.49 ± 0.19 | 88 | | `ARIA` | 0.302 ± 0.003 | 0.298 | 0.309 | 5.38 ± 0.57 | 89 | | `Anubis` | 0.093 ± 0.007 | 0.086 | 0.116 | 1.65 ± 0.21 | 90 | | `CAST256` | 0.248 ± 0.008 | 0.241 | 0.264 | 4.43 ± 0.49 | 91 | | `CLEFIA` | 1.652 ± 0.006 | 1.644 | 1.662 | 29.49 ± 3.12 | 92 | | `CRYPTON` | 0.170 ± 0.006 | 0.164 | 0.185 | 3.04 ± 0.34 | 93 | | `Camellia` | 0.086 ± 0.006 | 0.078 | 0.110 | 1.54 ± 0.20 | 94 | | `E2` | 0.175 ± 0.004 | 0.171 | 0.187 | 3.12 ± 0.34 | 95 | | `Grasshopper` | 0.419 ± 0.002 | 0.417 | 0.422 | 7.48 ± 0.79 | 96 | | `Kalyna128_128` | 0.115 ± 0.006 | 0.110 | 0.134 | 2.06 ± 0.24 | 97 | | `Kalyna128_256` | 0.136 ± 0.006 | 0.131 | 0.150 | 2.42 ± 0.28 | 98 | | `Kalyna256_256` | 0.133 ± 0.009 | 0.125 | 0.152 | 2.37 ± 0.29 | 99 | | `Kalyna256_512` | 0.151 ± 0.010 | 0.144 | 0.184 | 2.69 ± 0.33 | 100 | | `Kalyna512_512` | 0.147 ± 0.006 | 0.140 | 0.157 | 2.62 ± 0.30 | 101 | | `LEA` | 0.056 ± 0.006 | 0.052 | 0.092 | 1.00 | 102 | | `LOKI97` | 0.163 ± 0.005 | 0.158 | 0.175 | 2.91 ± 0.32 | 103 | | `MARS2` | 0.129 ± 0.004 | 0.125 | 0.143 | 2.30 ± 0.25 | 104 | | `MARS` | 0.089 ± 0.005 | 0.084 | 0.101 | 1.58 ± 0.19 | 105 | | `NOEKEON` | 0.160 ± 0.005 | 0.151 | 0.169 | 2.85 ± 0.31 | 106 | | `RC6` | 0.066 ± 0.006 | 0.061 | 0.086 | 1.17 ± 0.16 | 107 | | `SEED` | 0.081 ± 0.006 | 0.078 | 0.108 | 1.45 ± 0.18 | 108 | | `SM4` | 0.076 ± 0.004 | 0.072 | 0.094 | 1.36 ± 0.16 | 109 | | `Serpent` | 0.156 ± 0.006 | 0.152 | 0.175 | 2.79 ± 0.31 | 110 | | `Threefish256` | 0.081 ± 0.010 | 0.075 | 0.124 | 1.44 ± 0.24 | 111 | | `Threefish512` | 0.091 ± 0.006 | 0.087 | 0.108 | 1.63 ± 0.20 | 112 | | `Threefish1024` | 0.100 ± 0.006 | 0.095 | 0.114 | 1.79 ± 0.21 | 113 | | `Twofish` | 0.112 ± 0.009 | 0.101 | 0.140 | 2.01 ± 0.27 | 114 | 115 | - **64-bit Block Ciphers:** 116 | 117 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 118 | |:---|---:|---:|---:|---:| 119 | | `3DES` | 0.194 ± 0.008 | 0.189 | 0.220 | 3.25 ± 0.38 | 120 | | `Blowfish` | 0.070 ± 0.005 | 0.066 | 0.083 | 1.18 ± 0.15 | 121 | | `CAST5` | 0.096 ± 0.005 | 0.090 | 0.107 | 1.60 ± 0.20 | 122 | | `DES` [obsolete] | 0.109 ± 0.010 | 0.101 | 0.152 | 1.83 ± 0.26 | 123 | | `GOST89` | 0.149 ± 0.004 | 0.146 | 0.164 | 2.51 ± 0.29 | 124 | | `HIGHT` | 0.174 ± 0.005 | 0.169 | 0.185 | 2.91 ± 0.33 | 125 | | `IDEA` [obsolete] | 0.127 ± 0.016 | 0.115 | 0.190 | 2.13 ± 0.36 | 126 | | `Khazad` | 0.091 ± 0.007 | 0.086 | 0.118 | 1.52 ± 0.20 | 127 | | `MISTY1` | 0.132 ± 0.006 | 0.128 | 0.151 | 2.22 ± 0.26 | 128 | | `Magma` | 0.150 ± 0.004 | 0.145 | 0.158 | 2.52 ± 0.29 | 129 | | `PRESENT` | 0.205 ± 0.004 | 0.201 | 0.218 | 3.45 ± 0.39 | 130 | | `RC2` [obsolete] | 0.126 ± 0.006 | 0.120 | 0.144 | 2.11 ± 0.26 | 131 | | `RC5` | 0.060 ± 0.007 | 0.054 | 0.088 | 1.00 | 132 | | `TWINE` | 0.726 ± 0.003 | 0.723 | 0.731 | 12.19 ± 1.35 | 133 | 134 | - **Modes of Operation:** 135 | 136 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 137 | |:---|---:|---:|---:|---:| 138 | | `EAX` | 0.126 ± 0.006 | 0.122 | 0.143 | 1.81 ± 0.12 | 139 | | `GCM` | 0.113 ± 0.004 | 0.110 | 0.125 | 1.63 ± 0.10 | 140 | | `OCB1` | 0.106 ± 0.004 | 0.101 | 0.118 | 1.52 ± 0.10 | 141 | | `OCB3` | 0.086 ± 0.005 | 0.081 | 0.104 | 1.24 ± 0.09 | 142 | | `MGM` | 0.332 ± 0.005 | 0.329 | 0.342 | 4.78 ± 0.26 | 143 | | `CCM` | 0.127 ± 0.016 | 0.117 | 0.178 | 1.82 ± 0.24 | 144 | | `CBC` | 0.085 ± 0.008 | 0.079 | 0.108 | 1.22 ± 0.12 | 145 | | `CFB` | 0.094 ± 0.017 | 0.071 | 0.137 | 1.35 ± 0.25 | 146 | | `CFB-8` | 0.657 ± 0.009 | 0.648 | 0.678 | 9.43 ± 0.51 | 147 | | `CTR` | 0.070 ± 0.004 | 0.067 | 0.084 | 1.00 | 148 | | `ECB` [obsolete] | 0.080 ± 0.005 | 0.076 | 0.096 | 1.15 ± 0.09 | 149 | | `IGE` | 0.093 ± 0.003 | 0.090 | 0.106 | 1.34 ± 0.08 | 150 | | `OFB` | 0.070 ± 0.004 | 0.067 | 0.083 | 1.01 ± 0.08 | 151 | 152 | - **Key Length:** 153 | 154 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 155 | |:---|---:|---:|---:|---:| 156 | | `AES128` | 0.072 ± 0.003 | 0.069 | 0.078 | 1.00 | 157 | | `AES192` | 0.077 ± 0.006 | 0.073 | 0.092 | 1.07 ± 0.09 | 158 | | `AES256` | 0.085 ± 0.007 | 0.079 | 0.103 | 1.18 ± 0.11 | 159 | 160 | - **Message Digest:** 161 | 162 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 163 | |:---|---:|---:|---:|---:| 164 | | `BLAKE2B256` | 0.054 ± 0.005 | 0.051 | 0.072 | 1.40 ± 0.22 | 165 | | `BLAKE2B512` | 0.055 ± 0.006 | 0.050 | 0.071 | 1.43 ± 0.24 | 166 | | `BLAKE2S128` | 0.040 ± 0.005 | 0.036 | 0.055 | 1.05 ± 0.19 | 167 | | `BLAKE2S256` | 0.042 ± 0.006 | 0.036 | 0.065 | 1.08 ± 0.21 | 168 | | `BLAKE3` | 0.050 ± 0.005 | 0.047 | 0.075 | 1.31 ± 0.22 | 169 | | `BMW` | 0.073 ± 0.004 | 0.070 | 0.091 | 1.89 ± 0.26 | 170 | | `CubeHash256` | 0.121 ± 0.005 | 0.117 | 0.135 | 3.13 ± 0.43 | 171 | | `CubeHash512` | 0.153 ± 0.006 | 0.149 | 0.174 | 3.96 ± 0.54 | 172 | | `ECHO224` | 0.158 ± 0.003 | 0.156 | 0.169 | 4.10 ± 0.54 | 173 | | `ECHO256` | 0.160 ± 0.006 | 0.157 | 0.179 | 4.14 ± 0.56 | 174 | | `ECHO384` | 0.266 ± 0.004 | 0.263 | 0.278 | 6.90 ± 0.91 | 175 | | `ECHO512` | 0.266 ± 0.003 | 0.264 | 0.273 | 6.89 ± 0.90 | 176 | | `ESCH256` | 0.107 ± 0.003 | 0.105 | 0.116 | 2.77 ± 0.37 | 177 | | `ESCH384` | 0.148 ± 0.003 | 0.145 | 0.155 | 3.83 ± 0.51 | 178 | | `Fugue224` | 0.080 ± 0.008 | 0.077 | 0.122 | 2.07 ± 0.34 | 179 | | `Fugue256` | 0.080 ± 0.003 | 0.077 | 0.091 | 2.06 ± 0.28 | 180 | | `Fugue384` | 0.104 ± 0.007 | 0.101 | 0.133 | 2.70 ± 0.40 | 181 | | `Fugue512` | 0.126 ± 0.002 | 0.124 | 0.132 | 3.27 ± 0.43 | 182 | | `GOST94` | 0.690 ± 0.056 | 0.658 | 0.817 | 17.86 ± 2.75 | 183 | | `Groestl` | 0.151 ± 0.030 | 0.140 | 0.274 | 3.91 ± 0.94 | 184 | | `Hamsi224` | 0.086 ± 0.003 | 0.084 | 0.099 | 2.24 ± 0.31 | 185 | | `Hamsi256` | 0.087 ± 0.004 | 0.084 | 0.100 | 2.25 ± 0.31 | 186 | | `Hamsi384` | 0.164 ± 0.005 | 0.160 | 0.182 | 4.24 ± 0.57 | 187 | | `Hamsi512` | 0.163 ± 0.002 | 0.160 | 0.165 | 4.22 ± 0.55 | 188 | | `JH` | 0.366 ± 0.007 | 0.361 | 0.385 | 9.48 ± 1.25 | 189 | | `Keccak256` | 0.072 ± 0.005 | 0.069 | 0.094 | 1.87 ± 0.28 | 190 | | `Keccak512` | 0.109 ± 0.007 | 0.105 | 0.129 | 2.83 ± 0.41 | 191 | | `Kupyna256` | 0.887 ± 0.012 | 0.873 | 0.914 | 22.98 ± 3.02 | 192 | | `Kupyna384` | 0.569 ± 0.022 | 0.556 | 0.614 | 14.75 ± 2.01 | 193 | | `Kupyna512` | 0.566 ± 0.008 | 0.556 | 0.581 | 14.65 ± 1.93 | 194 | | `LSH224` | 0.055 ± 0.005 | 0.052 | 0.075 | 1.43 ± 0.22 | 195 | | `LSH256` | 0.057 ± 0.005 | 0.052 | 0.071 | 1.47 ± 0.23 | 196 | | `LSH384` | 0.058 ± 0.007 | 0.052 | 0.084 | 1.50 ± 0.27 | 197 | | `LSH512` | 0.123 ± 0.010 | 0.112 | 0.148 | 3.18 ± 0.49 | 198 | | `Luffa224` | 0.057 ± 0.004 | 0.054 | 0.078 | 1.47 ± 0.22 | 199 | | `Luffa256` | 0.056 ± 0.004 | 0.054 | 0.075 | 1.46 ± 0.22 | 200 | | `Luffa384` | 0.069 ± 0.010 | 0.062 | 0.109 | 1.78 ± 0.34 | 201 | | `Luffa512` | 0.075 ± 0.005 | 0.072 | 0.099 | 1.94 ± 0.28 | 202 | | `MD4` | 0.043 ± 0.007 | 0.037 | 0.065 | 1.13 ± 0.23 | 203 | | `MD5` | 0.041 ± 0.007 | 0.032 | 0.065 | 1.06 ± 0.23 | 204 | | `RMD128` | 0.051 ± 0.007 | 0.046 | 0.070 | 1.32 ± 0.24 | 205 | | `RMD160` | 0.054 ± 0.006 | 0.051 | 0.083 | 1.41 ± 0.25 | 206 | | `RMD256` | 0.050 ± 0.005 | 0.046 | 0.063 | 1.29 ± 0.21 | 207 | | `SHA1` | 0.041 ± 0.007 | 0.032 | 0.067 | 1.06 ± 0.24 | 208 | | `SHA224` | 0.047 ± 0.007 | 0.039 | 0.078 | 1.21 ± 0.25 | 209 | | `SHA256` | 0.055 ± 0.017 | 0.039 | 0.095 | 1.43 ± 0.47 | 210 | | `SHA3-224` | 0.070 ± 0.004 | 0.067 | 0.083 | 1.81 ± 0.26 | 211 | | `SHA3-256` | 0.075 ± 0.009 | 0.069 | 0.108 | 1.94 ± 0.35 | 212 | | `SHA3-384` | 0.095 ± 0.024 | 0.082 | 0.176 | 2.45 ± 0.71 | 213 | | `SHA3-512` | 0.108 ± 0.004 | 0.105 | 0.119 | 2.81 ± 0.38 | 214 | | `SHA384` | 0.109 ± 0.027 | 0.073 | 0.198 | 2.83 ± 0.80 | 215 | | `SHA512-256` | 0.076 ± 0.005 | 0.072 | 0.090 | 1.96 ± 0.28 | 216 | | `SHA512` | 0.075 ± 0.004 | 0.072 | 0.088 | 1.94 ± 0.27 | 217 | | `SIMD224` | 0.114 ± 0.007 | 0.111 | 0.146 | 2.95 ± 0.43 | 218 | | `SIMD256` | 0.115 ± 0.006 | 0.112 | 0.138 | 2.98 ± 0.42 | 219 | | `SIMD384` | 0.138 ± 0.004 | 0.135 | 0.147 | 3.57 ± 0.48 | 220 | | `SIMD512` | 0.137 ± 0.003 | 0.135 | 0.146 | 3.55 ± 0.47 | 221 | | `SM3` | 0.045 ± 0.005 | 0.040 | 0.060 | 1.17 ± 0.21 | 222 | | `Shavite224` | 0.072 ± 0.002 | 0.070 | 0.082 | 1.88 ± 0.25 | 223 | | `Shavite256` | 0.073 ± 0.003 | 0.070 | 0.083 | 1.88 ± 0.25 | 224 | | `Shavite384` | 0.099 ± 0.006 | 0.096 | 0.124 | 2.56 ± 0.36 | 225 | | `Shavite512` | 0.099 ± 0.004 | 0.096 | 0.114 | 2.56 ± 0.35 | 226 | | `SipHash128` | 0.039 ± 0.005 | 0.032 | 0.054 | 1.00 | 227 | | `SipHash64` | 0.040 ± 0.006 | 0.032 | 0.072 | 1.02 ± 0.21 | 228 | | `Skein256` | 0.068 ± 0.005 | 0.065 | 0.091 | 1.76 ± 0.27 | 229 | | `Skein512` | 0.069 ± 0.007 | 0.065 | 0.101 | 1.78 ± 0.30 | 230 | | `Streebog256` | 0.575 ± 0.004 | 0.570 | 0.581 | 14.88 ± 1.95 | 231 | | `Streebog512` | 0.573 ± 0.004 | 0.569 | 0.582 | 14.83 ± 1.94 | 232 | | `Tiger2` | 0.052 ± 0.005 | 0.049 | 0.075 | 1.35 ± 0.23 | 233 | | `Tiger` | 0.052 ± 0.005 | 0.048 | 0.067 | 1.35 ± 0.22 | 234 | | `Whirlpool` | 0.297 ± 0.006 | 0.292 | 0.311 | 7.68 ± 1.02 | 235 | | `Xoodyak` | 0.079 ± 0.008 | 0.075 | 0.115 | 2.04 ± 0.33 | 236 | 237 | - **Message Authentication Code:** 238 | 239 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 240 | |:---|---:|---:|---:|---:| 241 | | `CMAC (AES)` | 0.066 ± 0.004 | 0.063 | 0.079 | 1.70 ± 0.28 | 242 | | `Chaskey` | 0.046 ± 0.006 | 0.040 | 0.058 | 1.18 ± 0.23 | 243 | | `GMAC (AES)` | 0.072 ± 0.007 | 0.067 | 0.095 | 1.85 ± 0.33 | 244 | | `GOST` | 0.089 ± 0.005 | 0.085 | 0.107 | 2.27 ± 0.37 | 245 | | `HMAC (SHA256)` | 0.045 ± 0.007 | 0.040 | 0.078 | 1.16 ± 0.26 | 246 | | `MGMAC (AES)` | 0.236 ± 0.003 | 0.234 | 0.245 | 6.06 ± 0.92 | 247 | | `PMAC (AES)` | 0.073 ± 0.004 | 0.070 | 0.086 | 1.87 ± 0.30 | 248 | | `Poly1305` | 0.046 ± 0.004 | 0.042 | 0.059 | 1.19 ± 0.21 | 249 | | `SipHash128` | 0.040 ± 0.007 | 0.032 | 0.070 | 1.03 ± 0.24 | 250 | | `SipHash64` | 0.039 ± 0.006 | 0.033 | 0.065 | 1.00 | 251 | | `Skein` | 0.055 ± 0.005 | 0.051 | 0.066 | 1.41 ± 0.25 | 252 | | `VMAC (AES)` | 0.328 ± 0.009 | 0.323 | 0.353 | 8.42 ± 1.29 | 253 | | `Xoodyak` | 0.077 ± 0.004 | 0.075 | 0.090 | 1.98 ± 0.31 | 254 | | `ZUC-128` | 0.108 ± 0.005 | 0.104 | 0.120 | 2.79 ± 0.44 | 255 | | `ZUC-256` | 0.369 ± 0.005 | 0.364 | 0.381 | 9.47 ± 1.44 | 256 | 257 | - **Experimental:** 258 | 259 | | Command | Mean [s] | Min [s] | Max [s] | Relative | 260 | |:---|---:|---:|---:|---:| 261 | | `Ascon v1.2` | 0.457 ± 0.021 | 0.426 | 0.483 | 1.04 ± 0.05 | 262 | | `Grain128AEAD` | 1.202 ± 0.015 | 1.182 | 1.228 | 2.73 ± 0.04 | 263 | | `Grain128a` | 0.441 ± 0.002 | 0.438 | 0.445 | 1.00 | 264 | | `Xoodyak v2` | 0.742 ± 0.023 | 0.705 | 0.766 | 1.68 ± 0.05 | 265 | 266 | -------------------------------------------------------------------------------- /cmd/edgetk/README.md: -------------------------------------------------------------------------------- 1 | ## Abstract 2 | 3 | ### Proposed Title: 4 | *EDGETk: A Comprehensive Toolkit for Cryptographic Primitives and Protocols* 5 | 6 | This paper introduces the EDGE Toolkit (EDGETk), a hybrid, cross-platform environment for symmetric and asymmetric cryptography and related protocols, designed for secure use in small-scale or embedded systems. EDGETk implements over 140 cryptographic algorithms, including symmetric ciphers, message authentication, password-based key derivation, recursive hashing, digital signatures, X.509 certificate chains, and secure communication layers (TLS 1.3, TLCP). It also supports elliptic curves in Weierstrass, Twisted Edwards, and Montgomery forms, along with both classical and modern cryptographic schemes (RSA, ECDSA, EdDSA, GOST, BLS12‑381 curves, etc.). 7 | 8 | The toolkit has been evaluated across various platforms (Windows, Linux, FreeBSD, ARM, x86), with a focus on performance requirements, formal security (e.g., zero-knowledge proofs, verified cryptographic relations), and compliance with international standards. 9 | 10 | ### Key Contributions: 11 | 12 | - Development of a non-interactive Schnorr-like zero-knowledge proof of private key knowledge, integrated into the toolkit and usable with bilinear pairings as a building block for IBE/IBS schemes and authentication mechanisms. 13 | 14 | - Full implementation of over 140 cryptographic primitives—ranging from basic to advanced—including symmetric and asymmetric encryption, hashing, authentication, key derivation, and digital signatures, providing flexibility for a wide range of security scenarios. 15 | 16 | - Support for multiple families of elliptic curves (Weierstrass, Twisted Edwards, Montgomery), including parameter sets aligned with international standards (BLS12‑381, GOST R 34.10, SM2), enabling global adoption and interoperability. 17 | 18 | - Cross-platform design optimized for constrained environments (embedded/IoT), with integrated secure communication layers (TLS 1.3, TLCP) and support for standard certificate formats (X.509, CSRs, CRLs). 19 | 20 | - Open licensing and accessible documentation, with a public repository, allowing for third-party audits, community contributions, and future certification under ISO/IEC, NIST, or other standards. 21 | 22 | --- 23 | 24 | ## 1. Introduction 25 | 26 | With the growing demand for secure communication in connected devices—especially in embedded systems—comes the need for lightweight, auditable cryptographic toolkits that align with modern security standards. EDGETk emerges in this context as a practical and robust solution, consolidating a wide range of cryptographic primitives and protocols into a single, cross-platform suite focused on interoperability, performance, and formal security. 27 | 28 | --- 29 | 30 | ## 2. Methodology 31 | 32 | EDGETk has been analyzed and validated through: 33 | 34 | - Testing across multiple platforms (Windows, Linux, FreeBSD, ARM); 35 | - Cross-verification for interoperability with OpenSSL, LibreSSL, GmSSL, etc.; 36 | - Manual and automated formal verification of cryptographic correctness; 37 | - Performance benchmarking on 32- and 64-bit architectures; 38 | - Compliance verification with cryptographic standards (RFCs, ISO, NIST). 39 | 40 | --- 41 | 42 | ## 3. Toolkit Architecture 43 | 44 | EDGETk is structured as a single command-line executable with minimal external dependencies. It provides: 45 | 46 | - Multiple I/O formats (raw, hex, PEM, DER); 47 | - Granular algorithm and mode selection; 48 | - Shell scripting and automation support; 49 | - Offline or real-time operation (via embedded server); 50 | - POSIX-compatible APIs suitable for embedded systems. 51 | 52 | --- 53 | 54 | ## 4. Implemented Cryptographic Primitives 55 | 56 | ### 4.1 Symmetric Cryptography 57 | 58 | #### Stream Ciphers 59 | - **AEAD:** Ascon, ChaCha20Poly1305, ZUC-128/256, Grain128a. 60 | - **Classic:** Salsa20, HC-128/256, RC4, Rabbit, Spritz, Trivium. 61 | 62 | #### Block Ciphers 63 | - **64-bit:** Blowfish, CAST5, Misty1, HIGHT, PRESENT, etc. 64 | - **128-bit:** AES, Camellia, ARIA, LEA, Twofish, Serpent, SM4, etc. 65 | - **256-bit and above:** Kalyna256/512, SHACAL-2, Threefish (256, 512, 1024). 66 | - **Modes:** GCM, OCB, CCM, MGM, EAX, CBC, CFB, CTR, IGE, SIV. 67 | 68 | --- 69 | 70 | ### 4.2 Asymmetric Cryptography 71 | 72 | - **Digital Signatures:** ECDSA, EdDSA, BIP0340, GOST R 34.10, SM2, RSA, SLH-DSA, ML-DSA, etc. 73 | - **Key Exchange:** X25519, Curve448, ECDH, SM2, NUMS, BLS12-381, ML-KEM. 74 | - **Public-key Encryption:** RSA, SM2, ElGamal, EC-ElGamal, IBE schemes. 75 | 76 | --- 77 | 78 | ### 4.3 Elliptic Curves 79 | 80 | - **Weierstrass:** secp256r1, secp384r1, brainpool, SM2, GOST, etc. 81 | - **Twisted Edwards:** Ed25519, GOST-A, NUMS-TE. 82 | - **Montgomery:** Curve25519/X25519, Curve448. 83 | - **Pairing-Friendly:** BLS12-381, BN256. 84 | - **Others:** NUMS, Tom256/384, Koblitz (secp256k1), ANSSI. 85 | 86 | --- 87 | 88 | ### 4.4 Hash Functions 89 | 90 | - **SHA Family:** SHA-1, SHA-2, SHA-3, SHAKE. 91 | - **Modern Hashes:** BLAKE2b/s, BLAKE3, Streebog, Skein, Kupyna, Whirlpool, BMW, MD6, etc. 92 | - **Legacy (compatibility only):** MD5, RIPEMD, GOST94, HAS-160. 93 | 94 | --- 95 | 96 | ### 4.5 Key Derivation and Storage 97 | 98 | - **Key Derivation:** PBKDF2, HKDF, Argon2, scrypt, Lyra2, GOST, BLAKE3. 99 | - **MACs and Authenticated Hashes:** CMAC, VMAC, PMAC, HMAC, Poly1305, SipHash, Xoodyak, etc. 100 | 101 | --- 102 | 103 | ## 5. Supported Cryptographic Protocols 104 | 105 | ### 5.1 TLS 1.3 and TLCP 106 | 107 | - Built-in support for full handshake clients and servers. 108 | - TLS/TLCP available via command-line interface. 109 | - Compatible with SM2/SM3/SM4 and standard NIST curves. 110 | 111 | ### 5.2 Public Key Infrastructure (PKI) 112 | 113 | - Generation and parsing of: 114 | - X.509 certificates (PEM/DER); 115 | - Certificate Revocation Lists (CRLs); 116 | - Certificate Signing Requests (CSRs). 117 | - Compatible with OpenSSL and other PKI tools. 118 | 119 | ### 5.3 Identity- and Signature-Based on Bilinear Pairings 120 | 121 | EDGETk implements several IBE/IBS schemes: 122 | 123 | | Scheme | Type | Private Group | Public Group | 124 | |--------------------|:----:|:-------------:|:------------:| 125 | | Boneh-Franklin | IBE | G1 | G2 | 126 | | Boneh-Boyen | IBE | G2 | G1 | 127 | | Sakai-Kasahara | IBE | G2 | G1 | 128 | | Barreto et al. | IBS | G1 | G2 | 129 | | Cha-Cheon | IBS | G1 | G2 | 130 | | Galindo-Garcia | IBS | G1 | G1 | 131 | | Hess (default) | IBS | G1 | G2 | 132 | 133 | Additionally, EDGETk features: 134 | 135 | - **Non-interactive Schnorr-like Zero-Knowledge Proofs** of private key knowledge over pairing groups; 136 | - Reusable components for authentication systems and decentralized identity (DID). 137 | 138 | --- 139 | 140 | ## 6. Experimental Evaluation 141 | 142 | EDGETk’s performance was benchmarked across: 143 | 144 | - **Platforms:** Windows, Linux, FreeBSD, ARMv7, ARM Cortex-M, x86_64; 145 | - **Metrics:** execution time, memory usage, cryptographic throughput; 146 | - **Results:** excellent performance on embedded devices (e.g., Raspberry Pi Zero), with a binary footprint under 1MB on ARM systems. 147 | 148 | --- 149 | 150 | ## 7. Use Cases 151 | 152 | - **End-to-end encryption in embedded systems** (e.g., IoT sensors using TLS 1.3); 153 | - **Decentralized infrastructures** using identity-based signatures; 154 | - **Cryptographic audits** of curves, hashes, and certificates; 155 | - **Compliance with national and international standards** (Chinese SMx, Russian GOST, NIST, etc.). 156 | 157 | --- 158 | 159 | ## 8. Conclusion 160 | 161 | EDGETk stands out as a powerful and flexible toolkit for developers, researchers, and security engineers who require a reliable environment to test, integrate, or validate cryptographic primitives. Its cross-platform architecture, extensive algorithmic support, and emphasis on formal correctness make it well-suited for modern applications demanding high assurance, performance, and compliance. 162 | 163 | --- 164 | 165 | ## References 166 | 167 | - Africacrypt 2009: Galindo-Garcia Identity-Based Signature (IBS) 168 | - Anubis Involutional SPN 128-bit block cipher (Barreto, ESAT/COSIC) 169 | - Asiacrypt 2001: Short Signatures from the Weil Pairing (BLS) 170 | - Asi­acrypt 2005: Barreto Identity-Based Signature (IBS) 171 | - BSI TR-03111 Elliptic Curve Cryptography (ECC) Technical Guideline 172 | - CHASKEY Message Authentication Code (Nicky Mouha, ESAT/COSIC) 173 | - CubeHash and SipHash64/128 (Daniel J. Bernstein & JP Aumasson) 174 | - CRYPTO 1999: IND-CCA2 Fujisaki-Okamoto Transformation (IBE) 175 | - CRYPTO 2001: Boneh-Franklin Identity-Based Encryption (IBE) 176 | - DSTU 7564:2014 A New Standard of Ukraine: The Kupyna Hash Function 177 | - DSTU 7624:2014 A Encryption Standard of Ukraine: Kalyna Block Cipher 178 | - Eurocrypt 1996: Security Proofs for Signature Schemes (EUF-CMA ElGamal) 179 | - Eurocrypt 2004: Boneh-Boyen Identity-Based Encryption (IBE) 180 | - GB/T 32907-2016 - SM4 128-bit Block Cipher 181 | - GB/T 32918.4-2016 SM2 Elliptic Curve Asymmetric Encryption 182 | - GB/T 38636-2020 - Transport Layer Cryptography Protocol (TLCP) 183 | - GM/T 0001-2012 ZUC Zu Chongzhi Stream cipher 128/256-bit key 184 | - GM/T 0002-2012 SM4 Block cipher with 128-bit key 185 | - GM/T 0003-2012 SM2 Public key algorithm 256-bit 186 | - GM/T 0004-2012 SM3 Message digest algorithm 256-bit hash value 187 | - GM/T 0044-2016 SM9 Public key algorithm 256-bit 188 | - GM/T 0086-2020 Specification of key management system based on SM9 189 | - GOST 28147-89 64-bit block cipher (RFC 5830) 190 | - GOST R 34.10-2012 VKO key agreement function (RFC 7836) 191 | - GOST R 34.10-2012 public key signature function (RFC 7091) 192 | - GOST R 34.11-2012 Streebog hash function (RFC 6986) 193 | - GOST R 34.11-94 CryptoPro hash function (RFC 5831) 194 | - GOST R 34.12-2015 128-bit block cipher Kuznechik (RFC 7801) 195 | - GOST R 34.12-2015 64-bit block cipher Magma (RFC 8891) 196 | - GOST R 50.1.114-2016 GOST R 34.10-2012 and GOST R 34.11-2012 197 | - HC-128 Stream Cipher simplified version of HC-256 (Wu, ESAT/COSIC) 198 | - IGE (Infinite Garble Extension) Mode of Operation for Block ciphers 199 | - ISO/IEC 10118-3:2003 RIPEMD128/160/256 and Whirlpool (ESAT/COSIC) 200 | - ISO/IEC 18033-3:2010 HIGHT, SEED, Camellia and MISTY1 Block ciphers 201 | - ISO/IEC 18033-4:2011 KCipher-2 stream cipher (RFC 7008) 202 | - ISO/IEC 29192-3:2012 Trivium Stream cipher with 80-bit key 203 | - ISO/IEC 18033-5:2015 IBE - Identity-based Encryption Mechanisms 204 | - ISO/IEC 18033-5:2015/Amd.1:2021(E) SM9 Mechanism 205 | - ISO/IEC 14888-3:2018 EC-SDSA Schnorr-based Signature Scheme 206 | - ISO/IEC 29192-2:2019 PRESENT, CLEFIA and LEA block ciphers 207 | - ISO/IEC 15946-5:2022 Barreto-Naehrig and Barreto-Lynn-Scott Curves 208 | - KS X 1213-1 ARIA 128-bit block cipher with 128/192/256-bit keys 209 | - KS X 3246 LEA - Lightweight Encryption Algorithm (TTAK.KO-12.0223) 210 | - KS X 3262 LSH - A New Fast Secure Hash Function Family (in Korean) 211 | - LNCS 1838 - A One Round Protocol for Tripartite Diffie-Hellman 212 | - NIST SP800-186 X25519 Diffie-Hellman (OpenSSL compliant) 213 | - NIST SP800-38D GCM AEAD mode for 128-bit block ciphers (RFC 5288) 214 | - NIST SP800-232 Ascon-Based Lightweight Cryptography Standard 215 | - PKC 2003: Cha-Cheon Identity-Based Signature (IBS) 216 | - RFC 1423: Privacy Enhancement for Internet Electronic Mail 217 | - RFC 2104: HMAC - Keyed-Hashing for Message Authentication 218 | - RFC 2144: CAST-128 64-bit Block cipher with 128-bit key 219 | - RFC 2612: The CAST-256 Encryption Algorithm 220 | - RFC 3610: Counter with CBC-MAC Mode of Operation (CCM Mode) 221 | - RFC 4009: The SEED Encryption Algorithm (KISA) 222 | - RFC 4253: Serpent 128-bit Block cipher with 128/192/256-bit keys 223 | - RFC 4493: Cipher-based Message Authentication Code (CMAC) 224 | - RFC 4503: Rabbit Stream Cipher Algorithm with 128-bit key 225 | - RFC 4543: Galois Message Authentication Code (GMAC) 226 | - RFC 4764: EAX Authenticated-Encryption Mode of Operation 227 | - RFC 4648: Base16, Base32, and Base64 Data Encodings 228 | - RFC 5246: Transport Layer Security (TLS) Protocol Version 1.2 229 | - RFC 5280: Internet X.509 PKI Certificate Revocation List (CRL) 230 | - RFC 5297: Synthetic Initialization Vector (SIV Mode) 231 | - RFC 5639: Elliptic Curve Cryptography (ECC) Brainpool Standard Curves 232 | - RFC 5869: HMAC-based Key Derivation Function (HKDF) 233 | - RFC 6114: The 128-Bit Blockcipher CLEFIA (Sony) 234 | - RFC 7008: KCipher-2 Encryption Algorithm (KDDI R&D Laboratories) 235 | - RFC 7253: OCB3 Offset Codebook Authenticated-Encryption Algorithm 236 | - RFC 7292: PKCS #12 Personal Information Exchange Syntax v1.1 237 | - RFC 7539: ChaCha20-Poly1305 AEAD Stream cipher 238 | - RFC 7693: The BLAKE2 Cryptographic Hash and MAC (JP Aumasson) 239 | - RFC 7748: Curve25519 and Curve448: Elliptic Curves for Security 240 | - RFC 7914: The Scrypt Password-Based Key Derivation Function 241 | - RFC 8032: Ed25519 Signature a.k.a. EdDSA (Daniel J. Bernstein) 242 | - RFC 8446: Transport Layer Security (TLS) Protocol Version 1.3 243 | - RFC 9058: MGM AEAD mode for 64 and 128 bit ciphers (E. Griboedova) 244 | - RFC 9367: GOST Cipher Suites for Transport Layer Security (TLS 1.3) 245 | - SAC 2002: Hess Efficient Identity Based Signature (IBS) 246 | - SBRC 2007: Curupira 96-bit block cipher with 96/144/192-bit keys 247 | - STB 34.101.31-2011 Belarusian standard (Bel-T) block cipher 248 | - STB 34.101.45-2013 Belarusian BignV1 public key algorithhm 249 | - STB 34.101.77-2020 Belarusian standard BASH hash function 250 | - TTAS.KO-12.0004/R1 128-bit Block Cipher SEED (ISO/IEC 18033-3:2010) 251 | - TTAS.KO-12.0040/R1 64-bit Block Cipher HIGHT (ISO/IEC 18033-3:2010) 252 | - TTAS.KO-12.0011/R2 HAS-160 Korean-standardized hash algorithm 253 | - TTAK.KO-12.0015/R3 EC-KCDSA Korean Digital Signature Algorithm 254 | - TTAK.KO-12.0223 LEA 128-bit block cipher (ISO/IEC 29192-2:2019) 255 | - TTAK.KO-12.0276 LSH Message digest algorithm (KS X 3262) 256 | - US FIPS 197 Advanced Encryption Standard (AES) 257 | - US FIPS 180-2 Secure Hash Standard (SHS) SHA1 and SHA2 Algorithms 258 | - US FIPS 202 SHA-3 Permutation-Based Hash (instance of the Keccak) 259 | - US FIPS 203 Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM) 260 | - US FIPS 204 Module-Lattice-Based Digital Signature Standard (ML-DSA) 261 | - US FIPS 205 Stateless Hash-Based Digital Signature Standard (SLH-DSA) 262 | 263 |

Security Assurance

264 | 265 |

266 | The EDGETk toolkit was developed by a security engineer and includes over 140 widely recognized cryptographic algorithms. Despite not having undergone a formal third-party audit yet, its correctness and security posture can be reasonably assured based on several strong indicators: 267 |

268 | 269 | 287 | 288 |

289 | While independent auditing remains an important future milestone, the high degree of compatibility, adherence to international standards, and deterministic behavior across platforms provide strong practical evidence of correctness and reliability in EDGETk's cryptographic implementations. 290 |

291 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | gitee.com/Trisia/gotlcp v1.3.17 h1:t51XKujH5kXmCXwj13FswtlTDTk1PX5mg6ttx978j8o= 2 | gitee.com/Trisia/gotlcp v1.3.17/go.mod h1:qHAmzaW5L1B4YidGzCgGx8k8ai3+djcZ0kGrOmGVXpU= 3 | github.com/RyuaNerin/elliptic2 v1.0.0 h1:xuqrsvIXvT35maN5uiQV56TPZ/RQ+UhDF+fRFToDeJg= 4 | github.com/RyuaNerin/elliptic2 v1.0.0/go.mod h1:wWB8fWrJI/6EPJkyV/r1Rj0hxUgrusmqSj8JN6yNf/A= 5 | github.com/RyuaNerin/go-krypto v1.3.0 h1:smavTzSMAx8iuVlGb4pEwl9MD2qicqMzuXR2QWp2/Pg= 6 | github.com/RyuaNerin/go-krypto v1.3.0/go.mod h1:9R9TU936laAIqAmjcHo/LsaXYOZlymudOAxjaBf62UM= 7 | github.com/RyuaNerin/testingutil v0.1.0 h1:IYT6JL57RV3U2ml3dLHZsVtPOP6yNK7WUVdzzlpNrss= 8 | github.com/RyuaNerin/testingutil v0.1.0/go.mod h1:yTqj6Ta/ycHMPJHRyO12Mz3VrvTloWOsy23WOZH19AA= 9 | github.com/codahale/makwa v0.0.0-20141227225204-3dbfaeed5fdb h1:8p7p0keqd2EGoESuU78k+Cxm4X/3awlzMl7nsPoDvnw= 10 | github.com/codahale/makwa v0.0.0-20141227225204-3dbfaeed5fdb/go.mod h1:4B/sRpOorAPzUAhh6hjHBmsImbVGoM6+GnZDs1qmZ3k= 11 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 12 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 13 | github.com/deatil/go-cryptobin v1.0.4018 h1:nEnp6OctddN68zbWmq6faJ082JDzxwfemxzrffGEegY= 14 | github.com/deatil/go-cryptobin v1.0.4018/go.mod h1:N039cMpRk2+cxODj6Y1TfEPw2Q/AZoItzU2LT7VRbbg= 15 | github.com/emmansun/certinfo v0.1.0 h1:f3xgzFHjGkeEKUysCuofc8UOyYqRNP9LIWZa5o1Dz1U= 16 | github.com/emmansun/certinfo v0.1.0/go.mod h1:nS7ylLEXORr7PEZRhAl/qbxI3YKHuc2ZRKKpK2BV72Q= 17 | github.com/emmansun/gmsm v0.32.0 h1:MWgIRM/EKR4heOr7nXA5ylpfWfObgQkhb8qCamkQAd0= 18 | github.com/emmansun/gmsm v0.32.0/go.mod h1:NtH8X3s0ywBIICiOHD6Jj6P4brHHN6qUOI/nSK/x1jQ= 19 | github.com/emmansun/go-pkcs12 v0.3.0 h1:Z6aEkN2cOFIBptkWaItZiBkpFTwAdMIVQ+rTska3eT4= 20 | github.com/emmansun/go-pkcs12 v0.3.0/go.mod h1:YzC1HYqbo4fKiK4REz/2roIIAQ7iL1ZrdCZJ3XBjD94= 21 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 22 | github.com/kasperdi/SPHINCSPLUS-golang v0.0.0-20231223193046-84468b93f7e9 h1:G8fshCtNb60L5IM2tuYD81uh6YQFqJ78MAGUCMks7Bg= 23 | github.com/kasperdi/SPHINCSPLUS-golang v0.0.0-20231223193046-84468b93f7e9/go.mod h1:XWeSWo+UqzMi1uh/Td/gKlVHaPQjUj92s3omn7eccUM= 24 | github.com/klauspost/cpuid/v2 v2.0.12 h1:p9dKCg8i4gmOxtv35DvrYoWqYzQrvEVdjQ762Y0OqZE= 25 | github.com/klauspost/cpuid/v2 v2.0.12/go.mod h1:g2LTdtYhdyuGPqyWyv7qRAmj1WBqxuObKfj5c0PQa7c= 26 | github.com/pedroalbanese/IGE-go v0.0.0-20140730194654-752bc7fd80fb h1:2GTkI6b/GaOzjZSB161w491QrxsHWpxV1FNr7ds+7Jc= 27 | github.com/pedroalbanese/IGE-go v0.0.0-20140730194654-752bc7fd80fb/go.mod h1:EnRxQQGUSvWsqNFSAtGSuyjJKl91Csy57sQ1atRV01k= 28 | github.com/pedroalbanese/anubis v0.0.1 h1:FRHSMyRuqoGqWnFj0ZOJ3cQmPZ5elkxRecHptbILX3w= 29 | github.com/pedroalbanese/anubis v0.0.1/go.mod h1:MMJog7ga594ydzm17Qzj8wIynFJmrp/gFzZIjdX/2fQ= 30 | github.com/pedroalbanese/bash v0.0.0-20240917213542-359ea9ed86ee h1:fEtvbAuD3pS89760fakRF1TMILzzUNP3hwXP1iRvWOM= 31 | github.com/pedroalbanese/bash v0.0.0-20240917213542-359ea9ed86ee/go.mod h1:NLb79U8xurLknGY14SmHMc6T5Zm+FrKXxQQP/ljmbno= 32 | github.com/pedroalbanese/belt v0.0.0-20240917222837-2f97e6235d6c h1:pYWtGpNSk0Dm0TuLaAoyW9BWr01jA/vBETn1ktUnjQQ= 33 | github.com/pedroalbanese/belt v0.0.0-20240917222837-2f97e6235d6c/go.mod h1:ujpAT/1mRF+xuzRCE3e6vqaNORb5bUsooxfOb74G66c= 34 | github.com/pedroalbanese/bign v0.0.0-20240918155826-90ccb6b122b9 h1:ZgsVqQ9slkgsbOUZ81wHkb0+WGJu1bcVIEQS62HX7GM= 35 | github.com/pedroalbanese/bign v0.0.0-20240918155826-90ccb6b122b9/go.mod h1:UJPuisyOGkYoVfs8ta0O7kMngLwkntg2En55cISTTsA= 36 | github.com/pedroalbanese/bip0340 v0.0.0-20250309175356-f4246d336869 h1:s8etgogfhrjDbqE1Ts/hrh2UFdoZ0EGq/4kCdkz9O0U= 37 | github.com/pedroalbanese/bip0340 v0.0.0-20250309175356-f4246d336869/go.mod h1:E96V3xC9SIYZtG5bBe26XNrD/Qr0ltit22OQt4qCfis= 38 | github.com/pedroalbanese/blake256 v0.0.0-20170713140427-6aca07c5447e h1:fQBIZ8P27Y4TAXoY3Y/+TDZhGJLDoRTyh1ctP/XgHZI= 39 | github.com/pedroalbanese/blake256 v0.0.0-20170713140427-6aca07c5447e/go.mod h1:5gQQeeXADClOkGWSusDk866hYd5wRPDwhMTFnD/dzG4= 40 | github.com/pedroalbanese/bls12381 v0.0.8 h1:zosxFxpH4EGlcq92ZlZ0MfHpBcPorb7l+87CyHpbic4= 41 | github.com/pedroalbanese/bls12381 v0.0.8/go.mod h1:el224rja+5DSTUGRp/u8dMT5S+JDPbvFVjPEi5QONTQ= 42 | github.com/pedroalbanese/bmw v0.0.0-20240608175405-99257887a774 h1:vULfXcjdqnehx2oeCXv26rKhUWhGwiBCNzYhYt0J9W0= 43 | github.com/pedroalbanese/bmw v0.0.0-20240608175405-99257887a774/go.mod h1:Rw6vKDOkrW6pl9uoO8ggkouF5UyP5DEBZrq+ee6L0V8= 44 | github.com/pedroalbanese/bmw256 v0.0.0-20240403151626-135f0d278f9f h1:YZBM8ykr/8ZfXTwjs9HoUwvLBuraOQWnCjtzKRnHpkE= 45 | github.com/pedroalbanese/bmw256 v0.0.0-20240403151626-135f0d278f9f/go.mod h1:Rc/1QLBTMe/hEi5B3whj43ET/GJeOZQSq+1Z6AOEPNA= 46 | github.com/pedroalbanese/bn256 v0.0.0-20241211180157-f48a503b4cc5 h1:LVOPzn3PduvLJAjXXUwrzIgD9VhAQ+NGNFIoW3rAcMA= 47 | github.com/pedroalbanese/bn256 v0.0.0-20241211180157-f48a503b4cc5/go.mod h1:Em2M+vuPGTmX2DDgxCWWokMC3cbzz3K8SO4bhZ4VbMs= 48 | github.com/pedroalbanese/brainpool v0.0.0-20220826183126-be5c94625a31 h1:/bvB70wSZaqS4L6TPKvKWCfw2WvFRhPzDGChLqnWsXM= 49 | github.com/pedroalbanese/brainpool v0.0.0-20220826183126-be5c94625a31/go.mod h1:mVfIsJq9zs0tLKHNxL3rzd7+jFP0B9/060JBx8PdMnM= 50 | github.com/pedroalbanese/camellia v0.0.0-20220911183557-30cc05c20118 h1:GJQwwzoQDXGcYO35ViGcG/A994BGB35/7dNoVW4Je8s= 51 | github.com/pedroalbanese/camellia v0.0.0-20220911183557-30cc05c20118/go.mod h1:V3wL7j9ikGCLRV2DMTQZnUqZQnGcQGEqpvTLE0ZcGY8= 52 | github.com/pedroalbanese/cast256 v0.0.0-20240325185652-e35cf700d5fe h1:1UuaurNAznpY2aqRKE90HzZ2crOVzCXsBUogXTO8D4s= 53 | github.com/pedroalbanese/cast256 v0.0.0-20240325185652-e35cf700d5fe/go.mod h1:YtTQJCJmrmPEW8OTlxD3zLFHzwJzw8XeVfO7LvgVwdE= 54 | github.com/pedroalbanese/cast5 v0.0.0-20220924202825-3e5c3c00277c h1:fKLoo18L3mIH1rIKyTqUmmDT8a0xRYN932G7fqVeZ1k= 55 | github.com/pedroalbanese/cast5 v0.0.0-20220924202825-3e5c3c00277c/go.mod h1:ta7SFMOyQjU4OMM+J+npSOLu6VT4J4ZiQ/a7Chfw8is= 56 | github.com/pedroalbanese/ccm v0.0.0-20230716211039-49b744fc07d4 h1:tCd+bQzK/S5XLD9BCugZiaPG0wgqYKKkDXdu9hAVty8= 57 | github.com/pedroalbanese/ccm v0.0.0-20230716211039-49b744fc07d4/go.mod h1:btc5wbjPbKknQqm4PX7KXV4Z2LDM8ykDUwLNO+MNPRc= 58 | github.com/pedroalbanese/cfb1 v0.0.1 h1:qwDH1SeUwfu/5J80rS9mtwynJBhxMBIOJ6z/0Zkr4/0= 59 | github.com/pedroalbanese/cfb1 v0.0.1/go.mod h1:uk0dfHN9DnVbA8n5orzVtOaUHyHiaWeJkbHgCaUqUso= 60 | github.com/pedroalbanese/cfb8 v0.0.0 h1:+jfeldix8MoUNIGRqE2aGS05kjOYWsBjphu/OdiZ0bU= 61 | github.com/pedroalbanese/cfb8 v0.0.0/go.mod h1:RQTDlvBNZIE7xaQuoiYIXYTxBR//B+HhEZpidQHFivY= 62 | github.com/pedroalbanese/cmac v0.0.0-20210429130952-a58975ec8f4c h1:mX7NRMOVOwh5IVth4a/wsF5ZSO8uAZ6/NNepa07u9jg= 63 | github.com/pedroalbanese/cmac v0.0.0-20210429130952-a58975ec8f4c/go.mod h1:5AAl1CY49A0PRTLlbGIOkmWLRyDY3c9WfBjdOWDGWww= 64 | github.com/pedroalbanese/crypto v0.0.0-20230125215802-8b7e99ecbad3 h1:4NrgC9fL8DwmiwNA1+I6Cs4LopxRoWEji0dB67sctBs= 65 | github.com/pedroalbanese/crypto v0.0.0-20230125215802-8b7e99ecbad3/go.mod h1:5cDdJVhbinbOlgaYbV5VCTcU+3BxpeGfWAGwyjoAcbg= 66 | github.com/pedroalbanese/crypton v0.0.0-20240325185448-da9f3c02e89e h1:OeHXNwyvz+hYHeHOAmU8T7XBMXGLhSCKOYC+ZldtqT8= 67 | github.com/pedroalbanese/crypton v0.0.0-20240325185448-da9f3c02e89e/go.mod h1:/yQQxddGTbb/ym/4TtEUT1cIu+qq/6mUIvNoY3QuQ8o= 68 | github.com/pedroalbanese/crystals-go v0.0.0-20240315230756-81011b679705 h1:4CLNJaE5LWdprM1sJ+8cCAU8NX83qA7jtJWSTtrcX4Y= 69 | github.com/pedroalbanese/crystals-go v0.0.0-20240315230756-81011b679705/go.mod h1:eQaDBF+TSsUrQDIzKrhRPR0tiS2wYsAiWzIP9W0GIRs= 70 | github.com/pedroalbanese/cubehash v0.0.0 h1:y9AhRV9uJx6tnGeoWg2eC91TkTsjRqsdxSQOpbubSlE= 71 | github.com/pedroalbanese/cubehash v0.0.0/go.mod h1:QqD7USkRZMUwdDsx0SR2EqgIpN8MZhtQuYMG8R9IqeI= 72 | github.com/pedroalbanese/cubehash256 v0.0.0-20240403151932-00980243a56a h1:asiodxOIQwslajkbCNdp9YXNgnu/gs8JrtSZqVfhF9w= 73 | github.com/pedroalbanese/cubehash256 v0.0.0-20240403151932-00980243a56a/go.mod h1:Z2BgPpFmhJNjGbN+Mn+w958d5AmribgkmBjUx8E1p1g= 74 | github.com/pedroalbanese/curupira1 v0.0.0-gama h1:PHGQGjgVn2ftBEJ07Az2a59X4a2hV+zgdvnXKXisdcE= 75 | github.com/pedroalbanese/curupira1 v0.0.0-gama/go.mod h1:gVwAY6kuZ75rbc23q1p9JEhJCW3ChiE/R58OMXFOCrw= 76 | github.com/pedroalbanese/curve448 v0.0.0-20240514173232-895b1c6c93a1 h1:BuZSs4ADd9EQniS4TgiTvKbGODpVauR08A4Dl2PHsV8= 77 | github.com/pedroalbanese/curve448 v0.0.0-20240514173232-895b1c6c93a1/go.mod h1:MjPWywlG0DzX9aN6H+axPhx/sVbkRrL1zPdUx+WM3K0= 78 | github.com/pedroalbanese/e2 v0.0.0-20240325185507-eef2e0916dc5 h1:FnMVMHfgzLncnoEynabLtFjcs/qyjWIk/Tfv73i71Wo= 79 | github.com/pedroalbanese/e2 v0.0.0-20240325185507-eef2e0916dc5/go.mod h1:Tr9cxhKAXoMqBPy3IJfkyKNNDpj7sBW1eShP7B5KsrQ= 80 | github.com/pedroalbanese/e521 v0.0.28 h1:iQQpTimx3YVvoFKy/DPukfSqj0V0dHD6YTJNiGuS8XM= 81 | github.com/pedroalbanese/e521 v0.0.28/go.mod h1:yVgnpFuuMFc86MqpZq3jGz+P45buIpDbL43/x4ux61Q= 82 | github.com/pedroalbanese/e521 v0.0.30 h1:LGnadPxE3L0F4nf3EH/NsxhSIz0QLTXTT3Z7CMcfxdc= 83 | github.com/pedroalbanese/e521 v0.0.30/go.mod h1:yVgnpFuuMFc86MqpZq3jGz+P45buIpDbL43/x4ux61Q= 84 | github.com/pedroalbanese/eac v0.0.0-20250428171516-10a5a5e733cd h1:TLkF+8dJM3wr/xiObfFFoSEaMJKmKK19+a+8ZQEjODU= 85 | github.com/pedroalbanese/eac v0.0.0-20250428171516-10a5a5e733cd/go.mod h1:HXHtHfhpogbbSC9Ne9RnLzLLcvuuaOlBbmqEZVcI80c= 86 | github.com/pedroalbanese/eax v0.0.0-20240629182935-b915af1b69bb h1:p34KMk32ZwGYzkwEHOl6wysS3ZujV5Pz0iE4QrWRoS0= 87 | github.com/pedroalbanese/eax v0.0.0-20240629182935-b915af1b69bb/go.mod h1:0CjgupJmGspryEr9zLAn0FpbD9AHy6m1L97mDkDQZ/Y= 88 | github.com/pedroalbanese/ecb v0.0.0-20220918174126-1a696b93ae2b h1:b+T06WpwxEPv4rTxVK64JxnEs0oLlJ0nifFdUDysVjw= 89 | github.com/pedroalbanese/ecb v0.0.0-20220918174126-1a696b93ae2b/go.mod h1:g/+SLuBiyj6xkBXvOu8P1LODdpuuxKHT20mrPXoWIec= 90 | github.com/pedroalbanese/ecgdsa v0.0.0-20250309172633-1e9ac31fec97 h1:ygVariisNu4LeGk6ZdrUoEcZUY35wqS3tmOBPBEzz0M= 91 | github.com/pedroalbanese/ecgdsa v0.0.0-20250309172633-1e9ac31fec97/go.mod h1:oOoAwgkrjZQg23DBcxZ8Xdmsp7cQmXT6vxZ6m+btDiI= 92 | github.com/pedroalbanese/echo v0.0.0-20240329160327-5e65f19de84b h1:Vu+SqFOWpvOTUapuxOAX1e0lU0FPQDSc37HrPYGd3cc= 93 | github.com/pedroalbanese/echo v0.0.0-20240329160327-5e65f19de84b/go.mod h1:U6NRfMc+286M97zvSQeCdj4M0neYRMvG8F1vTBeBzl8= 94 | github.com/pedroalbanese/ecsdsa v0.0.0-20250309175503-d735dfab325a h1:Sv9USdCBsEpNH5vtCtrFq4iIWorctwEhcHRhv7b1uqo= 95 | github.com/pedroalbanese/ecsdsa v0.0.0-20250309175503-d735dfab325a/go.mod h1:CpY75GPFxZm2YlF1m6JHL6Dj/ayE7HvEf8L3dvevlS4= 96 | github.com/pedroalbanese/esch v0.0.0-20240403151441-bc287e464d49 h1:BsvB9nLKqo0Qda65ifrLUi7kCFvDYOhZLPMFLuc74/8= 97 | github.com/pedroalbanese/esch v0.0.0-20240403151441-bc287e464d49/go.mod h1:9hCtNsTTKNYGLz1UEkcHjgjNaEDSm8TPV2raKU5n39U= 98 | github.com/pedroalbanese/frp256v1 v0.0.3 h1:z1SFNSEnwFPpzLcWi3uDEBW4L5FuV5ZBy4TUtnEJhiQ= 99 | github.com/pedroalbanese/frp256v1 v0.0.3/go.mod h1:SR4Hs4jO6qwp6ETOZfL5C1msUCU//1vkM+482MiBTRU= 100 | github.com/pedroalbanese/fugue v0.0.0-20240518170253-4e3af93fc75a h1:EYdKheliAveGcxZ90vZG7UO8iTU+aD0CJhuKA1gIN9s= 101 | github.com/pedroalbanese/fugue v0.0.0-20240518170253-4e3af93fc75a/go.mod h1:DpPiVXahBQyOpZv7OOS8sdr8QVevW54TgYZ91T1do94= 102 | github.com/pedroalbanese/gmac v0.0.0-20231030174635-9eb35b8b4542 h1:0tnk5HZQn7Fh/+9eapnUoRug1oYGEmnxnSMN18CfF/k= 103 | github.com/pedroalbanese/gmac v0.0.0-20231030174635-9eb35b8b4542/go.mod h1:BZB52OIvxtWiPNuWf4nYIDU+2zFAisdwdWNtYOn1Xqc= 104 | github.com/pedroalbanese/go-ascon v0.0.0-20240325185942-de83d7994a95 h1:neZv2pO//gMHXQ+22JpQMXpgRQRk25D/Upnt8tIY3yk= 105 | github.com/pedroalbanese/go-ascon v0.0.0-20240325185942-de83d7994a95/go.mod h1:EjAmbU3fA9mdAT8BGnLVNTR5rUYEpIG/VK056gJqv6E= 106 | github.com/pedroalbanese/go-chaskey v0.0.0-20230117155006-a9e41c18223c h1:Ji9KhJxym1GjLQ9eCRY9usH8wOXtJ/ZP+lIeA94YBQc= 107 | github.com/pedroalbanese/go-chaskey v0.0.0-20230117155006-a9e41c18223c/go.mod h1:5F8Scq4sW8D+yL/o8yrNT6R5PeamiYpW9DAu3i7kE6c= 108 | github.com/pedroalbanese/go-external-ip v0.0.0-20200601212049-c872357d968e h1:VUR1tH5e1MXJgiJNq+8kh8ztihi5/wrkuIEG4bmYpBU= 109 | github.com/pedroalbanese/go-external-ip v0.0.0-20200601212049-c872357d968e/go.mod h1:SvmxrS/2giIWAuUE60MY8tf9mgI0gBLc1Q1W4juTans= 110 | github.com/pedroalbanese/go-grain v0.0.0-20240325185755-73b4f13ea6bc h1:0i9CwHS0m0ryTTv7LYOsg17ylUHy208mD+ibBo+RCFc= 111 | github.com/pedroalbanese/go-grain v0.0.0-20240325185755-73b4f13ea6bc/go.mod h1:+ogFra2K6u0dQalD5NLSqArrqUgcayJYehhivn2+Pso= 112 | github.com/pedroalbanese/go-idea v0.0.0-20170306091226-d2fb45a411fb h1:DbXfqQlMrVOoCnlaUvadwU9wlmuEcTHD1AJjDzls5KI= 113 | github.com/pedroalbanese/go-idea v0.0.0-20170306091226-d2fb45a411fb/go.mod h1:MCFBIvwimQFbM99CHdVwTKr7PhaYgQpsK8zRRECmACk= 114 | github.com/pedroalbanese/go-kcipher2 v0.0.0-20170506094415-4fcf5aa27627 h1:UTBcC74OvxjaX6OjvhznvP8ZR3JOVOBr7bOMBp4ELgk= 115 | github.com/pedroalbanese/go-kcipher2 v0.0.0-20170506094415-4fcf5aa27627/go.mod h1:K9++QOhv26m2sWb/B7RLfKxvL2Buc3UZVq4cL5WJ6lY= 116 | github.com/pedroalbanese/go-krcrypt v0.0.0-20170928183100-a0c871728ae1 h1:u0NdzhCdSPnuRA2nKIg7CAW0F8Pl8dRooy/g0i+4tGw= 117 | github.com/pedroalbanese/go-krcrypt v0.0.0-20170928183100-a0c871728ae1/go.mod h1:7LOlyYV2C5+0UD7eoPYN9fuGds6A3Y73tWihNKFQHO8= 118 | github.com/pedroalbanese/go-misty1 v0.0.0-20150819220543-a3984aec4fae h1:PVfyVgFdoXAjRuwM4dqEUlIXNrY0gwKeyJ9z/9AbTZ0= 119 | github.com/pedroalbanese/go-misty1 v0.0.0-20150819220543-a3984aec4fae/go.mod h1:nc3lEnA3uS8fyzDdV4TJ0LPv1gpFy/0pxiz6CFb1vbI= 120 | github.com/pedroalbanese/go-nums v0.0.0-20250217142054-d8f977c4e11d h1:92vFXCQuSDv3JR4aeZMWmMtiXP2DZ+TboQDeScoF7j8= 121 | github.com/pedroalbanese/go-nums v0.0.0-20250217142054-d8f977c4e11d/go.mod h1:+GKpx+TkdZebYybxqYtMZSyZPp5w3SHaZJCzAuc3g74= 122 | github.com/pedroalbanese/go-rc5 v0.0.0-20181025211356-a14dd155920a h1:A44dEfQF9P/nft5Oi/lteB6Tk3krO+xe3r65D2FiMZc= 123 | github.com/pedroalbanese/go-rc5 v0.0.0-20181025211356-a14dd155920a/go.mod h1:nVuhsla4svgWTrzUbeg75dMmFkaqmnTabTVE2OmK3bA= 124 | github.com/pedroalbanese/go-ripemd v0.0.0-20200326052756-bd1759ad7d10 h1:iu0q912gVo1C2uZBdh875c/Ht1gstFAjMYjrgm9AL9Y= 125 | github.com/pedroalbanese/go-ripemd v0.0.0-20200326052756-bd1759ad7d10/go.mod h1:njkESwAoSiroc25e1pcoqQVlecnhnW62Bf7VTQal2SY= 126 | github.com/pedroalbanese/gogost v0.0.0-20240430171730-f95129c7a5af h1:8jbTN9e84FOzAJtCPdy/NEz8983YdD7nqTBMQlTRP4w= 127 | github.com/pedroalbanese/gogost v0.0.0-20240430171730-f95129c7a5af/go.mod h1:A4x4C7B6z2POO1x5CZzKXZVCOFPfjzxxVUbWl2Thhp0= 128 | github.com/pedroalbanese/golang-rc6 v0.0.0-20240204183933-f7014051ac04 h1:q9GTq1BJe0tl+zH/8/2wxCz7upf4LlHxit1Rd5w8svU= 129 | github.com/pedroalbanese/golang-rc6 v0.0.0-20240204183933-f7014051ac04/go.mod h1:dM7Tk4qnsWH8/wcC2j33Krm02foYUCX3vn95jAPMr4E= 130 | github.com/pedroalbanese/gopass v0.0.0-20210920133722-c8aef6fb66ef h1:WS+9fDuTDnvWYKS7W/xyY3GiNRJvLMcYBUk4koW89/8= 131 | github.com/pedroalbanese/gopass v0.0.0-20210920133722-c8aef6fb66ef/go.mod h1:o3gfYg4p7EKXxkukiCDR4akrR2HGKSdoQqCgUE8pga0= 132 | github.com/pedroalbanese/groestl v1.0.1 h1:Bpm/ppHc4ttlVwlv7urAYp5p++4AJLYSyNlbsrWVH4s= 133 | github.com/pedroalbanese/groestl v1.0.1/go.mod h1:nYspmiUzgmuD8WKz0y6LJGPSvaRog/kieJ4ntdz69ak= 134 | github.com/pedroalbanese/groestl-1 v0.0.0-20230125170437-46d496027e3d h1:fWeBGfRwCRwwwwvYG3vdjwCk97yHBDsbKY2YiQ8AUjA= 135 | github.com/pedroalbanese/groestl-1 v0.0.0-20230125170437-46d496027e3d/go.mod h1:DnN7TxrHs0W6np4fXq8hIMNskNsMrzWE2pE6cfCuoK8= 136 | github.com/pedroalbanese/hamsi v0.0.0-20240518170147-c7c58b0f2a86 h1:ehH1xPL2bfy18rF8YoaPKMZpuozc8MMXcxeriUb9Oac= 137 | github.com/pedroalbanese/hamsi v0.0.0-20240518170147-c7c58b0f2a86/go.mod h1:/hgbJETGKOev52fhFzCUcxR8o13oSPcQgCk0p40Bkto= 138 | github.com/pedroalbanese/haraka v0.0.0-20180824194238-3cf1081eecd7 h1:ZlrjMhDWGMNArNgUHyoBB8i3lSAEAu2QlMaP97Go73U= 139 | github.com/pedroalbanese/haraka v0.0.0-20180824194238-3cf1081eecd7/go.mod h1:cCbAP1i+ZYSWsGVvukP8j1dujpeYSmqWBLgjO7aMUi4= 140 | github.com/pedroalbanese/jh v0.0.0-20240624180005-e6705e517191 h1:FBt+nyfKF8Mk0WAIhPTtUUI695Z1+DaS19axxDVKwwM= 141 | github.com/pedroalbanese/jh v0.0.0-20240624180005-e6705e517191/go.mod h1:lRQmOrzaIkLGMHlQjPwc6+tsnPn3bzYKZQ2I2wM9A4k= 142 | github.com/pedroalbanese/kalyna v0.0.0-20240325185136-5fa784896340 h1:cRHxGJXJf1qVDHgvfTzqdsc3WxdOkIEIBjnm8ZkOwwo= 143 | github.com/pedroalbanese/kalyna v0.0.0-20240325185136-5fa784896340/go.mod h1:D5fTMnrNb4sgSn6khyjDIMa1tw+FxC2l68nvlMRpoyY= 144 | github.com/pedroalbanese/kg v0.0.5 h1:pIpvi8ntjolg2JoIezYKo/EtEwQSbE9CQdx77WUd82U= 145 | github.com/pedroalbanese/kg v0.0.5/go.mod h1:JMka4mTJ/Hy6JomD/tTLX1uOthQNZaw76ZoxvMt9kdw= 146 | github.com/pedroalbanese/khazad v0.0.0-20240325185634-12dbcf5e3eaa h1:cZdc/KtPwhHgYsMU+hRdcZcW9GBieYwR9ps3PmDifkY= 147 | github.com/pedroalbanese/khazad v0.0.0-20240325185634-12dbcf5e3eaa/go.mod h1:DBvaJ2IyCyFyXiXOvO5Alu+Gqz9qwztaHE83ncrbpw0= 148 | github.com/pedroalbanese/kupyna v0.0.0-20240326161126-ebb2f9665eeb h1:1Rr4D6zpGzszMOAzSB4ZEiB7nrCVjDGDwS+lmZegPbQ= 149 | github.com/pedroalbanese/kupyna v0.0.0-20240326161126-ebb2f9665eeb/go.mod h1:10vp0zcBnFeyTRQqw/3k5YnvZXTQkuJC/n/FzGPsK5w= 150 | github.com/pedroalbanese/kuznechik v0.0.0 h1:JiVREgKdbKnvof57hL1sCkatIy97JBymQwUUDrorSEo= 151 | github.com/pedroalbanese/kuznechik v0.0.0/go.mod h1:mRbUXtz1RYBvxIjCRPSM4fw6/KPfBRVh3jiX3BMhHO8= 152 | github.com/pedroalbanese/loki97 v0.0.0-20240325185530-a0580bcacc04 h1:n8deRIWCc5W4OOvmtgkrA45nzJ0YFkQhJX3isZTdv68= 153 | github.com/pedroalbanese/loki97 v0.0.0-20240325185530-a0580bcacc04/go.mod h1:IyAG96OpzT6cPTt2MaoOHfDaKC8dqrVJQEE6AK7Vu90= 154 | github.com/pedroalbanese/luffa v0.0.0-20240518171333-cf7dac6a64ae h1:TfoKdzyc0HimH3iMGEp7bS+XfJfYT2qxX1KyJkKIaKc= 155 | github.com/pedroalbanese/luffa v0.0.0-20240518171333-cf7dac6a64ae/go.mod h1:9bd3I8VuODfmo7r2Qhn7r80eTKw1T2xADn+/1UVwwAM= 156 | github.com/pedroalbanese/lyra2re v0.0.0-20240520232624-5764a75dde63 h1:+XEkoqqSwTSlFnXSCBQ24mDIeCJV7yt4x+Der5a4PHs= 157 | github.com/pedroalbanese/lyra2re v0.0.0-20240520232624-5764a75dde63/go.mod h1:bEuOFddm39XiU3VS0N/TBoh2xf87TTpfTyFdF2bsyqk= 158 | github.com/pedroalbanese/lyra2rev2 v0.0.0-20240608181906-fe968f886565 h1:KQMsPhBYq2xc6c7vt66FZKyhLn+kMDdb0RUOinCZPLE= 159 | github.com/pedroalbanese/lyra2rev2 v0.0.0-20240608181906-fe968f886565/go.mod h1:WzQCkJ6PKTEVXLB2crTSC5vlTzT8oWiokrv2ktSScGI= 160 | github.com/pedroalbanese/magenta v0.0.0-20241208214047-a79e5e9ef277 h1:aFEpvTY/438+a6hvI1yk3l+VamidGgKJ6BUENwbsM9Y= 161 | github.com/pedroalbanese/magenta v0.0.0-20241208214047-a79e5e9ef277/go.mod h1:ebf40cDfhkGdDrbzvYGLjAND6H4Z53TfVeRxSENbWrg= 162 | github.com/pedroalbanese/makwa-go v0.0.0-20240816162209-f803984910a2 h1:AyAUVVlkouW2SuTEb41FYda0fedppRFIzrH82s/o9n8= 163 | github.com/pedroalbanese/makwa-go v0.0.0-20240816162209-f803984910a2/go.mod h1:MkIf6Ek6B/wwQX73mATiQsUUcLew60Nt8cRKCDdhi1M= 164 | github.com/pedroalbanese/mars v0.0.0-20240325185557-fe8b863ed824 h1:6FsfSBNeRnNuLIV4/cswytVkOaPa6Pq7ND+hf6yMNnM= 165 | github.com/pedroalbanese/mars v0.0.0-20240325185557-fe8b863ed824/go.mod h1:HFit7W/qku47mv/XXJPDb3gW+/JNc9/CJucToyf51FQ= 166 | github.com/pedroalbanese/matrixgl v0.0.9 h1:GcGj+0ecG1oIjoes6IpfUIKNfaRG9KVYrBImtCauSKw= 167 | github.com/pedroalbanese/matrixgl v0.0.9/go.mod h1:d5oRAzvom47N5OZwHGpDBdwS+VV4oyndVqPmGzkdi+0= 168 | github.com/pedroalbanese/md6 v0.0.0-20240815222317-052c055905a4 h1:T10NNFGRLmLuOKm+d0Xrb4mZWxjHRCLLXqUrB8bdT5A= 169 | github.com/pedroalbanese/md6 v0.0.0-20240815222317-052c055905a4/go.mod h1:SnCwEQNkRaJCqW/jmXTc+lS/yeUtoT+fJh/uczEj4MU= 170 | github.com/pedroalbanese/noekeon v0.0.0-20240325185408-f90c60f5190f h1:caqvKxlrANDDoyw5kaJI/jTwi6mQ6Kf9TfyvPya3eWI= 171 | github.com/pedroalbanese/noekeon v0.0.0-20240325185408-f90c60f5190f/go.mod h1:EU9JfJfUL1/CHNbBTZQ53twTUaXVhYivkJKQNmZ4NI4= 172 | github.com/pedroalbanese/ocb v0.0.0-20230501153203-7d2a80fe6a75 h1:HebmTqQwgn/gCSlkx/knOOm9hdChtzGVA5aBykymRjU= 173 | github.com/pedroalbanese/ocb v0.0.0-20230501153203-7d2a80fe6a75/go.mod h1:dlllB0nX79F4Pfwaf5HOgrZ97nQE6ISo4lK2DHPZOlw= 174 | github.com/pedroalbanese/ocb3 v0.0.0-20250818172449-cf949c2a64b2 h1:7a6Pd91lxufXKJioCLW2tr9ZQqppKbVE0gXBYipUqw8= 175 | github.com/pedroalbanese/ocb3 v0.0.0-20250818172449-cf949c2a64b2/go.mod h1:IWXK6lfpkAL1e5YtIku4d+6cZNlxu7+NpABckKwaVC0= 176 | github.com/pedroalbanese/panama v0.0.0-20240325185906-f9d6500cb56b h1:vYTR/DxOdzoaaT0SLkgAl8W07caWIauTY7DboGn036A= 177 | github.com/pedroalbanese/panama v0.0.0-20240325185906-f9d6500cb56b/go.mod h1:yBu1efo/Rh/R8T/BEouh3QtLqXXioeI5MT8UZTUY5Uo= 178 | github.com/pedroalbanese/pmac v0.0.0-20240715205711-f4d312cbf6c5 h1:aAP1McSRlLhwZLw/fq8yVlXQdYJFTD+ZYZa5x1Ef2cE= 179 | github.com/pedroalbanese/pmac v0.0.0-20240715205711-f4d312cbf6c5/go.mod h1:gcomSeqoCX+TqezdqwWmawVM3fMYfkQzPQGvdD05oa0= 180 | github.com/pedroalbanese/present v0.0.0-20240325185615-de3b5340e616 h1:VW2Fk3abLMKk3OSgi7mwiOE1cOM3f0WIJZVqAQUBndQ= 181 | github.com/pedroalbanese/present v0.0.0-20240325185615-de3b5340e616/go.mod h1:icukKC0YVdziTf84j3RMM/gsgkOevawx6RK5ryq9rCA= 182 | github.com/pedroalbanese/rabbitio v0.0.0-20230209212404-cffc97bafde8 h1:hX/DUv+poyEhCCShks90WRD9JiOw2Am73w4+ynIBO8g= 183 | github.com/pedroalbanese/rabbitio v0.0.0-20230209212404-cffc97bafde8/go.mod h1:MmrAYZpoio8QcKfgalZGmVW+i2MJnnTqE99jDfBIgyE= 184 | github.com/pedroalbanese/radio_gatun v0.0.0-20240520204859-03d5d3af41c3 h1:sw4oVrJN8X7HpbgJfiiNFucfjtAVrB/fbuWMl+xCFmU= 185 | github.com/pedroalbanese/radio_gatun v0.0.0-20240520204859-03d5d3af41c3/go.mod h1:06qiijoMNRnYSUPmbaCA9ZytQpzz+FOzhFk9LksDYDI= 186 | github.com/pedroalbanese/randomart v0.0.0-20130402080559-540116cac932 h1:lhyWm5kEilIJI800qc210GWsjJmln9o3vEr71nur//U= 187 | github.com/pedroalbanese/randomart v0.0.0-20130402080559-540116cac932/go.mod h1:VkPk1ppMWhMMgMxu4kLy8vGEvxY3Q+hp/SN9za0GKxc= 188 | github.com/pedroalbanese/rc2 v0.0.0-20131011165748-24b9757f5521 h1:ObGXSrJQ6vQQrCU+A0ywvQVtFv5g0RnMZIhMhQ8e7O0= 189 | github.com/pedroalbanese/rc2 v0.0.0-20131011165748-24b9757f5521/go.mod h1:BOC4I1JujHVVw3USD93sIGqc7jJhuWuIM5ktBhoKuco= 190 | github.com/pedroalbanese/secp256k1 v0.1.3 h1:XmLIaFhMnHwDfvDV4bmZCEqnaBJ6aYdip782PHB6KcA= 191 | github.com/pedroalbanese/secp256k1 v0.1.3/go.mod h1:EojpbgO+hzxqvWd/PHHU80GBFo1H3f0TLsg8uvwBOFM= 192 | github.com/pedroalbanese/shacal2 v0.0.0-20240911175924-cbeaa118c471 h1:Vowj5S2FIh0GIg1imAuhCPjd1ASYLKkFLao8ue111tE= 193 | github.com/pedroalbanese/shacal2 v0.0.0-20240911175924-cbeaa118c471/go.mod h1:bWZcx0Co4UdLZ5Bq3O6TeMdoVKZF83gfBS4IRd+diPo= 194 | github.com/pedroalbanese/shavite v0.0.0-20240518173728-5c0c7c528bc7 h1:tL7V7WlvJgewJcqVefTYyhFFy6q7drdU0KwOoAhkjbw= 195 | github.com/pedroalbanese/shavite v0.0.0-20240518173728-5c0c7c528bc7/go.mod h1:HYtZ0CPl+LnTvzExrbEYH6cwBM3LRzt13c7Jxwb4l98= 196 | github.com/pedroalbanese/simd v0.0.0-20240518173711-b73ebc90aae8 h1:mlApyl+IEN75Q/LyZUFfBSpx68evoOtSurL1WVkDrRo= 197 | github.com/pedroalbanese/simd v0.0.0-20240518173711-b73ebc90aae8/go.mod h1:LxkGKUarcIlPsj46P3n2yKAaFXjiyIOvZ2UGlE3lSOQ= 198 | github.com/pedroalbanese/simpleini v0.0.0 h1:G7TnIpt+JP5EIEppT+W2kRgMLk//ueJsdYnu2qcayYk= 199 | github.com/pedroalbanese/simpleini v0.0.0/go.mod h1:E9r51Vg+EBJgL2u7y9mjOWAaRIaioZortsfgEnoQDVw= 200 | github.com/pedroalbanese/siphash v1.0.1 h1:T+TonhTNw2HlCrsEBuaNb7lDOx4Kw6V4RpjDVRaNKHc= 201 | github.com/pedroalbanese/siphash v1.0.1/go.mod h1:jrEGQdGbMiXT88+cH4rWlcyCMUTjPbL5nAA44uYurV8= 202 | github.com/pedroalbanese/siv v0.0.2 h1:7a4k9CD8EVcVYBWKReqo7JLpLcIRs9CNIA166wKGOH8= 203 | github.com/pedroalbanese/siv v0.0.2/go.mod h1:SFmowN5wWV+l4Ng3SYMfTn5L3XG+1l/neGYsP9Kxs74= 204 | github.com/pedroalbanese/skein v0.0.0-20230124182825-ffe5e4ff3827 h1:G/kNAvy3w24SMiLmgYTSw0UnM5BQXhE/LMvReBMSUL0= 205 | github.com/pedroalbanese/skein v0.0.0-20230124182825-ffe5e4ff3827/go.mod h1:J5wSYblFVORXYLHPm3JoIZfB8yd3VI7C2TIfLLddO/Y= 206 | github.com/pedroalbanese/skein-1 v0.0.0-20171112102903-d7f1022db390 h1:OTTGLPoKatDyEYGK0xzhoTdCdNK51yXB9dTwKobeV44= 207 | github.com/pedroalbanese/skein-1 v0.0.0-20171112102903-d7f1022db390/go.mod h1:xQQEatlQb9wuT6Wkhjheo7jz6ToP55zd8PB2pm+2mT0= 208 | github.com/pedroalbanese/spritz v0.0.0-20140823220804-e125bc694ec3 h1:5W1zZxV+ngctweXfDxZSKlL7QsXxu14BpQ5qkrtjgx8= 209 | github.com/pedroalbanese/spritz v0.0.0-20140823220804-e125bc694ec3/go.mod h1:JCWryqsBv4ENKm0gjitOXlt7kS++zEeMdNkMpvSvwXM= 210 | github.com/pedroalbanese/threefish v0.0.0-20230828205611-8dc287bb1622 h1:OCUTDZV5e4MBOem1u3do6HuIQj0dyJZhIGCR83d/2Fc= 211 | github.com/pedroalbanese/threefish v0.0.0-20230828205611-8dc287bb1622/go.mod h1:mWV6KwRTB01M/RYDgp6EqqmmtaMv3qP3vltn6UiPY6Q= 212 | github.com/pedroalbanese/tiger v0.0.0-20220128183340-a7e964767a9d h1:L0+QApMpJpdoNfEa/jziiTLNz3a+huk0B2kmTKmOx20= 213 | github.com/pedroalbanese/tiger v0.0.0-20220128183340-a7e964767a9d/go.mod h1:iPwiPHMetkupe2zwZyiBaTx0r4V3J5aVS/75uLCASfI= 214 | github.com/pedroalbanese/tom v0.0.0-20250228211028-987ea6c1589b h1:ueZyvX6UJ7/ZH/K9Ms2FDQ6VCNA/IqTVM7S+T8JebjE= 215 | github.com/pedroalbanese/tom v0.0.0-20250228211028-987ea6c1589b/go.mod h1:cHujc5QKz6gmkgki3Bh5a1zZY/VYtbCT6K8KBgk5FSI= 216 | github.com/pedroalbanese/trivium v0.0.0-20170225064545-3bc0ea456f63 h1:yCEZ0ctjjiIr8EAUqqfcLc+wO51WkMpuNd/j/bZ94KU= 217 | github.com/pedroalbanese/trivium v0.0.0-20170225064545-3bc0ea456f63/go.mod h1:vwudD8Hl3PTug52vZyuCk56sZkJho/UOPrZ0mNLAliw= 218 | github.com/pedroalbanese/twine v0.0.0-20240325185833-a027b56be619 h1:4ivVe/VS0Ww4hf5q7EvG/Xdqw2z4+NIa31AYp6bSQPo= 219 | github.com/pedroalbanese/twine v0.0.0-20240325185833-a027b56be619/go.mod h1:uFICSVTc3c9NHS6CRBLDxHEtuRn6bPisfYAHVyQfDy8= 220 | github.com/pedroalbanese/uuencode v1.0.4 h1:ypejSaQxg/rf4pEDoOzZvBW/CFuP/UtRhcCNMRUCVS4= 221 | github.com/pedroalbanese/uuencode v1.0.4/go.mod h1:jzNnKcFiqbjRxgyZwmWW7CNGCS9w7t/+gDAT9IXZJdI= 222 | github.com/pedroalbanese/vmac v0.0.0-20231111194716-1a03aacdcb4c h1:69jHAdR8JFnFbgEXZn54qfwvlA8LQl1QUcZXYe2gJPk= 223 | github.com/pedroalbanese/vmac v0.0.0-20231111194716-1a03aacdcb4c/go.mod h1:ecUHK2kTeoKq+YJuQAZHV9WiZcpC5P8VXMBduJaMLmw= 224 | github.com/pedroalbanese/whirlpool v0.0.0-20220911221330-8ad94dd14447 h1:ouut+zeswugb4asBoOejuy+hFWvXXnVPFnKJmDFtoko= 225 | github.com/pedroalbanese/whirlpool v0.0.0-20220911221330-8ad94dd14447/go.mod h1:hmEg12nLjNeVJaroqA6z3wubkSxGRVohaAD4cNuysRg= 226 | github.com/pedroalbanese/xoodoo v0.0.0-20230124190939-64aa038b97c6 h1:DCyHQIq9uE4RrPSobh7WCybTxSdXlNF/AwmKRkDE/AQ= 227 | github.com/pedroalbanese/xoodoo v0.0.0-20230124190939-64aa038b97c6/go.mod h1:ziHgtQ/DwLq+fL0BC55to81BEzKBeVjyOeDIU8pOB8k= 228 | github.com/pedroalbanese/xxencode v0.0.15 h1:2FKeq1qcwA6kx5mV6jACksHtJcccTy8Z54CdTiza9Po= 229 | github.com/pedroalbanese/xxencode v0.0.15/go.mod h1:2XWJgW0YNQOTdqSBBQFX1DN8OqLXRvAj/FtzkfIhpVA= 230 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 231 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 232 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 233 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 234 | github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= 235 | github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 236 | github.com/trailofbits/lms-go v0.0.0-20250218220503-d2f2806cebf9 h1:QGRBcofdAgNxsW8K/K87hOAdRoAXcWfEKNy91qROu38= 237 | github.com/trailofbits/lms-go v0.0.0-20250218220503-d2f2806cebf9/go.mod h1:PXVmG2ySLpH5FGcYr1/XXKlOOaX+QUw5SYghecP9G5A= 238 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 239 | github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY= 240 | github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= 241 | github.com/zeebo/blake3 v0.2.3 h1:TFoLXsjeXqRNFxSbk35Dk4YtszE/MQQGK10BH4ptoTg= 242 | github.com/zeebo/blake3 v0.2.3/go.mod h1:mjJjZpnsyIVtVgTOSpJ9vmRE4wgDeyt2HU3qXvvKCaQ= 243 | github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= 244 | github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= 245 | golang.org/x/crypto v0.38.0 h1:jt+WWG8IZlBnVbomuhg2Mdq0+BBQaHbtqHEFEigjUV8= 246 | golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= 247 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 248 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 249 | golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 250 | golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 251 | golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= 252 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 253 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 254 | golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= 255 | golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= 256 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 257 | golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= 258 | golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= 259 | golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= 260 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 261 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 262 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 263 | golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= 264 | golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 265 | golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= 266 | golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= 267 | golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= 268 | golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 269 | golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= 270 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 271 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 272 | golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= 273 | golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= 274 | golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= 275 | golang.org/x/term v0.32.0 h1:DR4lr0TjUs3epypdhTOkMmuF5CDFJ/8pOnbzMZPQ7bg= 276 | golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= 277 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 278 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 279 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 280 | golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= 281 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 282 | golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 283 | golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= 284 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 285 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 286 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 287 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 288 | golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= 289 | golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= 290 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 291 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 292 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 293 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EDGE Toolkit 2 | [![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](https://github.com/pedroalbanese/edgetk/blob/master/LICENSE.md) 3 | [![GoDoc](https://godoc.org/github.com/pedroalbanese/edgetk?status.png)](http://godoc.org/github.com/pedroalbanese/edgetk) 4 | [![GitHub downloads](https://img.shields.io/github/downloads/pedroalbanese/edgetk/total.svg?logo=github&logoColor=white)](https://github.com/pedroalbanese/edgetk/releases) 5 | [![Go Report Card](https://goreportcard.com/badge/github.com/pedroalbanese/edgetk)](https://goreportcard.com/report/github.com/pedroalbanese/edgetk) 6 | [![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/pedroalbanese/edgetk)](https://golang.org) 7 | [![GitHub release (latest by date)](https://img.shields.io/github/v/release/pedroalbanese/edgetk)](https://github.com/pedroalbanese/edgetk/releases) 8 | [![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.17155950-blue.svg)](https://doi.org/10.5281/zenodo.17155950) 9 | 10 | Multi-purpose cross-platform hybrid cryptography tool for symmetric and asymmetric encryption, cipher-based message authentication code (CMAC|PMAC|GMAC|VMAC), recursive hash digest, hash-based message authentication code (HMAC), HMAC-based key derivation function (HKDF), password-based key derivation function (PBKDF2|Argon2|Lyra2|Scrypt), password-hashing scheme (Bcrypt|Argon2|Lyra2|Makwa), shared key agreement (ECDH|VKO|X25519|X448|ML-KEM), digital signature (RSA|ECDSA|EdDSA|GOST|SLH-DSA|ML-DSA), X.509 CSRs, CRLs and Certificates, and TCP instant server with TLS 1.3 and TLCP encryption layers for small or embedded systems. 11 | 12 | ***Fully OpenSSL/LibreSSL/GmSSL/Botan/libsodium/RHash/Mcrypt compliant*** 13 | 14 |
Implements 15 | 16 | 1. Africacrypt 2009: Galindo-Garcia Identity-Based Signature (IBS) 17 | 3. Anubis Involutional SPN 128-bit block cipher (Barreto, ESAT/COSIC) 18 | 4. Asiacrypt 2001: Short Signatures from the Weil Pairing (BLS) 19 | 5. Asi­acrypt 2005: Barreto Identity-Based Signature (IBS) 20 | 6. BSI TR-03111 Elliptic Curve Cryptography (ECC) Technical Guideline 21 | 7. CHASKEY Message Authentication Code (Nicky Mouha, ESAT/COSIC) 22 | 8. CubeHash and SipHash64/128 (Daniel J. Bernstein & JP Aumasson) 23 | 9. CRYPTO 1999: IND-CCA2 Fujisaki-Okamoto Transformation (IBE) 24 | 10. CRYPTO 2001: Boneh-Franklin Identity-Based Encryption (IBE) 25 | 11. DSTU 7564:2014 A New Standard of Ukraine: The Kupyna Hash Function 26 | 12. DSTU 7624:2014 A Encryption Standard of Ukraine: Kalyna Block Cipher 27 | 13. Eurocrypt 1996: Security Proofs for Signature Schemes (EUF-CMA ElGamal) 28 | 14. Eurocrypt 2004: Boneh-Boyen Identity-Based Encryption (IBE) 29 | 15. GB/T 32907-2016 - SM4 128-bit Block Cipher 30 | 16. GB/T 32918.4-2016 SM2 Elliptic Curve Asymmetric Encryption 31 | 17. GB/T 38636-2020 - Transport Layer Cryptography Protocol (TLCP) 32 | 18. GM/T 0001-2012 ZUC Zu Chongzhi Stream cipher 128/256-bit key 33 | 19. GM/T 0002-2012 SM4 Block cipher with 128-bit key 34 | 20. GM/T 0003-2012 SM2 Public key algorithm 256-bit 35 | 21. GM/T 0004-2012 SM3 Message digest algorithm 256-bit hash value 36 | 22. GM/T 0044-2016 SM9 Public key algorithm 256-bit 37 | 23. GM/T 0086-2020 Specification of key management system based on SM9 38 | 24. GOST 28147-89 64-bit block cipher (RFC 5830) 39 | 25. GOST R 34.10-2012 VKO key agreement function (RFC 7836) 40 | 26. GOST R 34.10-2012 public key signature function (RFC 7091) 41 | 27. GOST R 34.11-2012 Streebog hash function (RFC 6986) 42 | 28. GOST R 34.11-94 CryptoPro hash function (RFC 5831) 43 | 29. GOST R 34.12-2015 128-bit block cipher Kuznechik (RFC 7801) 44 | 30. GOST R 34.12-2015 64-bit block cipher Magma (RFC 8891) 45 | 31. GOST R 50.1.114-2016 GOST R 34.10-2012 and GOST R 34.11-2012 46 | 32. HC-128 Stream Cipher simplified version of HC-256 (Wu, ESAT/COSIC) 47 | 33. IGE (Infinite Garble Extension) Mode of Operation for Block ciphers 48 | 34. ISO/IEC 10118-3:2003 RIPEMD128/160/256 and Whirlpool (ESAT/COSIC) 49 | 35. ISO/IEC 18033-3:2010 HIGHT, SEED, Camellia and MISTY1 Block ciphers 50 | 36. ISO/IEC 18033-4:2011 KCipher-2 stream cipher (RFC 7008) 51 | 37. ISO/IEC 29192-3:2012 Trivium Stream cipher with 80-bit key 52 | 38. ISO/IEC 18033-5:2015 IBE - Identity-based Encryption Mechanisms 53 | 39. ISO/IEC 18033-5:2015/Amd.1:2021(E) SM9 Mechanism 54 | 40. ISO/IEC 14888-3:2018 EC-SDSA Schnorr-based Signature Scheme 55 | 41. ISO/IEC 29192-2:2019 PRESENT, CLEFIA and LEA block ciphers 56 | 42. ISO/IEC 15946-5:2022 Barreto-Naehrig and Barreto-Lynn-Scott Curves 57 | 43. ITI DOC-ICP-01.01 Curve E-521 Brazilian Digital Signature Standard 58 | 44. KS X 1213-1 ARIA 128-bit block cipher with 128/192/256-bit keys 59 | 45. KS X 3246 LEA - Lightweight Encryption Algorithm (TTAK.KO-12.0223) 60 | 46. KS X 3262 LSH - A New Fast Secure Hash Function Family (in Korean) 61 | 47. LNCS 1838 - A One Round Protocol for Tripartite Diffie-Hellman 62 | 48. NIST SP800-186 X25519 Diffie-Hellman (OpenSSL compliant) 63 | 49. NIST SP800-38D GCM AEAD mode for 128-bit block ciphers (RFC 5288) 64 | 50. NIST SP800-232 Ascon-Based Lightweight Cryptography Standard 65 | 51. PKC 2003: Cha-Cheon Identity-Based Signature (IBS) 66 | 52. RFC 1423: Privacy Enhancement for Internet Electronic Mail 67 | 53. RFC 2104: HMAC - Keyed-Hashing for Message Authentication 68 | 54. RFC 2144: CAST-128 64-bit Block cipher with 128-bit key 69 | 55. RFC 2612: The CAST-256 Encryption Algorithm 70 | 56. RFC 3610: Counter with CBC-MAC Mode of Operation (CCM Mode) 71 | 57. RFC 4009: The SEED Encryption Algorithm (KISA) 72 | 58. RFC 4253: Serpent 128-bit Block cipher with 128/192/256-bit keys 73 | 59. RFC 4493: Cipher-based Message Authentication Code (CMAC) 74 | 60. RFC 4503: Rabbit Stream Cipher Algorithm with 128-bit key 75 | 61. RFC 4543: Galois Message Authentication Code (GMAC) 76 | 62. RFC 4764: EAX Authenticated-Encryption Mode of Operation 77 | 63. RFC 4648: Base16, Base32, and Base64 Data Encodings 78 | 64. RFC 5246: Transport Layer Security (TLS) Protocol Version 1.2 79 | 65. RFC 5280: Internet X.509 PKI Certificate Revocation List (CRL) 80 | 50. RFC 5297: Synthetic Initialization Vector (SIV Mode) 81 | 51. RFC 5639: Elliptic Curve Cryptography (ECC) Brainpool Standard Curves 82 | 53. RFC 5869: HMAC-based Key Derivation Function (HKDF) 83 | 54. RFC 6114: The 128-Bit Blockcipher CLEFIA (Sony) 84 | 55. RFC 7008: KCipher-2 Encryption Algorithm (KDDI R&D Laboratories) 85 | 56. RFC 7253: OCB3 Offset Codebook Authenticated-Encryption Algorithm 86 | 57. RFC 7292: PKCS #12 Personal Information Exchange Syntax v1.1 87 | 58. RFC 7539: ChaCha20-Poly1305 AEAD Stream cipher 88 | 59. RFC 7693: The BLAKE2 Cryptographic Hash and MAC (JP Aumasson) 89 | 60. RFC 7748: Curve25519 and Curve448: Elliptic Curves for Security 90 | 61. RFC 7914: The Scrypt Password-Based Key Derivation Function 91 | 62. RFC 8032: Ed25519 Signature a.k.a. EdDSA (Daniel J. Bernstein) 92 | 63. RFC 8446: Transport Layer Security (TLS) Protocol Version 1.3 93 | 64. RFC 8554: Post-Quantum Leighton-Micali Hash-Based Signatures 94 | 65. RFC 9058: MGM AEAD mode for 64 and 128 bit ciphers (E. Griboedova) 95 | 66. RFC 9367: GOST Cipher Suites for Transport Layer Security (TLS 1.3) 96 | 13. SAC 2002: Hess Efficient Identity Based Signature (IBS) 97 | 66. SBRC 2007: Curupira 96-bit block cipher with 96/144/192-bit keys 98 | 67. STB 34.101.31-2011 Belarusian standard (Bel-T) block cipher 99 | 68. STB 34.101.45-2013 Belarusian BignV1 public key algorithhm 100 | 69. STB 34.101.77-2020 Belarusian standard BASH hash function 101 | 70. TTAS.KO-12.0004/R1 128-bit Block Cipher SEED (ISO/IEC 18033-3:2010) 102 | 71. TTAS.KO-12.0040/R1 64-bit Block Cipher HIGHT (ISO/IEC 18033-3:2010) 103 | 72. TTAS.KO-12.0011/R2 HAS-160 Korean-standardized hash algorithm 104 | 73. TTAK.KO-12.0015/R3 EC-KCDSA Korean Digital Signature Algorithm 105 | 74. TTAK.KO-12.0223 LEA 128-bit block cipher (ISO/IEC 29192-2:2019) 106 | 75. TTAK.KO-12.0276 LSH Message digest algorithm (KS X 3262) 107 | 76. US FIPS 197 Advanced Encryption Standard (AES) 108 | 77. US FIPS 180-2 Secure Hash Standard (SHS) SHA1 and SHA2 Algorithms 109 | 78. US FIPS 202 SHA-3 Permutation-Based Hash (instance of the Keccak) 110 | 79. US FIPS 203 Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM) 111 | 80. US FIPS 204 Module-Lattice-Based Digital Signature Standard (ML-DSA) 112 | 81. US FIPS 205 Stateless Hash-Based Digital Signature Standard (SLH-DSA) 113 | 114 |
115 | 116 | 117 |
National Cryptographic Standards 118 | 119 | #### 🇨🇳 SM2, SM3, SM4, SM9, ZUC — Chinese national cryptographic standards 120 | Defined by the **State Cryptography Administration (SCA)** and standardized under **GB/T** and **GM/T** series. Widely used in Chinese government, banking, and telecom infrastructure. 121 | 122 | --- 123 | 124 | #### 🇷🇺 GOST R 34.10, Kuznechik, Streebog — Russian Federation cryptographic standards 125 | Approved by **FSTEC** and **Federal Security Service (FSB)**, standardized under **GOST R** series. Used across official and military systems in Russia. 126 | 127 | --- 128 | 129 | #### 🇺🇦 Kalyna, Kupyna — Ukrainian national cryptographic standards 130 | Standardized as **DSTU 7624:2014** (Kalyna block cipher) and **DSTU 7564:2014** (Kupyna hash function) by the **Ukrainian State Service for Special Communications and Information Protection**. 131 | 132 | --- 133 | 134 | #### 🇰🇷 ARIA, SEED, LEA, LSH, KCDSA — Korean national cryptographic algorithms 135 | Developed under **TTAS.KO** and **KS X** standards. Used in public sector systems and Korean financial institutions. Published by **KISA** and **TTA**. 136 | 137 | --- 138 | 139 | #### 🇧🇾 BignV1, Bel-T, BASH — Belarusian cryptographic standards 140 | Standardized by the **STB 34.101** series. Designed for public key encryption (**BignV1**), block cipher encryption (**Bel-T**), and hashing (**BASH**), primarily for use within Belarusian national security frameworks. 141 | 142 | --- 143 | 144 | #### 🇫🇷 ANSSI FRP256v1 — French national elliptic curve for digital signatures 145 | Developed by the **ANSSI** (Agence nationale de la sécurité des systèmes d'information). Used for secure digital signature implementations within French governmental and critical infrastructure systems. 146 | 147 | --- 148 | 149 | #### 🇯🇵 KCipher-2, Camellia — Japanese national cryptographic algorithms 150 | **KCipher-2** is a lightweight stream cipher standardized under **ISO/IEC 18033-4:2011**. 151 | **Camellia** is a block cipher developed by Mitsubishi and NTT, internationally adopted and widely used in Japan for various secure communications. 152 | 153 | --- 154 | 155 | #### 🇧🇷 ITI DOC-ICP-01.01 — Brazilian Cryptographic Standards for Public-Key Algorithms 156 | Brazil's national public key cryptographic standards are defined in the **DOC-ICP-01.01**, issued by the **Instituto Nacional de Tecnologia da Informação (ITI)** under the **ICP-Brasil** framework. This standard mandates the use of internationally recognized and security-reviewed asymmetric algorithms, including: 157 | 158 | - **RSA** (minimum key size of 2048 bits for end-entities and 4096 bits for CAs), 159 | - **Elliptic Curve Cryptography (ECC)** using **brainpool** curves (e.g., *brainpoolP256r1*, *brainpoolP512r1*), 160 | - **EdDSA** over **Ed25519** (Curve25519), **Ed448-Goldilocks** (Curve448), and **Ed521** (Curve E-521), defined as a high-security elliptic curve consistent with 256-bit security strength, considered for future-safe digital signatures mechanism. 161 | - **ECDH / ECDHE** for key agreement protocols, including **X25519** and **X448** variants. 162 | 163 | These algorithms are officially approved through the **Instrução Normativa ITI nº 22, de 23 de março de 2022**, which consolidates and updates the cryptographic requirements under Brazilian law, ensuring strong digital security for certificates and signatures in national electronic documents and transactions. 164 | 165 | **Source:** 166 | [ICP-Brasil – DOC-ICP-01.01, v5.0 (2022)](https://www.gov.br/iti/pt-br/assuntos/legislacao/documentos-principais/IN2022_22_DOC_ICP_01.01_assinado.pdf) 167 | Instrução Normativa ITI nº 22/2022 – Instituto Nacional de Tecnologia da Informação 168 | 169 | --- 170 | 171 | #### 🇩🇪 EC-GDSA, EC-SDSA, ECKA-EG, Brainpool — German national elliptic curve cryptographic standards 172 | Standardized by the **BSI (Federal Office for Information Security)** in the technical guideline **BSI TR-03111**, these cryptographic algorithms and curve parameters are used for secure digital signatures, key exchange, and public key infrastructures in German governmental and high-security environments. 173 | 174 | - **EC-GDSA** (German Digital Signature Algorithm): A flexible variant of ECDSA with enhanced domain separation and customization capabilities, adapted for German security requirements. 175 | - **EC-SDSA** (Schnorr Digital Signature Algorithm): A curve-based implementation of the Schnorr signature scheme, offering provable security and better efficiency than ECDSA, defined in **ISO/IEC 14888-3:2018**. 176 | - **ECKA-EG** (Elliptic Curve Key Agreement – ElGamal): A key agreement scheme based on EC-ElGamal, enabling secure exchange of symmetric keys. 177 | - **Brainpool curves**: A family of elliptic curves (e.g., brainpoolP256r1, brainpoolP384r1, brainpoolP512r1) defined in **RFC 5639**, recommended by the BSI for use with the above algorithms. Designed to offer high security without potential concerns associated with some NIST curves. 178 | 179 | These standards are applied in German eID systems, national PKI, military communication, and EU-coordinated cybersecurity frameworks. 180 | 181 | --- 182 | 183 | #### 🇺🇸 AES, SHA-1, SHA-2, SHA-3, X25519, Ed25519, Ascon — United States NIST cryptographic standards 184 | - **AES** (Advanced Encryption Standard, **FIPS 197**) for symmetric encryption; 185 | - **SHA-1** and **SHA-2** (Secure Hash Standard, **FIPS 180-2**); 186 | - **SHA-3** (based on Keccak, **FIPS 202**) for hashing; 187 | - Elliptic curve algorithms **X25519** and **Ed25519** standardized in **NIST SP800-186**; 188 | - Lightweight authenticated encryption algorithm **Ascon** standardized under **NIST SP800-232**. 189 | 190 | All maintained and published by the **National Institute of Standards and Technology (NIST)** for U.S. federal government use and adoption. 191 | 192 | --- 193 | 194 | #### 🇪🇺 Whirlpool, RIPEMD, PRESENT, BLS/BN curves — European cryptographic standards (ISO/IEC) 195 | Developed by researchers from **Belgium**, **Germany**, and **Austria**, these algorithms have been standardized by **ISO/IEC** for international use. 196 | - **Whirlpool**: A hash function designed by **Vincent Rijmen (Belgium)** and **Paulo Barreto**, standardized in **ISO/IEC 10118-3:2003**. 197 | - **RIPEMD**: Developed under the **EU-funded RIPE project**, standardized in the same ISO/IEC 10118-3 family (RIPEMD-128/160/256). 198 | - **PRESENT**: A lightweight block cipher co-developed by **TU Graz (Austria)** and **Ruhr-University Bochum (Germany)**, standardized in **ISO/IEC 29192-2:2019** for constrained devices. 199 | - **BLS (Barreto-Lynn-Scott)** and **BN (Barreto-Naehrig) curves**: Pairing-friendly elliptic curves standardized in **ISO/IEC 15946-5:2022**, widely used in identity-based and pairing-based cryptography. 200 | - **Identity-Based Encryption (IBE)**: General IBE mechanisms standardized in **ISO/IEC 18033-5:2015**, including several schemes developed and formalized by researchers at **EU institutions**. 201 | 202 | These algorithms reflect Europe's strong academic and institutional contributions to international cryptographic standards. 203 | 204 |
205 | 206 | ## Command-line Integrated Security Suite 207 | 208 | ### Asymmetric 209 | 210 | - **Public key algorithms:** 211 | 212 | | Algorithm | 256 | 512 |ECDH |Signature|Encryption| PKI | 213 | |:--------------------|:---:|:---:|:---:|:-------:|:--------:|:---:| 214 | | ECDSA | O | O | O | O | O | O | 215 | | EC-GDSA | O | O | | O | | | 216 | | EC-KCDSA | O | O | | O | | | 217 | | EC-SDSA | O | O | O | O | | | 218 | | BignV1 | O | O | O | O | | | 219 | | BIP 340 | O | O | O | O | | | 220 | | BLS12-381 | O | | O | O | O | O | 221 | | BN256 | O | | O | O | O | O | 222 | | Curve25519 | O | | O | O | | O | 223 | | Curve448 | | | O | O | | | 224 | | E-521 | | | | O | | | 225 | | GOST2012 | O | O | O | O | | O | 226 | | RSA | | | | O | O | O | 227 | | SM2 | O | | O | O | O | O | 228 | | SM9 | O | | O | O | O | | 229 | | NUMS | O | O | O | O | O | | 230 | | ElGamal | | | | O | O | | 231 | | EC-ElGamal | O | O | | | O | | 232 | | Schnorr | | | | O | | | 233 | | ML-DSA/KEM | | | | O | O | O | 234 | | SLH-DSA | O | | | O | | O | 235 | | LMS | | | | O | | O | 236 | 237 | - **Subjacent Elliptic Curves:** 238 | 239 | | Curve | ECDSA | EC-S/GDSA | EC-KCDSA | ECKA-EG | 240 | |:----------------------|:-------:|:---------:|:----------:|:---------:| 241 | | P-224 (secp224r1) | O | O | O | O | 242 | | P-256 (secp256r1) | O | O | O | O | 243 | | P-384 (secp384r1) | O | O | O | O | 244 | | P-521 (secp521r1) | O | O | O | O | 245 | | B-283 (sect283r1) | | O | O | | 246 | | B-409 (sect409r1) | | O | O | | 247 | | B-571 (sect571r1) | | O | O | | 248 | | K-283 (sect283k1) | | O | O | | 249 | | K-409 (sect409k1) | | O | O | | 250 | | K-571 (sect571k1) | | O | O | | 251 | | BP (brainpoolp256r1) | | O | | O | 252 | | BP (brainpoolp384r1) | | O | | O | 253 | | BP (brainpoolp512r1) | | O | | O | 254 | | BP (brainpoolp256t1) | | O | | O | 255 | | BP (brainpoolp384t1) | | O | | O | 256 | | BP (brainpoolp512t1) | | O | | O | 257 | | NUMS (numsp256d1) | O | O | | O | 258 | | NUMS (numsp384d1) | O | O | | O | 259 | | NUMS (numsp512d1) | O | O | | O | 260 | | NUMS (numsp256t1) | O | O | | O | 261 | | NUMS (numsp384t1) | O | O | | O | 262 | | NUMS (numsp512t1) | O | O | | O | 263 | | KG (kg256r1) | O | | | O | 264 | | KG (kg384r1) | O | | | O | 265 | | Tom-256 (tom256) | O | O | | O | 266 | | Tom-384 (tom384) | O | O | | O | 267 | | ANSSI (frp256v1) | O | O | | O | 268 | | Koblitz (secp256k1) | O | O | | O | 269 | | SM2 (sm2p256v1) | O | | | O | 270 | 271 | - **Subjacent Identity-Based Schemes:** 272 | | Scheme Name | Type | Private Key Group | Public Key Group | 273 | |:---------------------|:----:|:-----------------:|:----------------:| 274 | | Boneh-Franklin (BF) | IBE | G1 | G2 | 275 | | Boneh-Boyen (BB) | IBE | G2 | G1 | 276 | | Sakai-Kasahara (SK) | IBE | G2 | G1 | 277 | | Barreto et al. (BR) | IBS | G1 | G2 | 278 | | Cha-Cheon (CC) | IBS | G1 | G2 | 279 | | Galindo-Garcia (GG) | IBS | G1 | G1 | 280 | | Hess (default) | IBS | G1 | G2 | 281 | | ShangMi (SM) | IBS | G1 | G2 | 282 | 283 | - **Supported ParamSets:** 284 | 285 | | Algorithm | A | B | C | D | 286 | |:--------------------|:---:|:---:|:---:|:---:| 287 | | GOST R 34.10-2012 256-bit | O | O | O | O | 288 | | GOST R 34.10-2012 512-bit | O | O | O | | 289 | 290 | ### Symmetric 291 | 292 | - **Stream ciphers:** 293 | 294 | | Cipher | Key Size | IV | Modes | 295 | |:-----------------|:----------:|:----:|:---------------------:| 296 | | Ascon 1.2 | 128 | 128 | AEAD Stream Cipher | 297 | | Chacha20Poly1305 | 256 | 96/192 | AEAD Stream Cipher | 298 | | Grain128a | 128 | 40-96 | AEAD Stream Cipher | 299 | | HC-128 | 128 | 128 | XOR Stream | 300 | | HC-256 | 256 | 256 | XOR Stream | 301 | | KCipher-2 | 128 | 128 | XOR Stream | 302 | | Rabbit | 128 | 64 | XOR Stream | 303 | | RC4 [Obsolete] | 40/128 | - | XOR Stream | 304 | | Salsa20 | 256 | 64/192 | XOR Stream | 305 | | Skein512 | Any | Any | MAC + XOR Stream | 306 | | Spritz | Any | Any | XOR Stream | 307 | | Trivium | 80 | 80 | XOR Stream | 308 | | ZUC-128 Zu Chongzhi | 128 | 128 | MAC + XOR Stream | 309 | | ZUC-256 Zu Chongzhi | 256 | 184 | MAC + XOR Stream | 310 | 311 | - **Permutation ciphers:** 312 | 313 | | Cipher | Key | IV | Mode | 314 | |:--------------|:----:|:----:|:---------------------:| 315 | | Xoodyak | 128 | 128 |Lightweight AEAD Permutation Cipher| 316 | 317 | - **256-bit> block ciphers:** 318 | 319 | | Cipher | Block Size | Key Size | Modes | 320 | |:-----------------|:----------:|:-----------:|:-----------------------:| 321 | | Kalyna256 | 256 | 256/512 | EAX, SIV, CTR, OFB, IGE | 322 | | Kalyna512 | 512 | 512 | EAX, SIV, CTR, OFB, IGE | 323 | | SHACAL-2 | 256 | 128 to 512 | EAX, SIV, CTR, OFB, IGE | 324 | | Threefish256 | 256 | 256 | EAX, SIV, CTR, OFB, IGE | 325 | | Threefish512 | 512 | 512 | EAX, SIV, CTR, OFB, IGE | 326 | | Threefish1024 | 1024 | 1024 | EAX, SIV, CTR, OFB, IGE | 327 | 328 | - **128-bit block ciphers:** 329 | 330 | | Cipher | Block Size | Key Size | Modes | 331 | |:-----------------|:----------:|:-----------:|:-----------------------:| 332 | | AES (Rijndael) | 128 | 128/192/256 | All modes supported | 333 | | Anubis | 128 | 128 to 320 | All modes supported | 334 | | ARIA | 128 | 128/192/256 | All modes supported | 335 | | Bel-T | 128 | 128/192/256 | All modes supported | 336 | | Camellia | 128 | 128/192/256 | All modes supported | 337 | | CAST256 | 128 | 128/192/256 | All modes supported | 338 | | CLEFIA | 128 | 128/192/256 | All modes supported | 339 | | CRYPTON | 128 | 128/192/256 | All modes supported | 340 | | E2 | 128 | 128/192/256 | All modes supported | 341 | | Kalyna128 | 128 | 128/256 | All modes supported | 342 | | Kuznechik | 128 | 256 | All modes supported | 343 | | LEA | 128 | 128/192/256 | All modes supported | 344 | | LOKI97 | 128 | 128/192/256 | All modes supported | 345 | | MAGENTA | 128 | 128/192/256 | All modes supported | 346 | | MARS | 128 | 128 to 448 | All modes supported | 347 | | NOEKEON | 128 | 128 | All modes supported | 348 | | RC6 | 128 | 128/192/256 | All modes supported | 349 | | SEED | 128 | 128 | All modes supported | 350 | | Serpent | 128 | 128/192/256 | All modes supported | 351 | | SM4 | 128 | 128 | All modes supported | 352 | | Twofish | 128 | 128/192/256 | All modes supported | 353 | 354 | - **96-bit block ciphers:** 355 | 356 | | Cipher | Block Size | Key Size | Modes | 357 | |:--------------|:----:|:----:|:---------------------:| 358 | | Curupira | 96 | 96/144/192 |EAX, LETTERSOUP, CTR, IGE| 359 | 360 | - **64-bit block ciphers:** 361 | 362 | | Cipher | Block Size | Key Size | Modes | 363 | |:-----------------|:----------:|:------------:|:-----------:| 364 | | DES [Obsolete] | 64| 64|EAX, CFB-8, CTR, OFB| 365 | | 3DES [Obsolete] | 64| 192|EAX, CFB-8, CTR, OFB| 366 | | Blowfish | 64| 128|EAX, CFB-8, CTR, OFB| 367 | | CAST5 | 64| 128|EAX, CFB-8, CTR, OFB| 368 | | GOST89 (TC26) | 64| 256|EAX, MGM, CFB-8, CTR| 369 | | HIGHT | 64| 128|EAX, CFB-8, CTR, OFB| 370 | | IDEA [Obsolete] | 64| 128|EAX, CFB-8, CTR, OFB| 371 | | Khazad | 64| 128|EAX, MGM, CFB-8, CTR| 372 | | Magma | 64| 256|EAX, CFB-8, CTR, OFB| 373 | | MISTY1 | 64| 128|EAX, CFB-8, CTR, OFB| 374 | | PRESENT | 64| 80/128|EAX, MGM, CFB-8, CTR| 375 | | RC2 [Obsolete] | 64| 128|EAX, CFB-8, CTR, OFB| 376 | | RC5 [Obsolete] | 64| 128|EAX, CFB-8, CTR, OFB| 377 | | SAFER+ | 64| 64/128|EAX, CFB-8, CTR, OFB| 378 | | TWINE | 64| 80/128|EAX, MGM, CFB-8, CTR| 379 | 380 | - **Modes of Operation:** 381 | 382 | |Mode | | Blocks | Keys | 383 | |:---:|:-------------------------------|:----------:|:---------:| 384 | | EAX | Encrypt-Authenticate-Translate |All |Any | 385 | | GCM | Galois/Counter Mode (AEAD) |128 |128/192/256| 386 | | OCB1| Offset Codebook v1 (AEAD) |128 |128/192/256| 387 | | OCB3| Offset Codebook v3 (AEAD) |128 |128/192/256| 388 | | MGM | Multilinear Galois Mode (AEAD) |64/128 |Any | 389 | | CCM | Counter with CBC-MAC (AEAD) |128 |128/192/256| 390 | | SIV | Synthetic IV Mode (AEAD) |All |Any | 391 | | CBC | Cipher-Block Chaining |All |Any | 392 | | CFB | Cipher Feedback Mode |All |Any | 393 | |CFB-8| Cipher Feedback Mode 8-bit |All |Any | 394 | | CTR | Counter Mode (default) |All |Any | 395 | | ECB | Eletronic Codebook Mode |All |Any | 396 | | IGE | Infinite Garble Extension |All |Any | 397 | | OFB | Output Feedback Mode |All |Any | 398 | 399 | - **Message Digest Algorithms:** 400 | 401 | | Algorithm | 128 | 160 | 192 | 256 | 512 | MAC | 402 | |:----------------|:---:|:---:|:---:|:---:|:---:|:---:| 403 | | BASH | | | | O | O | | 404 | | Bel-T | | | | O | | | 405 | | BLAKE-2B | | | | O | O | O | 406 | | BLAKE-2S | O | | | O | | O | 407 | | BLAKE-3 | | | | O | | O | 408 | | BMW | | | | O | O | | 409 | | Chaskey | O | | | | | O | 410 | | CubeHash | | | | O | O | | 411 | | ECHO | | | | O | O | | 412 | | ESCH | | | | O | | | 413 | | Fugue | | | | O | O | | 414 | | GOST94 CryptoPro | | | | O | | | 415 | | Grøstl | | | | O | O | | 416 | | Hamsi | | | | O | O | | 417 | | Haraka v2 | | | | O | | | 418 | | HAS-160 [Obsolete]| | O | | | | | 419 | | JH | | | | O | O | | 420 | | Kupyna | | | | O | O | O | 421 | | Legacy Keccak | | | | O | O | | 422 | | LSH | | | | O | O | | 423 | | Luffa | | | | O | O | | 424 | | MD4 [Obsolete] | O | | | | | | 425 | | MD5 [Obsolete] | O | | | | | | 426 | | MD6 | | | | O | O | | 427 | | Poly1305 | O | | | | | O | 428 | | Radio-Gatun | | | | O | | | 429 | | RIPEMD | O | O | | O | | | 430 | | SHA1 [Obsolete] | | O | | | | | 431 | | SHA2 (default) | | | | O | O | | 432 | | SHA3 | | | | O | O | | 433 | | SHAKE | | | | O | O | | 434 | | SHAvite-3 | | | | O | O | | 435 | | SIMD | | | | O | O | | 436 | | SipHash | O | | | | | O | 437 | | Skein | | | | O | O | O | 438 | | SM3 | | | | O | | | 439 | | Streebog | | | | O | O | | 440 | | Tiger | | | O | | | | 441 | | Whirlpool | | | | | O | | 442 | | Xoodyak | | | | O | | O | 443 | | ZUC-256 Zu Chongzhi| O | | | | | O | 444 | 445 | - MAC refers to keyed hash function, like HMAC. 446 | 447 | ### AEAD 448 | 449 | Authenticated encryption (AE) and authenticated encryption with associated data (AEAD) are forms of encryption which simultaneously assure the confidentiality and authenticity of data. Provides both authenticated encryption (confidentiality and authentication) and the ability to check the integrity and authentication of additional authenticated data (AAD) that is sent in the clear. 450 | 451 |
452 | AEAD OpenSSL-PHP and libsodium compliance 453 | 454 | OpenSSL-PHP 455 | ```php 456 | 505 | ``` 506 | 507 | libsodium Python 508 | ```python 509 | import nacl.bindings 510 | import binascii 511 | 512 | # Fixed key (32 bytes) 513 | key_hex = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" 514 | key = binascii.unhexlify(key_hex) 515 | 516 | # Open the file generated by EDGETk (nonce + ciphertext + tag) 517 | with open("ciphertext.bin", "rb") as f: 518 | data = f.read() 519 | 520 | # Extract the nonce (12 bytes), and ciphertext + tag (remaining bytes) 521 | nonce = data[:12] 522 | ciphertext_and_tag = data[12:] 523 | 524 | # Decrypt using libsodium (via PyNaCl bindings) 525 | try: 526 | plaintext = nacl.bindings.crypto_aead_chacha20poly1305_ietf_decrypt( 527 | ciphertext_and_tag, # ciphertext + tag 528 | aad=None, # no AAD (Additional Authenticated Data) was used 529 | nonce=nonce, 530 | key=key 531 | ) 532 | print("Decrypted message:", plaintext.decode()) 533 | except Exception as e: 534 | print("Decryption failed:", e) 535 | ``` 536 |
537 | 538 | ### ANSSI 539 | Parameters for the [ANSSI FRP256v1](https://www.alvestrand.no/objectid/1.2.250.1.223.101.256.1.html) Elliptic curve, Agence nationale de la sécurité des systèmes d'information. "Publication d'un paramétrage de courbe elliptique visant des applications de passeport électronique et de l'administration électronique française." 21 November 2011. 540 | 541 | ### BignV1 542 | 543 | The Bign algorithm is a Schnorr-type signature scheme adopted as the standard in Belarus (STB 34.101.45). Below are the equations and descriptions associated with the signing and verification phases of Bign. 544 | 545 |
BignV1 Theory 546 | 547 | #### Parameters 548 | 549 | - $l \in \{128, 192, 256\}$ — Security level. 550 | - $q$ — A $2l$-bit prime number. 551 | - $G$ — A generator of an Abelian group $\langle G \rangle$ of order $q$. 552 | - $H$ — An external hash function: $H: \{0, 1\}^* \to \{0, 1\}^{2l}$. 553 | - $OID(H)$ — An identifier uniquely identifying the hash function $H$ (an ASN.1 object identifier). 554 | - $h$ — An internal hash function: $h: \{0, 1\}^* \to \{0, 1\}^l$. 555 | 556 | ##### Private Key 557 | 558 | - $d$ — A secret random/pseudorandom element from $\{1, 2, \dots, q-1\}$. 559 | 560 | ##### Public Key 561 | 562 | - $Q = dG$ — The public key associated with the private key $d$. 563 | 564 | ##### Message to be signed 565 | 566 | - $X \in \{0, 1\}^*$. 567 | 568 | #### Signing 569 | 570 | The signature $s$ of a message $X$ is generated as follows: 571 | 572 | 1. Choose $k$: 573 | Select a random (or pseudorandom) value $k$ from $\{1, 2, \dots, q-1\}$. 574 | 575 | 2. Calculate $R$: 576 | $R = kG$ — The point $R$ is calculated by multiplying the random value $k$ by the generator $G$. 577 | 578 | 3. Calculate $s_0$: 579 | $s_0 = h(OID(H) \| R \| H(X))$ — Here, $s_0$ is computed by the internal hash function $h$, which involves the identifier of $H$, $R$, and the hash of the message $H(X)$. 580 | 581 | 4. Calculate $s_1$: 582 | $s_1 = (k - H(X) - (s_0 + 2^l) d) \mod q$ — The value $s_1$ is computed using $k$, $H(X)$, $s_0$, and the private key $d$, with a modular operation based on the prime $q$. 583 | 584 | 5. Final signature: 585 | $s = s_0 \| s_1$ — The final signature $s$ is the concatenation of $s_0$ and $s_1$. 586 | 587 | 6. Return the signature: 588 | The signature $s$ is returned. 589 | 590 | #### Verification 591 | 592 | To verify the signature $s = s_0 \| s_1$ of a message $X$ with public key $Q$: 593 | 594 | 1. Verify the length of $s$: 595 | If $|s| \neq 3l$, return 0 (invalid signature). 596 | 597 | 2. Extract $s_0$ and $s_1$: 598 | Split $s = s_0 \| s_1$, where $|s_0| = l$ and $|s_1| = 2l$. 599 | 600 | 3. Verify $s_1$: 601 | If $s_1 \geq q$, return 0 (invalid signature). 602 | 603 | 4. Calculate $R$: 604 | Compute $R = (s_1 + H(X))G + (s_0 + 2^l)Q$. 605 | 606 | 5. Verify $R$: 607 | If $R = O$ (the identity element of the group), return 0 (invalid signature). 608 | 609 | 6. Verify the hash: 610 | If $h(OID(H) \| R \| H(X)) \neq s_0$, return 0 (invalid signature). 611 | 612 | 7. Valid signature: 613 | If all checks pass, return 1 (valid signature). 614 | 615 | #### Design Rationale 616 | 617 | 1. Short signatures: 618 | The algorithm uses Schnorr's compression and reduces the length of $s_0$ from $2l$ to $l$ bits, resulting in shorter signatures and faster verification (1.5 exponentiations instead of 2). 619 | 620 | 2. Pre-hashing: 621 | Instead of directly using $h(R \| X)$, the algorithm uses pre-hashing: $s_0 = h(OID(H) \| R \| H(X))$. This protects against multiple-target preimage attacks and facilitates integration with existing APIs and data formats. 622 | 623 | 3. "Whitening" the signature: 624 | The second part of the signature ($s_1$) is "whitened" by using $Y = H(X)$. This makes finding collisions more difficult, providing security with strength $2^l$. 625 | 626 | 4. Use of $Q$ during verification: 627 | While hashing $Q$ during signature generation could help protect against certain attacks, this approach is rejected, as key distribution should already provide protection, and hashing $Q$ would duplicate the proof of possession during key distribution. 628 | 629 | 5. Deterministic signature: 630 | The generation of the ephemeral public key $k$ can be made deterministic using a special key generation algorithm $genk$. This involves hashing and symmetric encryption of data such as $OID(H)$, $d$, and $H(X)$ to produce a unique $k$. 631 | 632 |
633 | 634 | ### BN256 (Barreto-Naehrig) 635 | 636 | The BN256 (ISO/IEC 15946-5:2022) is an elliptic curve used in cryptography, particularly for pairing-based cryptographic protocols like identity-based encryption and short signatures. It was introduced by Paulo S. L. M. Barreto and Michael Naehrig as part of their work on constructing efficient elliptic curves for pairings. 637 | 638 |
BN256 Theory 639 | 640 | #### Key Generation 641 | 1. Private Key (sk): Randomly selected from $r \in \mathbb{Z}_n$, where $n$ is the curve order. It must remain secret. 642 | 2. Public Key (pk): $pk = sk * G2$, where $G2$ is the generator point of the curve. 643 | 644 | #### Signing 645 | 1. Choose $k \in \mathbb{Z}_n$, keep it secret, and ensure it's never reused. 646 | 2. Compute $\sigma = k \cdot H(M)$, where $H(M)$ is the hash of the message $M$. 647 | 3. The final signature is $\sigma = sk \cdot H(M)$, where $sk$ is the private key and $H(M)$ is the hash of the message. 648 | 649 | #### Verification 650 | 1. Verify the signature: $e(σ, G2) = e(H(M), pk)$, where $e$ is the bilinear pairing. 651 | 2. If the pairing holds, the signature is valid; otherwise, it’s invalid. 652 | 653 | #### Verification Equation: 654 | $e(sk * H(M), G2) = e(H(M), sk * G2)$, or equivalently, $e(H(M), pk) = e(H(M), pk)$. If true, the signature is valid. 655 | 656 |
657 | 658 | ### Curupira 659 | 660 | Curupira is a 96-bit block cipher, with keys of 96, 144 or 192 bits, and variable number of rounds, an algorithm described at [SBRC 2007](http://albanese.atwebpages.com/documentation/Curupira1_SBRC_2007.pdf) by Paulo S. L. M. Barreto and Marcos A. Simplício Jr., from Escola Politécnica da Universidade de São Paulo (USP), São Paulo, Brazil. 661 | 662 | $$ 663 | \text{Curupira}[K] \equiv \sigma[\kappa^{(R)}] \circ \pi \circ \gamma \circ \left( \prod_{r=1}^{R-1} \sigma[\kappa^{(r)}] \circ \theta \circ \pi \circ \gamma \right) \circ \sigma[\kappa^{(0)}] 664 | $$ 665 | 666 | ### Digital Signature Algorithms 667 | 668 | #### ElGamal-based algorithms 669 | 670 | Here are the main differences between ECDSA, ECGDSA, and ECKCDSA: 671 | 672 | $\text{ECDSA: Compute } r = x([k]B); \text{ s must be a root of } H(m)s^{-1} + rs^{-1}a - k \text{ modulo } n,$ 673 | $\text{ so compute } s \equiv k^{-1} \left( H(m) + ra \right) \pmod{n}.$ 674 | 675 | $\text{EC-GDSA: Compute } r = x([k]B); \text{ s must be a root of } r^{-1}H(m) + r^{-1}sa - k \text{ modulo } n,$ 676 | $\text{ so compute } s \equiv a^{-1} \left( kr - H(m) \right) \pmod{n}.$ 677 | 678 | $\text{EC-KCDSA: Compute } r = H(x([k]G));$ 679 | $\text{ so compute } s \equiv a \cdot \left( k - (r \oplus H(cQ \parallel M)) \bmod n \right) \bmod n.$ 680 | 681 | $\text{GOST: Compute } r = x([k]G) \mod q;$ 682 | $\text{ so compute } s \equiv (r \cdot d + k \cdot H(m)) \mod q.$ 683 | 684 | #### Schnorr-based algorithms 685 | 686 | $\text{BignV1: Compute } R = [k]G; s_0 \text{ must be a root of } h(OID(H) \parallel R \parallel H(X)),$ 687 | $\text{ so compute } s_1 \equiv (k - H(X) - (s_0 + 2^l)d) \mod q.$ 688 | 689 | $\text{EC-SDSA: Compute } W = k \cdot G, r = H(W_x \parallel W_y \parallel m) \mod q,$ 690 | $\text{ so compute } e = \text{OS2I}(r) \mod q, \text{ and } s = (k + e \cdot d) \mod q.$ 691 | 692 | $\text{EdDSA: Compute } R = [k] G; S \equiv k + H(R \parallel m) \cdot d \mod q, \text{where } H \text{ is a hash function and } d \text{ is the private key}.$ 693 | 694 | #### Boneh–Lynn–Shacham Signatures 695 | 696 | $\text{BLS: Compute } \sigma = H(m) \cdot x, \text{ where } H(m) \text{ is the message hash and } x \text{ is the private key.}$ 697 | 698 | #### Notes 699 | 1. $H(m)$ represents the hash value of the message. 700 | 2. $k^{-1}$ denotes the modular multiplicative inverse of $k$ modulo $(p-1)$. 701 | 3. $\equiv$ indicates congruence. 702 | 4. $\oplus$ represents the XOR operation. 703 | 704 | ### ElGamal 705 | The ElGamal algorithm is a public-key cryptography system that enables secure communication between two parties, involving asymmetric keypair generation and cryptographic operations. Initially, a large prime number $p$ and a generator $g$ for a finite cyclic group are generated. Each entity possesses a private key $x$, kept secret, and a public key $Y$, derived from $g^x \mod p$. To encrypt a symmetric key, the sender uses the session key, computes two components \(a\) and \(b\), and sends $g^k \mod p$ and $Y^k \cdot \text{key} \mod p$ to the recipient. The recipient, using their private key, decrypts the symmetric key. The ElGamal algorithm is known for its security based on the difficulty of solving the discrete logarithm problem and provides confidentiality and authentication properties. It was described by Taher A. Elgamal in 1985. 706 | 707 |
708 | ElGamal Theory 709 | 710 | #### Key Generation 711 | 712 | 1. Generate a large prime number $p$. 713 | 2. Select a generator $g \in [2, p-2]$. 714 | 3. Generate a private key $x$ randomly. 715 | 4. Compute the public key $Y = g^x \mod p$. 716 | 717 | #### Digital Signature 718 | 719 | 1. Select a random value $k$ such that $1 < k < p-1$, $\text{gcd}(k, p-1) = 1$. 720 | 2. Compute the first signature component: $r = g^k \mod p$. 721 | 3. Compute the second signature component: $s \equiv (H(m) - x \cdot r) \cdot k^{-1} \mod (p-1)$. 722 | 723 | #### Digital Signature Verification 724 | 725 | 1. Receive the message $m$ and the signature components $(r, s)$. 726 | 2. Compute $w \equiv s^{-1} \mod (p-1)$. 727 | 3. Compute $u_1 \equiv H(m) \cdot w \mod (p-1)$. 728 | 4. Compute $u_2 \equiv r \cdot w \mod (p-1)$. 729 | 5. Compute $v \equiv g^{u_1} \cdot Y^{u_2} \mod p$. 730 | 6. The signature is valid if $v \equiv r \mod p$. 731 | 732 | #### Key Agreement 733 | 734 | 1. Bob generates his key pair $(x_B, Y_B)$. 735 | 2. Bob shares his public key $Y_B$ with Alice. 736 | 3. Alice generates a random symmetric key $K_{\text{sym}}$. 737 | 4. Alice encrypts $K_{\text{sym}}$ using Bob's public key: 738 | $a = g^{k_A} \mod p, \\ 739 | b = Y_B^{k_A} \cdot K_{\text{sym}} \mod p$. 740 | 5. Alice sends the ciphertext $(a, b)$ to Bob. 741 | 6. Bob decrypts the received ciphertext using his private key to obtain: 742 | $K_{\text{sym}} = (b \cdot a^{-x_B}) \mod p$. 743 | 7. Now, both Alice and Bob have the shared symmetric key $K_{\text{sym}}$ for further communication. 744 |
745 | 746 | ### EC-ElGamal 747 | 748 | The EC-ElGamal algorithm is a cryptographic scheme based on elliptic curves that enables the encryption of messages between two parties using a shared public key. Is a cryptographic scheme that allows secure message transmission over an insecure channel. The algorithm relies on the mathematical properties of elliptic curves to ensure the confidentiality of messages. 749 | 750 |
751 | Pure EC-ElGamal
752 | EC-ElGamal encryption using elliptic curves allows secure message transmission by having Alice generate a private key $y$ and a public key $Y = y \cdot G$, while Bob encrypts a message $M$ with a random value $r$, computing $C_1 = r \cdot G$ and $C_2 = r \cdot Y + M$, and Alice decrypts using $M = C_2 - y \cdot C_1$. 753 | 754 | First, Alice generates a private key $y$ and a public key of: 755 | 756 | $Y = y \cdot G$ 757 | 758 | where $G$ is the base point on the curve. She can share this public key $Y$ with Bob. When Bob wants to encrypt something for Alice, he generates a random value $r$ and the message value $M$, and then computes: 759 | 760 | $C_1 = r \cdot G$ 761 | 762 | $C_2 = r \cdot Y + M$ 763 | 764 | To decrypt, Alice takes her private key $y$ and computes: 765 | 766 | $M = C_2 - y \cdot C_1$ 767 | 768 | This works because: 769 | 770 | $M = C_2 - y \cdot C_1 = r \cdot y \cdot G + M - y \cdot r \cdot G = M$ 771 |
772 | 773 | ### GOST (GOvernment STandard of Russian Federation) 774 | GOST refers to a set of technical standards maintained by the Euro-Asian Council for Standardization, Metrology and Certification (EASC), a regional standards organization operating under the auspices of the Commonwealth of Independent States (CIS). 775 | 776 | ### Key sizes 777 | - **Bit-length Equivalence** 778 | 779 | | Symmetric Key Size | RSA and EG Key Size | ECC Key Size | 780 | |:-------------------:|:---------------------:|:--------------:| 781 | | 80 | 1024 | 160 | 782 | | 112 | 2048 | 224 | 783 | | 128 | 3072 | 256 | 784 | | 192 | 7680 | 384 | 785 | | 256 | 15360 | 512 | 786 | 787 | ### IBE 788 | Identity-Based Encryption (IBE) is a cryptographic scheme that enables users to encrypt and decrypt messages using easily memorable and publicly known information, such as an email address or user identity, as the public key. In IBE, the sender encrypts a message with the recipient's identity, and the recipient, possessing a private key generated by a trusted authority known as Key Generation Authority (KGA), can decrypt the message. Unlike traditional public-key cryptography, IBE eliminates the need for a centralized public key directory, as the user's identity itself serves as the public key. This convenience in key management makes IBE particularly suitable for secure communication in decentralized or large-scale systems, where distributing and managing individual public keys may be impractical. 789 | 790 |
IBE Key Management System (KMS) 791 | 792 | **Figure 1** 793 | ```mermaid 794 | graph TD 795 | subgraph IBEKeyManagementSystem["Key Management System"] 796 | PKG["Private Key Generator (PKG)"] 797 | RA["Registration Authority (RA)"] 798 | PPS["Public Parameter Server (PPS)"] 799 | User["User/Client"] 800 | end 801 | 802 | PKG <-->|Secure Channel| RA 803 | PKG --> PPS 804 | RA <-->|Secure Channel| User 805 | PPS -.->|Public Parameters| User 806 | 807 | classDef dashed stroke-dasharray: 5 5 808 | class IBEKeyManagementSystem dashed 809 | ``` 810 | 811 | The **IBE's Key Management System (KMS)** consists of the **Private Key Generator (PKG)**, **Registration Agency (RA)**, **Public Parameter Server (PPS)**, and **User Terminal Entity (User/Client)**. The system architecture is illustrated in **Figure 1**. The functions of each entity are described below. 812 | 813 | #### 1. **Private Key Generation Center (PKG):** 814 | - **Function:** Uses the system master key and related parameters to generate private keys for users. Provides related management and query services. 815 | 816 | #### 2. **Registration Service (RA):** 817 | - **Functions:** 818 | - Undertakes tasks related to user key application registration, authentication, management, and business communication with PKG. 819 | - Provides symmetric, asymmetric, and hash cryptographic services. 820 | - Receives key data returned by PKG and writes it into the key carrier of the terminal entity. 821 | 822 | #### 3. **Public Parameter Service (PPS):** 823 | - **Function:** A user-oriented information service system, providing publicly accessible addresses for secure query and distribution of public parameters and policies. Public parameters include password parameters and user ID status directories that can be shared publicly. 824 | 825 | #### 4. **User Terminal Entity (User/Client):** 826 | - **Functions:** 827 | - Terminal application system of the user information service system. 828 | - Applies for keys directly from PKG or through a local agent. 829 | - Realizes the storage and use of its own private keys. 830 | 831 | **IBE Key Management System Architecture:** 832 | - **Secure Channels:** The generation and distribution of user keys mainly involve entities such as PKG, RA, and User/Client. This is achieved by establishing secure channels between PKG and RA, and between RA and User/Client, ensuring secure transfer and download of keys. 833 | 834 | **Summary:** 835 | The architecture of the IBE Key Management System ensures secure generation of private keys by PKG, tasks of key registration and application are carried out by RA, public parameters are provided by PPS, and users interact with the system through the User/Client terminal. Secure channels facilitate the transfer and download of keys between these entities, ensuring the overall security of the key management system.
836 | 837 |
838 | Threshold IBE 839 | 840 | Threshold IBE enhances the classic Boneh-Franklin scheme by introducing a distributed Private Key Generator (PKG). Instead of a single trusted entity holding the master secret key, the secret is shared across multiple servers using Shamir's Secret Sharing. To extract a private key for a given identity, at least $t$ out of $n$ servers must collaborate. Each server computes a partial key share, which is then combined via Lagrange interpolation to reconstruct the user's full private key. This model mitigates single points of failure and strengthens resilience against key compromise. 841 | 842 | ```mermaid 843 | graph TD 844 | TA[Trusted Authority] --> S1[Server 1] 845 | TA --> S2[Server 2] 846 | TA --> S3[Server 3] 847 | TA --> S4[Server 4] 848 | TA --> S5[Server 5] 849 | 850 | S1 -.-> User 851 | S3 -.-> User 852 | S5 -.-> User 853 | 854 | User --> Key[Private Key] 855 | 856 | subgraph Formulas 857 | F1["Setup: 858 | s ∈ Z_q 859 | f(x) = s + a₁x + ... + aₜ₋₁xᵗ⁻¹ 860 | sᵢ = f(i)"] 861 | F2["Partial Key Extraction: 862 | Q_ID = H₁(ID) 863 | dᵢ = sᵢ · Q_ID"] 864 | F3["Key Reconstruction: 865 | λⱼ = Π (xₖ/(xₖ - xⱼ)) 866 | d_ID = Σ λⱼ · dᵢⱼ"] 867 | end 868 | 869 | F1 -.-> TA 870 | F2 -.-> S5 871 | F3 -.-> Key 872 | 873 | %% Threshold indication 874 | S1:::threshold 875 | S3:::threshold 876 | S5:::threshold 877 | 878 | classDef threshold stroke-dasharray: 5 5 879 | ``` 880 | 881 | #### 1. Setup (master authority splits the secret) 882 | 883 | - Let $s \in \mathbb{Z}_q$ be the master secret (the PKG’s private key). 884 | - A random polynomial of degree $t - 1$ is defined as $f(x) = s + a_1 x + a_2 x^2 + \dots + a_{t-1} x^{t-1}$. 885 | - Each server $i \in \{1, 2, \dots, n\}$ receives a **partial key** (a point on the polynomial): $s_i = f(i)$. 886 | - The public key of the system is: $P_{\text{pub}} = s \cdot P$. 887 | 888 | #### 2. Partial Key Extraction (by each server) 889 | 890 | - The identity is mapped to a point on the elliptic curve group: $Q_{\text{ID}} = H_1(\text{ID}) \in G_1$. 891 | - Each server computes its partial private key: $d_i = s_i \cdot Q_{\text{ID}}$. 892 | 893 | #### 3. Combining Partial Keys (Lagrange Interpolation) 894 | 895 | - Given a subset of $t$ partial keys $d_{i_1}, d_{i_2}, \dots, d_{i_t}$, compute the Lagrange coefficients: 896 | $\lambda_j = \prod_{\substack{1 \leq k \leq t \\ k \ne j}} \frac{x_k}{x_k - x_j}$. 897 | - The final private key for the identity is reconstructed as: 898 | $d_{\text{ID}} = \sum_{j=1}^{t} \lambda_j \cdot d_{i_j} = s \cdot Q_{\text{ID}}$. 899 | 900 | This Threshold IBE/IBS scheme supports the Cha-Cheon, Hess, and Boneh-Franklin constructions, i.e., schemes where the private key lies in $G_1$, the public key lies in $G_2$, and the private key extraction involves only linear operations (scalar multiplication), without requiring inversion or non-linear computations. This compatibility is crucial for enabling threshold key extraction via Shamir's Secret Sharing, as each server can compute a partial key share in $G_1$, which can then be linearly combined using Lagrange interpolation to reconstruct the full private key $s \cdot Q_{\text{ID}}$. 901 |
902 | 903 | ### IKM (input key material value) 904 | Keying material is in general to include things like shared Diffie-Hellman secrets (which are not suitable as symmetric keys), which have more structure than normal keys. 905 | 906 | ### MAC 907 | MAC (Message Authentication Code) is a cryptographic function used to ensure the integrity and authenticity of a message. It takes a message and a secret key as inputs and produces a fixed-size authentication tag, which is appended to the message. The receiver can then verify the authenticity of the message by recomputing the MAC using the shared secret key and comparing it to the received tag. If they match, the message is deemed authentic and unaltered. 908 | 909 | ### ML-KEM, ML-DSA 910 | Module-lattice-based algorithms, such as KEM (Key Encapsulation Mechanism) and DSA (Digital Signature Algorithm), are promising solutions in post-quantum cryptography that provide security against attacks from quantum computers. KEM facilitates secure key exchange by encapsulating a secret key in an object, leveraging complex mathematical problems like the Shortest Vector Problem (SVP) or Learning With Errors (LWE) to ensure security and efficiency. Meanwhile, DSA generates and verifies digital signatures, ensuring the authenticity and integrity of messages while also using lattice structures for protection against quantum algorithms. Together, these approaches represent a significant advancement for information security in the future. 911 | 912 | ### NUMS 913 | **Microsoft Nothing Up My Sleeve Elliptic curves** 914 | [NUMS](http://www.ietf.org/archive/id/draft-black-numscurves-01.txt) (Nothing Up My Sleeve) curves, which are supported in the MSRElliptic Curve Cryptography Library (a.k.a. MSR ECCLib). 915 | 916 | These curves are elliptic curves over a prime field, just like the NIST or Brainpool curves. However, the domain-parameters are choosen using a VERY TIGHT DESIGN SPACE to ensure, that the introduction of a backdoor is infeasable. For a desired size of $s$ bits the prime $p$ is choosen as $p = 2^s - c$ with the smallest $c$ where $c>0$ and $p$ mod 4 = 3 and $p$ being prime. 917 | 918 | ### PBKDF2 919 | PBKDF2 (Password-Based Key Derivation Function 2) is a widely used cryptographic function designed to derive secure cryptographic keys from weak passwords or passphrases. It applies a pseudorandom function, such as HMAC-SHA1, HMAC-SHA256, or HMAC-SHA512, multiple times in a loop, with a salt and a user-defined number of iterations, effectively increasing the computational cost of key generation. This technique enhances the resilience against brute-force attacks, making it more difficult and time-consuming for attackers to obtain the original password from the derived key. 920 | 921 | ### Post-Quantum Cryptography (PQC) 922 | Quantum computing is in an early stage of development and faces significant challenges, including the control and correction of quantum errors. Predictions vary, but many experts agree that we are still several years, or even decades, away from having the ability to build a quantum computer large enough to threaten public key cryptography algorithms currently considered secure. Scalable, sufficiently powerful quantum computers have not yet been constructed. Therefore, post-quantum cryptography is more of a precautionary measure, as classical algorithms remain secure for most everyday applications. Understand which algorithms have been compromised with the advent of quantum algorithms like Shor and Grover: 923 | 924 | - **Security Level** 925 | 926 | |Name | Function |pre-quantum | post-quantum | 927 | |:--------------|:--------------|:-------------:|:--------------:| 928 | |AES-128 | block cipher | 128 | 64 (Grover) | 929 | |AES-256 | block cipher | 256 | 128 (Grover) | 930 | |Salsa20 | stream cipher | 256 | 128 (Grover) | 931 | |GMAC | MAC | 128 | 128 | 932 | |Poly1305 | MAC | 128 | 128 | 933 | |SHA-256 | hash function | 256 | 128 (Grover) | 934 | |SHA-3 | hash function | 256 | 128 (Grover) | 935 | |RSA-3072 | encryption | 128 | broken (Shor) | 936 | |RSA-3072 | signature | 128 | broken (Shor) | 937 | |256-bit ECDH | key exchange | 128 | broken (Shor) | 938 | |256-bit ECDSA | signature | 128 | broken (Shor) | 939 | 940 | ### Schnorr Signatures 941 | The key generation process begins with generating a safe prime $p = 2q + 1$, where both $p$ and $q$ are prime numbers. Then, a generator $g$ of a subgroup of order $q$ is computed. The private key $x$ is a randomly chosen integer in $[0, q - 1]$, and the public key is $y = g^x \mod p$. These values form the basis of the Schnorr signature system. Parameters $(p, q, g)$ are shared across users, while keys $x$ and $y$ are individual-specific. The Schnorr signature is generated by selecting a random nonce $k$, then computing a commitment $r = g^k \mod p$. A challenge $e$ is computed by hashing $r$ concatenated with the message. The response $s$ is then calculated using the formula $s = (k + e \cdot x) \mod q$. The final signature is the pair $(e, s)$, which is compact and secure under the discrete logarithm assumption. To verify a Schnorr signature, the verifier recomputes a value $r'$ from the response $s$ and the challenge $e$, using the public key. A hash is then computed from $r'$ and the message to produce $e'$. If $e' = e$, the signature is valid. 942 | 943 |
944 | Schnorr Signature Scheme 945 | 946 | #### Key Generation 947 | 948 | 1. Generate a prime $q$ of the desired bit length. 949 | 2. Compute $p = 2q + 1$, and verify that $p$ is prime. 950 | 3. Find a generator $g$ of the subgroup of order $q$ in $\mathbb{Z}_p^*$. 951 | 4. Choose a private key $x \in [0, q - 1]$. 952 | 5. Compute the public key $y = g^x \mod p$. 953 | 954 | #### Signing 955 | 956 | 1. Select a random $k \in [0, q - 1]$. 957 | 2. Compute $r = g^k \mod p$. 958 | 3. Compute the challenge $e = H(r \parallel m) \mod q$. 959 | 4. Compute the response $s = (k + e \cdot x) \mod q$. 960 | 5. The signature is the pair $(e, s)$. 961 | 962 | #### Verification 963 | 964 | 1. Receive the message $m$, and signature $(e, s)$. 965 | 2. Compute $g^s \mod p$. 966 | 3. Compute $y^e \mod p$ and its modular inverse. 967 | 4. Compute $r' = g^s \cdot (y^e)^{-1} \mod p$. 968 | 5. Compute $e' = H(r' \parallel m) \mod q$. 969 | 6. The signature is valid if $e' = e$. 970 | 971 | #### Notes 972 | 973 | 1. $H(m)$ represents a cryptographic hash function (e.g., SHA-256). 974 | 2. $k$ must be freshly generated for each signature and kept secret. 975 | 3. $\parallel$ denotes byte-wise concatenation. 976 | 4. The group $\mathbb{Z}_p^*$ must have a known subgroup of prime order $q$. 977 | 5. The hash function must be collision-resistant and preimage-resistant. 978 | 979 |
980 | 981 | ### ShangMi (SM) National secret SM2/SM3/SM4 algorithms 982 | SM2 is a public key cryptographic algorithm based on elliptic curves, used for e.g. generation and verification of digital signatures; SM3, a hashing algorithm comparable to SHA-256; and SM4, a block cipher algorithm for symmetric cryptography comparable to AES-128. These standards are becoming widely used in Chinese commercial applications such as banking and telecommunications and are sometimes made mandatory for products procured by Chinese government agencies. SM4 is part of the ARMv8.4-A expansion to the ARM architecture. 983 | 984 | ### SM9 GM/T 0044-2016 Public key algorithm 256-bit 985 | Parameters for the sm9p256v1 Elliptic curve 986 | 987 | SM9 is a Chinese National Identity Based Cryptography Standard and was originally published using a 256-bit Barreto-Naehrig Curve as its primary example. The new paper suggests that because attacks against some Barreto-Naehrig curves have improved that the SM9 standard should adopt a 384-bit Barreto-Naehrig Curve. The authors go on to suggest that this curve offers roughly 118 bits of security. 988 | 989 | ### XOR 990 | XOR (Exclusive OR) is a logical operator that works on bits. Let’s denote it by ^. If the two bits it takes as input are the same, the result is 0, otherwise it is 1. This implements an exclusive or operation, i.e. exactly one argument has to be 1 for the final result to be 1. We can show this using a truth table: 991 | 992 | - **exclusive or** 993 | 994 | |x |y | x^y | 995 | |:---:|:---:|:---:| 996 | |0 |0 |0 | 997 | |0 |1 |1 | 998 | |1 |0 |1 | 999 | |1 |1 |0 | 1000 | 1001 | ### Zero-Knowledge Proof (ZKP) 1002 | 1003 | The ZKP for bilinear curves (like BLS12-381) is a non-interactive protocol (NIZK) that enables a prover (user) to demonstrate possession of a valid private key ($sk_{user}$) associated with a public key ($pk_{user}$) without revealing the private key. The proof is verifiable by any party using bilinear pairing properties ($e$). Here's the detailed description: 1004 | 1005 |
1006 | Zero-Knowledge Proof (ZKP) for Bilinear Curves 1007 | 1008 | - **Zero-Knowledge Proof (ZKP)** 1009 | 1. Commitment: $C = r \cdot G_2$, where $r$ is a secure random number, $G_2$ is the elliptic curve base point. 1010 | 2. Challenge: $\chi = H(C \parallel m)$, where $H$ is a cryptographic hash function, $m$ is the message/context. 1011 | 3. Response: $s = r + \chi \cdot sk_{user}$, where $sk_{user}$ is the user's private key and $\chi$ is the computed challenge. 1012 | 4. Verification: Check if $e(s \cdot G_1, G_2) = e(G_1, C + (\chi \cdot pk_{user}))$, where $e$ is the bilinear pairing. 1013 | 5. Validation: If the equality holds, the proof is valid. 1014 | 1015 | - **Verification relies on the properties of bilinear pairing:** 1016 | 1. Linearity: $e(s \cdot G_1, G_2) = e(G_1, G_2)^{s} = e(G_1, G_2)^{r + \chi \cdot sk_{user}}$ 1017 | 2. Substitution: $e(G_1, G_2)^{r + \chi \cdot sk_{user}} = e(G_1, C + \chi \cdot pk_{user})$ 1018 | 3. Expansion: $e(G_1, C + \chi \cdot pk_{user}) = e(G_1, r \cdot G_2 + \chi \cdot sk_{user} \cdot G_2) = e(G_1, G_2)^{r + \chi \cdot sk_{user}}$ 1019 |
1020 | 1021 | ### ZUC (Zu Chongzhi cipher) 1022 | 1023 | The ZUC-256 cipher is a symmetric key encryption algorithm widely used in 5G communication technologies, providing robust and efficient security. The ZUC-256 algorithm is based on the original ZUC cipher, developed by the Chinese Academy of Sciences and adopted by the 3rd Generation Partnership Project (3GPP) standard to ensure data integrity and confidentiality in fifth-generation mobile networks. Its name pays tribute to Zu Chongzhi, a 5th-century Chinese mathematician and astronomer, renowned for his contributions to mathematics, astronomy, and hydraulic engineering. His remarkable approximation of the value of π (pi) enabled more precise calculations in various scientific fields. 1024 | 1025 | ## Features 1026 | * **Cryptographic Functions:** 1027 | 1028 | * Asymmetric Encryption 1029 | * Symmetric Encryption + AEAD Modes 1030 | * Digital Signature 1031 | * Recursive Hash Digest + Check 1032 | * ECDH (Shared Key Agreement) 1033 | * CMAC (Cipher-based message authentication code) 1034 | * HMAC (Hash-based message authentication code) 1035 | * HKDF (HMAC-based key derivation function) 1036 | * PBKDF2 (Password-based key derivation function) 1037 | * PHS (Password-hashing scheme) 1038 | * TLS (Transport Layer Security v1.2 and 1.3) 1039 | * TLCP (Transport Layer Cryptography Protocol v1.1) 1040 | * PKCS12 (Personal Information Exchange Syntax v1.1) 1041 | * X.509 CSRs, CRLs and Certificates 1042 | 1043 | * **Non-cryptographic Functions:** 1044 | 1045 | * Hex string encoder/dump/decoder (xxd-like) 1046 | * Base32 encoder/decoder 1047 | * Base64 encoder/decoder 1048 | * Base85 encoder/decoder 1049 | * Zlib compression 1050 | * Privacy-Enhanced Mail (PEM format) 1051 | * RandomArt (OpenSSH-like) 1052 | 1053 | ## Usage 1054 |
Usage of edgetk:
1055 |   -algorithm string
1056 |         Public key algorithm: EC, Ed25519, GOST2012, SM2. (default "RSA")
1057 |   -base32 string
1058 |         Encode binary string to Base32 format and vice-versa. [enc|dec]
1059 |   -base64 string
1060 |         Encode binary string to Base64 format and vice-versa. [enc|dec]
1061 |   -base85 string
1062 |         Encode binary string to Base85 format and vice-versa. [enc|dec]
1063 |   -bits int
1064 |         Key length. (for keypair generation and symmetric encryption)
1065 |   -cacert string
1066 |         CA Certificate path. (for TLCP Protocol)
1067 |   -cakey string
1068 |         CA Private key. (for TLCP Protocol)
1069 |   -cert string
1070 |         Certificate path.
1071 |   -challenge string
1072 |         Challenge for the proof. (for Zero-Knowledge Proof ZKP)
1073 |   -change
1074 |         Change Passphrase of a Private Key.
1075 |   -check
1076 |         Check hashsum file. ('-' for STDIN)
1077 |   -cipher string
1078 |         Symmetric algorithm: aes, blowfish, magma or sm4. (default "aes")
1079 |   -commitment string
1080 |         Commitment for the proof. (for Zero-Knowledge Proof ZKP)
1081 |   -crl string
1082 |         Certificate Revocation List path.
1083 |   -crypt string
1084 |         Bulk Encryption with Stream and Block ciphers. [enc|dec|help]
1085 |   -curve string
1086 |         Subjacent curve. (secp256r1, secp256k1, numsp256t1)
1087 |   -days int
1088 |         Defines the validity of the certificate from the date of creation.
1089 |   -digest
1090 |         Target file/wildcard to generate hashsum list. ('-' for STDIN)
1091 |   -factorp string
1092 |         Makwa private Factor P. (for Makwa Password-hashing Scheme)
1093 |   -factorq string
1094 |         Makwa private Factor Q. (for Makwa Password-hashing Scheme)
1095 |   -hex string
1096 |         Encode binary string to hex format and vice-versa. [enc|dump|dec]
1097 |   -hid uint
1098 |         Hierarchy Identifier. (for IBE/IBS User Private Key) (default 1)
1099 |   -id string
1100 |         User Identifier. (for IBE/IBS User Private Key operations)
1101 |   -info string
1102 |         Additional info. (for HKDF command and AEAD bulk encryption)
1103 |   -ipport string
1104 |         Local Port/remote's side Public IP:Port.
1105 |   -isca
1106 |         The requested CSR is for a Certificate Authority (CA).
1107 |   -iter int
1108 |         Iter. (for Password-based key derivation function) (default 1)
1109 |   -iv string
1110 |         Initialization Vector. (for symmetric encryption)
1111 |   -kdf string
1112 |         Key derivation function. [pbkdf2|hkdf|scrypt|argon2|lyra2re2]
1113 |   -key string
1114 |         Asymmetric key, symmetric key or HMAC key, depending on operation.
1115 |   -keys value
1116 |         Key to be combined. (can be passed multiple times)
1117 |   -mac string
1118 |         Compute Hash/Cipher-based message authentication code.
1119 |   -master string
1120 |         Master key path. (for sm9 setup) (default "Master.pem")
1121 |   -md string
1122 |         Hash algorithm: sha256, sha3-256 or whirlpool. (default "sha256")
1123 |   -mode string
1124 |         Mode of operation: GCM, MGM, CBC, CFB8, OCB, OFB. (default "CTR")
1125 |   -modulus string
1126 |         Makwa modulus. (Makwa hash Public Parameter)
1127 |   -msgs value
1128 |         Messages to be verified. (can be passed multiple times)
1129 |   -nopad
1130 |         No padding. (for Base64 and Base32 encoding)
1131 |   -params string
1132 |         ElGamal Public Parameters path.
1133 |   -paramset string
1134 |         Elliptic curve ParamSet: A, B, C, D. (for GOST2012) (default "A")
1135 |   -pass string
1136 |         Password/Passphrase. (for Private key PEM encryption)
1137 |   -passout string
1138 |         User Password. (for SM9 User Private Key PEM encryption)
1139 |   -peerid string
1140 |         Remote's side User Identifier. (for SM9 Key Exchange)
1141 |   -pkey string
1142 |         Subcommands: keygen|certgen, sign|verify|derive, text|modulus.
1143 |   -prv string
1144 |         Private key path. (for keypair generation) (default "Private.pem")
1145 |   -pub string
1146 |         Public key path. (for keypair generation) (default "Public.pem")
1147 |   -pub2 string
1148 |         Public key 2 path. (for keypair generation)
1149 |   -pubs value
1150 |         Paths to the public keys. (can be passed multiple times)
1151 |   -rand int
1152 |         Generate random cryptographic key with given bit length.
1153 |   -recover
1154 |         Recover Passphrase from Makwa hash with Private Parameters.
1155 |   -recursive
1156 |         Process directories recursively. (for DIGEST command only)
1157 |   -response string
1158 |         Response for the proof. (for Zero-Knowledge Proof ZKP)
1159 |   -root string
1160 |         Root CA Certificate path.
1161 |   -salt string
1162 |         Salt. (for HKDF and PBKDF2 commands)
1163 |   -scheme string
1164 |         Subjacent Scheme. (for Identity-Based Cryptography IBE/IBS)
1165 |   -seed string
1166 |         Seed. (for ML-KEM and ML-DSA key generation)
1167 |   -signature string
1168 |         Input signature. (for VERIFY command and MAC verification)
1169 |   -subj string
1170 |         Subject: Identity. (Example: "/CN=/OU=/O=/ST=/L=/C=/emailAddress=")
1171 |   -tcp string
1172 |         Encrypted TCP/IP Transfer Protocol. [server|ip|client]
1173 |   -token string
1174 |         Token containing an encrypted symmetric key.
1175 |   -tweak string
1176 |         Additional 128-bit parameter input. (for THREEFISH encryption)
1177 |   -uu string
1178 |         Encode binary files with uuencoding and vice-versa. [enc|dec]
1179 |   -version
1180 |         Print version info.
1181 |   -wrap int
1182 |         Wrap lines after N columns. (for Base64/32 encoding) (default 64)
1183 |   -xx string
1184 |         Encode binary files with xxencoding and vice-versa. [enc|dec]
1185 |   -zlib string
1186 |         Compress string with zlib algorithm and vice-versa. [enc|dec]
1187 | 1188 | ## Examples 1189 | 1190 | #### Post-Quantum Digital Signature with ML-DSA or SLH-DSA: 1191 | ```sh 1192 | edgetk -pkey keygen -algorithm [ml-dsa|slh-dsa] -prv Private.pem -pub Public.pem 1193 | edgetk -pkey sign -key Private.pem -pass "pass" -signature sign.txt FILE 1194 | edgetk -pkey verify -key Public.pem -signature sign.txt FILE 1195 | ``` 1196 | #### Post-Quantum Key Encapsulation Mechanism (ML-KEM): 1197 | ```sh 1198 | edgetk -pkey keygen -algorithm ml-kem -prv Private.pem -pub Public.pem 1199 | edgetk -pkey wrapkey -key Public.pem -cipher cipher.txt 1200 | edgetk -pkey unwrapkey -key Private.pem -pass "pass" -cipher cipher.txt 1201 | ``` 1202 | 1203 |
PQC Public Key Infrastructure (PKI) 1204 | 1205 | #### Key Generation: 1206 | ```sh 1207 | edgetk -pkey keygen -algorithm [ml-dsa|slh-dsa] -prv CAPrivate.pem -pub CAPublic.pem 1208 | ``` 1209 | #### Self-Signed Certificate Generation: 1210 | ```sh 1211 | edgetk -pkey certgen -key CAPrivate.pem -pub CAPublic.pem -cert CACert.crt 1212 | ``` 1213 | #### Check Certificate Authenticity: 1214 | ```sh 1215 | edgetk -pkey check -cert CACert.crt -key CAPublic.pem 1216 | echo $? 1217 | ``` 1218 | #### Certificate Signing Request (CSR): 1219 | ```sh 1220 | edgetk -pkey req -key Private.pem -pub Public.pem -cert Cert.csr 1221 | ``` 1222 | #### Display CSR Information: 1223 | ```sh 1224 | edgetk -pkey text -cert Cert.csr 1225 | ``` 1226 | #### X.509 Certificate Signing: 1227 | ```sh 1228 | edgetk -pkey x509 -key CAPrivate.pem -root CACert.crt -cert Cert.csr Cert.crt 1229 | ``` 1230 | #### Display Certificate Information: 1231 | ```sh 1232 | edgetk -pkey text -cert Cert.crt 1233 | echo $? 1234 | ``` 1235 | #### Check Certificate Authenticity: 1236 | ```sh 1237 | edgetk -pkey check -cert Cert.crt -key CAPublic.pem 1238 | echo $? 1239 | ``` 1240 | #### Generate Certificate Revocation List (CRL): 1241 | ```sh 1242 | edgetk -pkey crl -key CAPrivate.pem pub CAPublic.pem -cert CACert.crt serials.txt NewCRL.pem 1243 | ``` 1244 | #### Display CRL Information: 1245 | ```sh 1246 | edgetk -pkey text -crl NewCRL.pem 1247 | ``` 1248 | #### Check CRL Authenticity: 1249 | ```sh 1250 | edgetk -pkey check -crl NewCRL.pem -cert CACert.crt 1251 | echo $? 1252 | ``` 1253 | #### Validate Certificate Against CRL: 1254 | ```sh 1255 | edgetk -pkey validate -cert Cert.crt -crl NewCRL.pem 1256 | echo $? 1257 | ``` 1258 | 1259 | For non-interactive scripts, you must use the flags -pass, -days and -subj: 1260 | ``` 1261 | -pass "passphrase" 1262 | -days 365 1263 | -subj "/CN=Test/OU=/O=/ST=/L=/C=/emailAddress=test@test.com" 1264 | ``` 1265 |
1266 | 1267 | #### Asymmetric EG keypair generation: 1268 | ```sh 1269 | ./edgetk -pkey setup -algorithm elgamal [-bits 4096] > ElGamalParams.pem 1270 | ./edgetk -pkey keygen -algorithm elgamal -params ElGamalParams.pem [-pass "passphrase"] [-prv Private.pem] [-pub Public.pem] 1271 | ``` 1272 | #### EG Digital signature: 1273 | ```sh 1274 | ./edgetk -pkey sign -algorithm elgamal [-scheme dsa] -key Private.pem [-pass "passphrase"] < file.ext > sign.txt 1275 | sign=$(cat sign.txt|awk '{print $2}') 1276 | ./edgetk -pkey verify -algorithm elgamal [-scheme dsa] -key Public.pem -signature $sign < file.ext 1277 | echo $? 1278 | ``` 1279 | #### EG Encryption scheme: 1280 | ```sh 1281 | ./edgetk -pkey wrapkey -algorithm elgamal -key Public.pem > cipher.txt 1282 | ciphertext=$(cat cipher.txt|grep "Cipher"|awk '{print $2}') 1283 | ./edgetk -pkey unwrapkey -algorithm elgamal -key Private.pem [-pass "passphrase"] -cipher $ciphertext 1284 | ``` 1285 | #### EG Zero-Knowledge Proof (ZKP): 1286 | ```sh 1287 | ./edgetk -pkey proof -key Private.pem file.ext > proof.txt 1288 | commit=$(grep "Commitment" proof.txt | awk '{print $2}') 1289 | chall=$(grep "Challenge" proof.txt | awk '{print $2}') 1290 | resp=$(grep "Response" proof.txt | awk '{print $2}') 1291 | ./edgetk -pkey verify-proof -key Public.pem -commitment $commit -challenge $chall -response $resp file.ext 1292 | echo $? 1293 | ``` 1294 | #### Asymmetric RSA keypair generation: 1295 | ```sh 1296 | ./edgetk -pkey keygen -algorithm rsa -bits 4096 [-pass "passphrase"] [-prv Private.pem] [-pub Public.pem] 1297 | ``` 1298 | #### Parse keys info: 1299 | ```sh 1300 | ./edgetk -pkey [text|modulus] [-pass "passphrase"] -key Private.pem 1301 | ./edgetk -pkey [text|modulus|randomart|fingerprint] -key Public.pem 1302 | ``` 1303 | #### Digital signature: 1304 | ```sh 1305 | ./edgetk -pkey sign -algorithm rsa -md sha256 -key Private.pem [-pass "passphrase"] < file.ext > sign.txt 1306 | sign=$(cat sign.txt|awk '{print $2}') 1307 | ./edgetk -pkey verify -algorithm rsa -md sha256 -key Public.pem -signature $sign < file.ext 1308 | echo $? 1309 | ``` 1310 | #### Encryption/decryption with RSA algorithm: 1311 | ```sh 1312 | ./edgetk -pkey encrypt -key Public.pem < plaintext.ext > ciphertext.ext 1313 | ./edgetk -pkey decrypt -key Private.pem < ciphertext.ext > plaintext.ext 1314 | ``` 1315 | #### Asymmetric EC keypair generation (256-bit): 1316 | ```sh 1317 | ./edgetk -pkey keygen -bits 256 -algorithm EC [-pass "passphrase"] [-prv Private.pem] [-pub Public.pem] 1318 | ``` 1319 | #### EC Diffie-Hellman: 1320 | ```sh 1321 | ./edgetk -pkey derive -algorithm EC -key Private.pem -pub Peerkey.pem 1322 | ``` 1323 | #### EC-ElGamal scheme: 1324 | ```sh 1325 | ./edgetk -pkey wrapkey -algorithm EC -key Public.pem > cipher.txt 1326 | ciphertext=$(cat cipher.txt|grep "Cipher"|awk '{print $2}') 1327 | ./edgetk -pkey unwrapkey -algorithm EC -key Private.pem [-pass "passphrase"] -cipher $ciphertext 1328 | ``` 1329 | #### Generate Self Signed Certificate: 1330 | ```sh 1331 | ./edgetk -pkey certgen -key Private.pem [-pass "passphrase"] [-cert "output.crt"] 1332 | ``` 1333 | #### Generate Certificate Signing Request: 1334 | ```sh 1335 | ./edgetk -pkey req -key Private.pem [-pass "passphrase"] [-cert Certificate.csr] 1336 | ``` 1337 | #### Sign CSR with CA Certificate: 1338 | ```sh 1339 | ./edgetk -pkey x509 -key Private.pem -root CACert.pem -cert Certificate.csr > Certificate.crt 1340 | ``` 1341 | #### Parse Certificate info: 1342 | ```sh 1343 | ./edgetk -pkey [text|modulus] -cert Certificate.pem 1344 | ``` 1345 | #### Generate Certificate Revocation List: 1346 | ```sh 1347 | ./edgetk -pkey crl -cert CACert.pem -key Private.pem -crl old.crl serials.txt > NewCRL.crl 1348 | ``` 1349 | For non-interactive scripts, you must use the flags -pass, -days and -subj: 1350 | ``` 1351 | -pass "passphrase" 1352 | -days 365 1353 | -subj "/CN=Test/OU=/O=/ST=/L=/C=/emailAddress=test@test.com" 1354 | ``` 1355 | #### TLS Layer (TCP/IP): 1356 | ```sh 1357 | ./edgetk -tcp ip > MyExternalIP.txt 1358 | ./edgetk -tcp server -cert Certificate.pem -key Private.pem [-ipport "8081"] 1359 | ./edgetk -tcp client -cert Certificate.pem -key Private.pem [-ipport "127.0.0.1:8081"] 1360 | ``` 1361 | Or IPv6 1362 | ```sh 1363 | ./edgetk -tcp server -cert Certificate.pem -key Private.pem [-ipport "8081"] 1364 | ./edgetk -tcp client -cert Certificate.pem -key Private.pem [-ipport "[2001:db8::1]:8081"] 1365 | ``` 1366 | 1367 | #### Symmetric key generation (256-bit): 1368 | ```sh 1369 | ./edgetk -rand 256 1370 | ``` 1371 | #### Encryption/decryption with block cipher: 1372 | ```sh 1373 | ./edgetk -crypt enc -key $256bitkey < plaintext.ext > ciphertext.ext 1374 | ./edgetk -crypt dec -key $256bitkey < ciphertext.ext > plaintext.ext 1375 | ``` 1376 | #### Message digest: 1377 | ```sh 1378 | ./edgetk -digest [-recursive] "*.*" > hash.txt 1379 | ./edgetk -check hash.txt 1380 | echo $? 1381 | or 1382 | ./edgetk -check hash.txt|grep FAILED^|Not found! 1383 | ``` 1384 | #### Bcrypt: 1385 | ```sh 1386 | ./edgetk -digest -md bcrypt -key "yourkey" [-iter 10] > key.bcrypt 1387 | ./edgetk -check -md bcrypt -key "yourkey" < key.bcrypt 1388 | echo $? 1389 | ``` 1390 | #### HMAC: 1391 | ```sh 1392 | ./edgetk -mac hmac -key "secret" < file.ext 1393 | ./edgetk -mac hmac -key "secret" -signature $256bitmac < file.ext 1394 | echo $? 1395 | ``` 1396 | #### HKDF (HMAC-based key derivation function) (128-bit): 1397 | ```sh 1398 | ./edgetk -kdf hkdf -bits 128 -key "IKM" [-salt "salt"] [-info "AD"] 1399 | ``` 1400 | #### IBE (Identity-Based Encryption) 1401 | ##### Master Key Pair Generation: 1402 | 1403 | - Generate a master key pair for BLS12-381. 1404 | ```sh 1405 | ./edgetk -pkey setup -algorithm bls12381 -master "Master.pem" [-pass "passphrase"] -pub "MasterPublic.pem" 1406 | ``` 1407 | 1408 | ##### User's Private Key Generation: 1409 | 1410 | - Generate a private key for a user, associated with their UID and HID. 1411 | ```sh 1412 | ./edgetk -pkey keygen -algorithm bls12381 -master "Master.pem" [-pass "pass"] -prv "Private.pem" [-passout "pass"] -id "UID" -hid 3 1413 | ``` 1414 | 1415 | ##### Key Parsing: 1416 | 1417 | - Parse the master key, user private key, or master public key to view their details. 1418 | ```sh 1419 | ./edgetk -pkey text -key "Master.pem" [-pass "passphrase"] 1420 | ./edgetk -pkey text -key "Private.pem" [-pass "passphrase"] 1421 | ./edgetk -pkey text -key "MasterPublic.pem" 1422 | ``` 1423 | 1424 | ##### Message Encryption with User Public Key: 1425 | 1426 | - Encrypt a message using the master public key and the user’s UID. 1427 | ```sh 1428 | ./edgetk -pkey encrypt -algorithm bls12381 -key "MasterPublic.pem" -id "UID" -hid 3 "plaintext.ext" > "ciphertext.enc" 1429 | ``` 1430 | 1431 | ##### Message Decryption with User Private Key: 1432 | 1433 | - Decrypt a message using the user’s private key. 1434 | ```sh 1435 | ./edgetk -pkey decrypt -algorithm bls12381 -key "Private.pem" [-pass "passphrase"] "ciphertext.enc" 1436 | echo $? 1437 | ``` 1438 | 1439 | ##### Digital Signature Generation: 1440 | 1441 | - Generate a digital signature for a file using the user's private key, and verify the signature using the master public key and the UID of the signer. 1442 | ```sh 1443 | ./edgetk -pkey sign -algorithm bls12381 -key "Private.pem" FILE > sign.txt 1444 | sign=$(cat sign.txt | awk '{print $2}') 1445 | ./edgetk -pkey verify -algorithm bls12381 -key "MasterPublic.pem" -id "UID" -hid 3 -signature $sign FILE 1446 | echo $? 1447 | ``` 1448 | 1449 | ##### User's Private Key Generation for Digital Signature Schems: 1450 | 1451 | - Generate a private key for a user, associated with their UID. 1452 | ```sh 1453 | ./edgetk -pkey keygen -algorithm bls12381sign -scheme [shangmi|barreto] -master "Master.pem" [-pass "pass"] -prv "PrivateSign.pem" [-passout "pass"] -id "UID" -hid 1 1454 | ``` 1455 | 1456 | ##### Digital Signature Generation: 1457 | 1458 | - Generate a digital signature for a file using the user's private key, and verify the signature using the master public key and the UID of the signer. 1459 | ```sh 1460 | ./edgetk -pkey sign -algorithm bls12381 -scheme [shangmi|barreto] -key "PrivateSign.pem" FILE > sign.txt 1461 | sign=$(cat sign.txt | awk '{print $2}') 1462 | ./edgetk -pkey verify -algorithm bls12381 -scheme [shangmi|barreto] -key "MasterPublic.pem" -id "UID" -hid 1 -signature $sign FILE 1463 | echo $? 1464 | ``` 1465 | 1466 | #### SM9 (Chinese IBE Standard) 1467 | ##### Private Key Generation: 1468 | 1469 | - Generate a master key 1470 | ```sh 1471 | ./edgetk -pkey setup -algorithm [-master "Master.pem"] [-pub "Public.pem"] 1472 | ``` 1473 | - Generate a private key and a UID (User ID) and an HID (Hierarchy ID). 1474 | ```sh 1475 | ./edgetk -pkey keygen -algorithm [-master "Master.pem"] [-prv "Private.pem"] [-id "uid"] [-hid 1] 1476 | ``` 1477 | 1478 | ##### Message Encryption: 1479 | 1480 | - To encrypt a message: 1481 | - Use the master public key. 1482 | - Include the UID and HID associated with the private key. 1483 | - Perform the encryption process. 1484 | ```sh 1485 | ./edgetk -pkey encrypt -algorithm sm9encrypt [-key "Public.pem"] [-id "uid"] [-hid 1] < FILE 1486 | ``` 1487 | ##### Message Decryption: 1488 | 1489 | - To decrypt a message: 1490 | - Use the associated private key. 1491 | - Use the corresponding UID. 1492 | - Perform the decryption process. 1493 | ```sh 1494 | ./edgetk -pkey decrypt -algorithm sm9encrypt [-key "Private.pem"] [-id "uid"] < FILE 1495 | ``` 1496 | ##### Digital Signature: 1497 | 1498 | - To sign a message: 1499 | - Use the private key (UID and HID are associated). 1500 | - Perform the signature process. 1501 | ```sh 1502 | ./edgetk -pkey sign -algorithm sm9sign [-key "Private.pem"] < FILE 1503 | ``` 1504 | ##### Digital Signature Verification: 1505 | 1506 | - To verify the signature of a message: 1507 | - Use the master public key. 1508 | - Use the UID and HID associated with the private key that performed the signature. 1509 | - Perform the signature verification process. 1510 | ```sh 1511 | ./edgetk -pkey verify -algorithm sm9sign [-key "Public.pem"] [-id "uid"] [-hid 1] [signature "sign"] < FILE 1512 | ``` 1513 | #### Hex Encoder/Decoder: 1514 | ```sh 1515 | ./edgetk -hex enc < file.ext > file.hex 1516 | ./edgetk -hex dec < file.hex > file.ext 1517 | ./edgetk -hex dump < file.ext 1518 | ``` 1519 | #### Base32/64 Encoder/Decoder: 1520 | ```sh 1521 | ./edgetk -base32 enc [-wrap 0] [-nopad] < file.ext > file.b32 1522 | ./edgetk -base32 dec [-nopad] < file.b32 > file.ext 1523 | ``` 1524 | #### Try: 1525 | ``` 1526 | ./edgetk -crypt help // Describes bulk encryption usage and arguments 1527 | ./edgetk -kdf help // Describes key derivation function usage 1528 | ./edgetk -mac help // Describes message authentication code usage 1529 | ./edgetk -pkey help // Describes public key cryptography usage 1530 | ./edgetk -tcp help // Describes TLS 1.3 Protocol parameters and usage 1531 | ./edgetk -help,-h // Full list of the flags and their defaults 1532 | ./edgetk -version // Print version info 1533 | ``` 1534 | 1535 | #### Config File: 1536 | 1537 | Add support for a configuration file to set default algorithms, eliminating the need for the -algorithm, -cipher, and -md flags for customized use. 1538 | 1539 | Config file `edgetk.ini` example (GOST Standards): 1540 | ``` 1541 | [Defaults] 1542 | algorithm = gost2012 1543 | cipher = kuznechik 1544 | md = streebog256 1545 | mode = mgm 1546 | days = 365 1547 | ``` 1548 | Or even SM2, SM3, SM4, and GCM for the Chinese Standard. 1549 | 1550 | > **Note:** The `edgetk.ini` file is an **optional configuration** used to define default cryptographic algorithms. Specifically, it can override the defaults for: 1551 | > 1552 | > - **Asymmetric encryption algorithm** (default: `RSA`) 1553 | > - **Hash algorithm** (default: `SHA256`) 1554 | > - **Preferred bulk cipher** 1555 | > 1556 | > Please use this configuration with **caution**. Certain choices may affect the program's behavior. For example, setting the default hash to `SHA3` can interfere with RSA signatures, as RSA requires a SHA2-family hash or `RIPEMD160` to function correctly. In this case, you must pass the correct hash via flag `-md`. 1557 | > 1558 | > If anything changes unexpectedly during execution, or if you're unsure about the configuration, you can safely **delete the `edgetk.ini` file**. The code will fall back to its internal defaults, and the program will remain **intact**. 1559 | 1560 | ### How To Use (Graphical User Interface) 1561 | ``` 1562 | ============================================= 1563 | EDGE Crypto Suite - Tcl/Tk Usage Instructions 1564 | ============================================= 1565 | 1566 | OPTION 1: Graphical Interface 1567 | ----------------------------- 1568 | 1. Ensure Tcl/Tk is installed: 1569 | - Linux: sudo apt install tcl tk 1570 | - macOS: brew install tcl-tk 1571 | - Windows: Download freeWrap from https://sourceforge.net/projects/freewrap/ 1572 | - BSD: pkg install tcl tk 1573 | 1574 | 2. Run the graphical interface: 1575 | freewrap app.tcl 1576 | OR 1577 | wish app.tcl 1578 | 1579 | NOTE: 1580 | freeWrap supports Windows 32-bit and 64-bit, as well as Linux, and is capable 1581 | of packaging/compiling Tcl/Tk scripts into a single static standalone binary. 1582 | 1583 | OPTION 2: Command Line 1584 | ---------------------- 1585 | Use the edgetk binary directly: 1586 | ./edgetk [options] FILE 1587 | 1588 | OPTION 3: Integration 1589 | --------------------- 1590 | The graphical interface (app.tcl) calls the edgetk binary internally. 1591 | Both must be located in the same directory. 1592 | 1593 | OPTION 4: System-wide Installation 1594 | ---------------------------------- 1595 | 1. Copy the binary to a system path: 1596 | sudo cp edgetk /usr/local/bin/ 1597 | 1598 | 2. Make the Tcl/Tk script executable: 1599 | chmod +x app.tcl 1600 | 1601 | 3. Run from anywhere: 1602 | ./app.tcl 1603 | OR make a desktop shortcut 1604 | 1605 | DEBUG: 1606 | While running the script, click the "Debug" button. This will display 1607 | the folder(s) where the edgetk binary must be located for the script 1608 | to recognize it correctly. 1609 | 1610 | Supported Platforms: 1611 | - Windows 10/11 (32/64-bit) 1612 | - macOS 10.14+ (Intel & Apple Silicon) 1613 | - Linux (x86, x86_64, ARM, ARM64) 1614 | - BSD (FreeBSD, OpenBSD, NetBSD) 1615 | - Android (via Termux) 1616 | - RaspberryPi (ARMv6/v7/ARM64) 1617 | 1618 | Minimum Tcl/Tk version required: 8.5 or higher 1619 | ============================================== 1620 | ``` 1621 | 1622 | ## Acknowledgments 1623 | 1624 | - [Sergey Matveev](http://www.cypherpunks.su/) (GoGOST Library Author) 1625 | - [RyuaNerin](http://github.com/RyuaNerin) (go-krypto Library Author) 1626 | - [Sun Yimin](https://github.com/emmansun) (GMSM Library Author) 1627 | - [Damian Gryski](https://github.com/dgryski) (Anubis, SipHash, Misty1 Libraries Author) 1628 | - [Dana Booth](https://sourceforge.net/u/danabooth/profile/) (Main Contributor) 1629 | - [Deatil](https://github.com/deatil) (go-cryptobin, go-hash Libraries Author) 1630 | 1631 | ## Contribute 1632 | **Use issues for everything** 1633 | - You can help and get help by: 1634 | - Reporting doubts and questions 1635 | - You can contribute by: 1636 | - Reporting issues 1637 | - Suggesting new features or enhancements 1638 | - Improve/fix documentation 1639 | 1640 | ## License 1641 | 1642 | This project is licensed under the ISC License. 1643 | 1644 | #### Copyright (c) 2020-2025 Pedro F. Albanese - ALBANESE Research Lab. 1645 | Todos os direitos de propriedade intelectual sobre este software pertencem ao autor, Pedro F. Albanese. Vide Lei 9.610/98, Art. 7º, inciso XII. 1646 | --------------------------------------------------------------------------------