CIRCL (Cloudflare Interoperable, Reusable Cryptographic Library) is a collection of cryptographic primitives written in Go. The goal of this library is to be used as a tool for experimental deployment of cryptographic algorithms targeting Post-Quantum (PQ) and Elliptic Curve Cryptography (ECC).
🚨 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.
You can get CIRCL by fetching:
go get -u github.com/cloudflare/circl
Alternatively, look at the Cloudflare Go fork to see how to integrate CIRCL natively in Go.
Diffie-Hellman Protocol |
---|
- X25519 and X448 functions. (RFC-7748)
- Curve4Q function based on FourQ curve. (draft-ladd-cfrg-4q)
Digital Signature Schemes |
---|
Prime Groups |
---|
- P-256, P-384, P-521. (FIPS 186-5)
- Ristretto group. (RFC-9496)
- Bilinear pairings: with the BLS12-381 curve, and hash to G1 and G2.
- Hash to curve, hash to field, XMD and XOF expanders. (RFC-9380)
High-Level Protocols |
---|
- HPKE: Hybrid Public-Key Encryption (RFC-9180)
- VOPRF: Verifiable Oblivious Pseudorandom functions. (RFC-9497)
- RSA Blind Signatures. (RFC-9474)
- Partilly-blind Signatures. (draft-cfrg-partially-blind-rsa)
- CPABE: Ciphertext-Policy Attribute-Based Encryption. (ia.cr/2019/966)
- OT: Simplest Oblivious Transfer (ia.cr/2015/267).
- Threshold RSA Signatures (Shoup Eurocrypt 2000).
KEM: Key Encapsulation Methods |
---|
- CSIDH: Post-Quantum Commutative Group Action (CSIDH).
- Kyber KEM: modes 512, 768, 1024 (KYBER).
- FrodoKEM: modes 640-SHAKE. (FrodoKEM)
- (insecure, deprecated)
SIDH/SIKE: Supersingular Key Encapsulation with primes p434, p503, p751 (SIKE).
Digital Signature Schemes |
---|
- Schnorr: Prove knowledge of the Discrete Logarithm. (RFC-8235)
- DLEQ: Prove knowledge of the Discrete Logarithm Equality. (RFC-9497)
XOF: eXtendable Output Functions |
---|
- SHAKE128 and SHAKE256 (FIPS 202).
- BLAKE2X: BLAKE2XB and BLAKE2XS (Blake2x)
- KangarooTwelve: fast hashing based on Keccak-p. (KangarooTwelve).
- SIMD Keccak f1600 Permutation.
LWC: Lightweight Cryptography |
---|
- Ascon v1.2: Family of AEAD block ciphers (ASCON)
Integers |
---|
- Safe primes generation.
- Integer encoding: wNAF, regular signed digit, mLSBSet representations.
Finite Fields |
---|
- Fp25519, Fp448, Fp511, Fp434, Fp503, Fp751.
- Fp381, and its quadratic, sextic and twelveth extensions.
- Polynomials in monomial and Lagrange basis.
Elliptic Curves |
---|
- P-384 Curve
- FourQ
- Goldilocks
- BLS12-381
Library comes with number of make targets which can be used for testing and benchmarking:
test
performs testing of the binary.bench
runs benchmarks.cover
produces coverage.lint
runs set of linters on the code base.
To contribute, fork this repository and make your changes, and then make a Pull Request. A Pull Request requires approval of the admin team and a successful CI build.
To cite CIRCL, use one of the following formats and update the version and date you accessed this project.
APA Style
Faz-Hernández, A. and Kwiatkowski, K. (2019). Introducing CIRCL:
An Advanced Cryptographic Library. Cloudflare. Available at
https://github.com/cloudflare/circl. v1.3.6 Accessed Oct, 2023.
Bibtex Source
@manual{circl,
title = {Introducing CIRCL: An Advanced Cryptographic Library},
author = {Armando Faz-Hern\'{a}ndez and Kris Kwiatkowski},
organization = {Cloudflare},
abstract = {{CIRCL (Cloudflare Interoperable, Reusable Cryptographic Library) is
a collection of cryptographic primitives written in Go. The goal
of this library is to be used as a tool for experimental
deployment of cryptographic algorithms targeting Post-Quantum (PQ)
and Elliptic Curve Cryptography (ECC).}},
note = {Available at \url{https://github.com/cloudflare/circl}. v1.3.6 Accessed Oct, 2023},
month = jun,
year = {2019}
}
CFF Style
See attached CITATION.cff file.
The project is licensed under the BSD-3-Clause License.