CIRCL: Cloudflare Interoperable Reusable Cryptographic Library http://blog.cloudflare.com/introducing-circl
  • Go 82.7%
  • Assembly 15.7%
  • C 1.5%
Find a file
History 2026-11-02 17:31:43 -08:00
.etc Updates golangci-lint to v1.61.0 and fixes code. 2024-10-08 09:12:35 -07:00
.github/workflows sign/bls: reject uncompressed point encodings (#701) 2026-09-09 13:43:40 +02:00
abe Check for policy exhaustion when parsing ABE policies 2026-09-23 07:51:25 -07:00
blindsign blindrsa/partiallyblindrsa: test that Blind uses the supplied reader 2026-11-02 17:31:43 -08:00
cipher ascon: don't output plaintext if authentication fails (#631) 2026-07-14 17:23:35 +02:00
dh dh/csidh: harden key imports (#689) 2026-07-31 22:55:18 +02:00
ecc ecc/goldilocks: reject trailing data when decoding a point (#707) 2026-10-24 00:52:23 +02:00
expander expander: panic if requested output length overflows DST. (#664) 2026-07-18 18:12:04 +02:00
group group: don't modify the argument of SetBigInt (#710) 2026-10-26 14:51:32 +01:00
hpke hpke: set the scheme on hybrid KEM keys 2026-11-02 15:27:49 -08:00
internal internal/test: unify ACVP test vector parsing. (#667) 2026-07-25 19:46:54 +02:00
kem kem/schemes: run Wycheproof ML-KEM test vectors 2026-11-02 17:31:19 -08:00
math mlsbset: fix stray index in Encode comment (#658) 2026-07-15 18:16:33 +02:00
oprf oprf: reject input and info that overflow the length prefix (#694) 2026-09-28 18:51:37 +02:00
ot ot/simot: make sender sessions one-shot (#679) 2026-07-31 22:56:05 +02:00
pke Bump x/crypto and golangci-lint (#637) 2026-07-14 19:24:50 +02:00
pki pki: return an error for schemes without an object identifier (#700) 2026-09-07 14:39:56 +02:00
secretsharing Add more explicit constant time warnings (#638) 2026-07-15 16:49:08 +02:00
sign sign/ed25519: reject contexts longer than 255 bytes when verifying 2026-11-02 15:10:49 -08:00
simd Excluding unsafe calls for SHA3 code. 2025-10-27 11:57:21 -07:00
tss tss/rsa: validate sign share protocol parameters (#674) 2026-08-04 00:05:03 +02:00
vdaf vdaf/prio3: reject degenerate parameters (#685) 2026-08-05 18:28:26 +02:00
xof spelling: absorbed 2023-09-06 16:38:25 -07:00
zk zk/dleq: validate batch shape (#684) 2026-07-31 22:55:53 +02:00
.golangci.yaml Bump x/crypto and golangci-lint (#637) 2026-07-14 19:24:50 +02:00
.semgrepignore Adding semgrepignore to also analyse test files. 2024-10-08 09:12:35 -07:00
AGENTS.md Add AGENTS.md and REVIEW.md for AI agent and human reviewer guidance 2026-06-04 09:16:15 -06:00
CITATION.cff Release CIRCL v1.6.4 2026-06-19 09:00:30 -04:00
codecov.yml add codecov.io to ci and readme badge 2020-03-03 10:58:40 -08:00
doc.go Fix small typo (from armfazh) 2019-09-12 10:12:54 +01:00
go.mod ristretto: reject non-canonical scalars (#650) 2026-07-15 16:44:39 +02:00
go.sum ristretto: reject non-canonical scalars (#650) 2026-07-15 16:44:39 +02:00
LICENSE Set year to the original date. 2020-07-14 13:51:37 -07:00
Makefile Add ML-DSA (FIPS204) (#480) 2024-10-08 20:07:09 -07:00
README.md README: Remove Go Report Card badge (#690) 2026-08-06 17:18:22 +02:00
REVIEW.md Add AGENTS.md and REVIEW.md for AI agent and human reviewer guidance 2026-06-04 09:16:15 -06:00

CIRCL

GitHub release CIRCL GoDoc codecov

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).

Security Disclaimer

🚨 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.

Constant-Time Caveats

⚠️ Not every package in CIRCL is constant time. The following packages document, at the top of their doc.go or main source file, the specific operations that are known to leak timing information: group/, oprf/, blindsign/blindrsa/partiallyblindrsa/, secretsharing/, tss/rsa/, zk/dl/, zk/dleq/, and ecc/p384/.

Installation

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.

List of Algorithms

Elliptic Curve Cryptography

Diffie-Hellman Protocol
Digital Signature Schemes
Prime Groups
High-Level Protocols

Post-Quantum Cryptography

KEM: Key Encapsulation Methods
Digital Signature Schemes

Zero-knowledge Proofs

  • Schnorr: Prove knowledge of the Discrete Logarithm. (RFC-8235)
  • DLEQ: Prove knowledge of the Discrete Logarithm Equality. (RFC-9497)
  • DLEQ in Qn: Prove knowledge of the Discrete Logarithm Equality for subgroup of squares in (Z/nZ)*.

Symmetric Cryptography

XOF: eXtendable Output Functions
LWC: Lightweight Cryptography

Misc

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

Testing and Benchmarking

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.

Contributing

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.

How to Cite

To cite CIRCL, use one of the following formats and update the version and date you accessed this project.

APA Style

Faz-Hernandez, A. and Kwiatkowski, K. (2019). Introducing CIRCL:
An Advanced Cryptographic Library. Cloudflare. Available at
https://github.com/cloudflare/circl. v1.6.4 Accessed Jun, 2026.

BibTeX Source

@manual{circl,
  title        = {Introducing CIRCL: An Advanced Cryptographic Library},
  author       = {Armando Faz-Hernandez 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.6.4 Accessed Jun, 2026},
  month        = jun,
  year         = {2019}
}

CFF Style

See attached CITATION.cff file.

License

The project is licensed under the BSD-3-Clause License.