MCPcopy Index your code
hub / github.com/cloudflare/circl

github.com/cloudflare/circl @v1.6.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.6.4 ↗ · + Follow
5,702 symbols 22,726 edges 600 files 2,356 documented · 41% 219 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CIRCL

GitHub release CIRCL GoDoc Go Report Card 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.

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.

Extension points exported contracts — how you extend this code

UnmarshalingValue (Interface)
A UnmarshalingValue decodes itself from a cryptobyte.String and advances the pointer. It reports whether the read was su [7 …
internal/conv/conv.go
PublicKey (Interface)
A public key is used to verify a signature set by the corresponding private key. [36 implementers]
sign/sign.go
CertificateScheme (Interface)
Additional methods when the signature scheme is supported in X509. [7 implementers]
pki/pki.go
PublicKey (Interface)
A KEM public key [36 implementers]
kem/kem.go
Prio3 (Interface)
(no doc) [5 implementers]
vdaf/prio3/prio3_test.go
Expr (Interface)
(no doc) [4 implementers]
abe/cpabe/tkn20/internal/dsl/expr.go
ShakeHash (Interface)
ShakeHash defines the interface to hash functions that support arbitrary-length output. [2 implementers]
internal/sha3/shake.go
Element (Interface)
Element represents an element of a prime-order group. [2 implementers]
group/group.go

Core symbols most depended-on inside this repo

ReportError
called by 433
internal/test/test.go
Equal
called by 355
kem/kem.go
CheckNoErr
called by 309
internal/test/test.go
Mul
called by 309
group/group.go
Add
called by 272
group/group.go
Read
called by 266
xof/k12/k12.go
New
called by 221
xof/xof.go
Write
called by 217
sign/slhdsa/message.go

Shape

Method 2,753
Function 2,383
Struct 384
TypeAlias 126
Interface 44
FuncType 12

Languages

Go100%

Modules by API surface

sign/slhdsa/state.go58 symbols
group/short.go58 symbols
group/ristretto255.go50 symbols
vdaf/prio3/arith/arith.go44 symbols
group/group.go42 symbols
vdaf/prio3/internal/prio3/prio3.go40 symbols
sign/mldsa/mldsa87/dilithium.go40 symbols
sign/mldsa/mldsa65/dilithium.go40 symbols
sign/mldsa/mldsa44/dilithium.go40 symbols
sign/dilithium/mode5/dilithium.go37 symbols
sign/dilithium/mode3/dilithium.go37 symbols
sign/dilithium/mode2/dilithium.go37 symbols

For agents

$ claude mcp add circl \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact