github.com/cloudflare/circl@v1.5.0/README.md (about) 1 <img src=".etc/icon.png" align="right" height="300" width="300"/> 2 3 # CIRCL 4 5 [![GitHub release](https://img.shields.io/github/release/cloudflare/circl.svg)](https://GitHub.com/cloudflare/circl/releases/) 6 [![CIRCL](https://github.com/cloudflare/circl/workflows/CIRCL/badge.svg)](https://github.com/cloudflare/circl/actions) 7 [![GoDoc](https://godoc.org/github.com/cloudflare/circl?status.svg)](https://pkg.go.dev/github.com/cloudflare/circl?tab=overview) 8 [![Go Report Card](https://goreportcard.com/badge/github.com/cloudflare/circl)](https://goreportcard.com/report/github.com/cloudflare/circl) 9 [![codecov](https://codecov.io/gh/cloudflare/circl/branch/main/graph/badge.svg)](https://codecov.io/gh/cloudflare/circl) 10 11 **CIRCL** (Cloudflare Interoperable, Reusable Cryptographic Library) is a collection 12 of cryptographic primitives written in Go. The goal of this library is to be used as a tool for 13 experimental deployment of cryptographic algorithms targeting Post-Quantum (PQ) and Elliptic 14 Curve Cryptography (ECC). 15 16 ## Security Disclaimer 17 18 🚨 This library is offered as-is, and without a guarantee. Therefore, it is expected that changes in the code, repository, and API occur in the future. We recommend to take caution before using this library in a production application since part of its content is experimental. All security issues must be reported, please notify us immediately following the instructions given in our [Security Policy](https://github.com/cloudflare/circl/security/policy). 19 20 ## Installation 21 22 You can get CIRCL by fetching: 23 24 ```sh 25 go get -u github.com/cloudflare/circl 26 ``` 27 28 Alternatively, look at the [Cloudflare Go](https://github.com/cloudflare/go/tree/cf) fork to see how to integrate CIRCL natively in Go. 29 30 ## List of Algorithms 31 32 [RFC-7748]: https://doi.org/10.17487/RFC7748 33 [RFC-8032]: https://doi.org/10.17487/RFC8032 34 [RFC-8235]: https://doi.org/10.17487/RFC8235 35 [RFC-9180]: https://doi.org/10.17487/RFC9180 36 [RFC-9380]: https://doi.org/10.17487/RFC9380 37 [RFC-9474]: https://doi.org/10.17487/RFC9474 38 [RFC-9496]: https://doi.org/10.17487/RFC9496 39 [RFC-9497]: https://doi.org/10.17487/RFC9497 40 [FIPS 202]: https://doi.org/10.6028/NIST.FIPS.202 41 [FIPS 186-5]: https://doi.org/10.6028/NIST.FIPS.186-5 42 [BLS12-381]: https://electriccoin.co/blog/new-snark-curve/ 43 [ia.cr/2015/267]: https://ia.cr/2015/267 44 [ia.cr/2019/966]: https://ia.cr/2019/966 45 46 ### Elliptic Curve Cryptography 47 48 | Diffie-Hellman Protocol | 49 |:---:| 50 51 - [X25519](./dh/x25519) and [X448](./dh/x448) functions. ([RFC-7748]) 52 - [Curve4Q](./dh/curve4q) function based on FourQ curve. ([draft-ladd-cfrg-4q](https://datatracker.ietf.org/doc/draft-ladd-cfrg-4q/)) 53 54 | Digital Signature Schemes | 55 |:---:| 56 57 - [Ed25519](./sign/ed25519) and [Ed448](./sign/ed448) signatures. ([RFC-8032]) 58 - [BLS](./sign/bls) signatures. ([draft-irtf-cfrg-bls-signature](https://datatracker.ietf.org/doc/draft-irtf-cfrg-bls-signature/)) 59 60 | Prime Groups | 61 |:---:| 62 63 - [P-256, P-384, P-521](./group). ([FIPS 186-5]) 64 - [Ristretto](./group) group. ([RFC-9496]) 65 - [Bilinear pairings](./ecc/bls12381): with the [BLS12-381] curve, and hash to G1 and G2. 66 - [Hash to curve](./group), hash to field, XMD and XOF [expanders](./expander). ([RFC-9380]) 67 68 | High-Level Protocols | 69 |:---:| 70 71 - [HPKE](./hpke): Hybrid Public-Key Encryption ([RFC-9180]) 72 - [VOPRF](./oprf): Verifiable Oblivious Pseudorandom functions. ([RFC-9497]) 73 - [RSA Blind Signatures](./blindsign/blindrsa). ([RFC-9474]) 74 - [Partilly-blind](./blindsign/blindrsa/partiallyblindrsa/) Signatures. ([draft-cfrg-partially-blind-rsa](https://datatracker.ietf.org/doc/draft-amjad-cfrg-partially-blind-rsa/)) 75 - [CPABE](./abe/cpabe): Ciphertext-Policy Attribute-Based Encryption. ([ia.cr/2019/966]) 76 - [OT](./ot/simot): Simplest Oblivious Transfer ([ia.cr/2015/267]). 77 - [Threshold RSA](./tss/rsa) Signatures ([Shoup Eurocrypt 2000](https://www.iacr.org/archive/eurocrypt2000/1807/18070209-new.pdf)). 78 79 ### Post-Quantum Cryptography 80 81 | KEM: Key Encapsulation Methods | 82 |:---:| 83 84 - [ML-KEM](./kem/mlkem): modes 512, 768, 1024 ([FIPS-203](https://doi.org/10.6028/NIST.FIPS.203)). 85 - [Kyber KEM](./kem/kyber): modes 512, 768, 1024 ([KYBER](https://pq-crystals.org/kyber/)). 86 - [FrodoKEM](./kem/frodo): modes 640-SHAKE. ([FrodoKEM](https://frodokem.org/)) 87 - [CSIDH](./dh/csidh): Post-Quantum Commutative Group Action ([CSIDH](https://csidh.isogeny.org/)). 88 - (**insecure, deprecated**) ~~[SIDH/SIKE](./kem/sike)~~: Supersingular Key Encapsulation with primes p434, p503, p751 ([SIKE](https://sike.org/)). 89 90 | Digital Signature Schemes | 91 |:---:| 92 93 - [Dilithium](./sign/dilithium): modes 2, 3, 5 ([Dilithium](https://pq-crystals.org/dilithium/)). 94 - [ML-DSA](./sign/mldsa): modes 44, 65, 87 ([FIPS 204](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.204.pdf)). 95 96 ### Zero-knowledge Proofs 97 98 - [Schnorr](./zk/dl): Prove knowledge of the Discrete Logarithm. ([RFC-8235]) 99 - [DLEQ](./zk/dleq): Prove knowledge of the Discrete Logarithm Equality. ([RFC-9497]) 100 - [DLEQ in Qn](./zk/qndleq): Prove knowledge of the Discrete Logarithm Equality for subgroup of squares in (Z/nZ)\*. 101 102 ### Symmetric Cryptography 103 104 | XOF: eXtendable Output Functions | 105 |:---:| 106 107 - [SHAKE128 and SHAKE256](./xof) ([FIPS 202]). 108 - [BLAKE2X](./xof): BLAKE2XB and BLAKE2XS ([Blake2x](https://www.blake2.net/blake2x.pdf)) 109 - [KangarooTwelve](./xof/k12): fast hashing based on Keccak-p. ([KangarooTwelve](https://keccak.team/kangarootwelve.html)). 110 - SIMD [Keccak](https://keccak.team/keccak_specs_summary.html) f1600 Permutation. 111 112 | LWC: Lightweight Cryptography | 113 |:---:| 114 115 - [Ascon v1.2](./cipher/ascon): Family of AEAD block ciphers ([ASCON](https://ascon.iaik.tugraz.at/index.html)) 116 117 ### Misc 118 119 | Integers | 120 |:---:| 121 122 - Safe primes generation. 123 - Integer encoding: wNAF, regular signed digit, mLSBSet representations. 124 125 | Finite Fields | 126 |:---:| 127 128 - Fp25519, Fp448, Fp511, Fp434, Fp503, Fp751. 129 - Fp381, and its quadratic, sextic and twelveth extensions. 130 - Polynomials in monomial and Lagrange basis. 131 132 | Elliptic Curves | 133 |:---:| 134 135 - P-384 Curve 136 - [FourQ](https://eprint.iacr.org/2015/565) 137 - [Goldilocks](https://eprint.iacr.org/2015/625) 138 - [BLS12-381](https://electriccoin.co/blog/new-snark-curve/) 139 140 ## Testing and Benchmarking 141 142 Library comes with number of make targets which can be used for testing and 143 benchmarking: 144 145 - ``test`` performs testing of the binary. 146 - ``bench`` runs benchmarks. 147 - ``cover`` produces coverage. 148 - ``lint`` runs set of linters on the code base. 149 150 ## Contributing 151 152 To contribute, fork this repository and make your changes, and then make a Pull 153 Request. A Pull Request requires approval of the admin team and a successful 154 CI build. 155 156 ## How to Cite 157 158 To cite CIRCL, use one of the following formats and update the version and date you accessed this project. 159 160 APA Style 161 162 ``` 163 Faz-Hernandez, A. and Kwiatkowski, K. (2019). Introducing CIRCL: 164 An Advanced Cryptographic Library. Cloudflare. Available at 165 https://github.com/cloudflare/circl. v1.5.0 Accessed Oct, 2024. 166 ``` 167 168 Bibtex Source 169 170 ```bibtex 171 @manual{circl, 172 title = {Introducing CIRCL: An Advanced Cryptographic Library}, 173 author = {Armando Faz-Hernandez and Kris Kwiatkowski}, 174 organization = {Cloudflare}, 175 abstract = {{CIRCL (Cloudflare Interoperable, Reusable Cryptographic Library) is 176 a collection of cryptographic primitives written in Go. The goal 177 of this library is to be used as a tool for experimental 178 deployment of cryptographic algorithms targeting Post-Quantum (PQ) 179 and Elliptic Curve Cryptography (ECC).}}, 180 note = {Available at \url{https://github.com/cloudflare/circl}. v1.5.0 Accessed Oct, 2024}, 181 month = jun, 182 year = {2019} 183 } 184 ``` 185 186 CFF Style 187 188 See attached [CITATION.cff](CITATION.cff) file. 189 190 ## License 191 192 The project is licensed under the [BSD-3-Clause License](./LICENSE).