circl

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library

https://github.com/cloudflare/circl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 26 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    1 of 27 committers (3.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary

Keywords

circl cryptography csidh dilithium ed25519 ed448 elliptic-curves go golang hpke kyber pki post-quantum sidh

Keywords from Contributors

interactive ecdsa zero-knowledge zkattest graph-computing charts mesh interpretability sequences generic
Last synced: 6 months ago · JSON representation ·

Repository

CIRCL: Cloudflare Interoperable Reusable Cryptographic Library

Basic Info
Statistics
  • Stars: 1,496
  • Watchers: 42
  • Forks: 174
  • Open Issues: 57
  • Releases: 15
Topics
circl cryptography csidh dilithium ed25519 ed448 elliptic-curves go golang hpke kyber pki post-quantum sidh
Created over 7 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

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:

sh 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.1 Accessed Apr, 2025.

BibTeX Source

bibtex @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.1 Accessed Apr, 2025}, month = jun, year = {2019} }

CFF Style

See attached CITATION.cff file.

License

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

Owner

  • Name: Cloudflare
  • Login: cloudflare
  • Kind: organization
  • Location: San Francisco, London, Austin, Lisbon, Singapore

Citation (CITATION.cff)

---
cff-version: 1.2.0
version: 1.6.1
title: "Introducing CIRCL: An Advanced Cryptographic Library"
license: BSD-3-Clause
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).
authors:
  - family-names: Faz-Hernandez
    given-names: Armando
    affiliation: Cloudflare, Inc.
    orcid: "https://orcid.org/0000-0001-5502-8666"
  - family-names: Kwiatkowski
    given-names: Kris
    orcid: "https://orcid.org/0000-0003-2363-317X"
date-released: "2019-07-10"
keywords:
  - cryptography
  - crypto
  - post-quantum
  - golang
repository-code: "https://github.com/cloudflare/circl/"
type: software
message: "Available at https://github.com/cloudflare/circl. v1.6.1 Accessed Apr, 2025."
contact:
  - name: "Cloudflare, Inc."

GitHub Events

Total
  • Create event: 9
  • Release event: 2
  • Issues event: 27
  • Watch event: 187
  • Delete event: 7
  • Issue comment event: 54
  • Push event: 40
  • Pull request review event: 131
  • Pull request review comment event: 116
  • Pull request event: 48
  • Fork event: 35
Last Year
  • Create event: 9
  • Release event: 2
  • Issues event: 27
  • Watch event: 187
  • Delete event: 7
  • Issue comment event: 54
  • Push event: 40
  • Pull request review event: 131
  • Pull request review comment event: 116
  • Pull request event: 48
  • Fork event: 35

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 658
  • Total Committers: 27
  • Avg Commits per committer: 24.37
  • Development Distribution Score (DDS): 0.485
Past Year
  • Commits: 57
  • Committers: 5
  • Avg Commits per committer: 11.4
  • Development Distribution Score (DDS): 0.228
Top Committers
Name Email Commits
armfazh a****h@c****m 339
Bas Westerbaan b****s@w****e 95
Kris Kwiatkowski k****s@c****m 67
Christopher Wood c****w@h****t 32
Josh Soref 2****f 31
xvzcf x****f 15
Watson Ladd w****n@c****m 13
Sofía Celi c****9@g****m 11
Michael McLoughlin m****n@g****m 10
John Bampton j****n 8
Christopher Patton c****n@g****m 7
Peter Wu p****u@c****m 5
Tom Thorogood m****b@t****k 5
Tanya Verma t****a@c****m 4
zhdllwyc y****w@u****u 3
Hrushikesh Deshpande 1****e 2
dependabot[bot] 4****] 1
Nadim Kobeissi n****m@s****e 1
Monis Khan i@m****p 1
MingLLuo s****9@1****m 1
Mik Kocikowski m****k@c****m 1
Matt Clarkson m****n@g****m 1
Ko- K****- 1
Josh Brown j****1@g****m 1
Douglas Daniels d****s@g****m 1
Daniel d****n 1
Baoshuo Ren i@b****n 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 66
  • Total pull requests: 170
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 44
  • Total pull request authors: 27
  • Average comments per issue: 2.24
  • Average comments per pull request: 1.11
  • Merged pull requests: 132
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 20
  • Pull requests: 46
  • Average time to close issues: 24 days
  • Average time to close pull requests: 15 days
  • Issue authors: 17
  • Pull request authors: 9
  • Average comments per issue: 1.35
  • Average comments per pull request: 0.63
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • armfazh (5)
  • bwesterb (4)
  • chris-wood (3)
  • kriskwiatkowski (3)
  • UladzimirTrehubenka (3)
  • david415 (3)
  • 3052 (2)
  • krissully (2)
  • udf2457 (2)
  • JensAc (1)
  • alenhorvat (1)
  • ravinderncog (1)
  • mvd-ows (1)
  • pmcampones (1)
  • y12studio (1)
Pull Request Authors
  • armfazh (99)
  • bwesterb (39)
  • chris-wood (9)
  • Lekensteyn (9)
  • zhdllwyc (7)
  • elementrics (5)
  • tanyav2 (5)
  • tmthrgd (4)
  • ilway25 (2)
  • dependabot[bot] (2)
  • hrushikeshdeshpande (2)
  • mattyclarkson (2)
  • emersion (2)
  • LINCKODE (2)
  • MingLLuo (2)
Top Labels
Issue Labels
question (8) bug (6) help wanted (4) good first issue (4) needs investigation (4) new feature (2) tests (2) invalid (1) enhancement (1) cosmetic (1) on-hold (1) documentation (1) maintenance (1)
Pull Request Labels
new feature (29) maintenance (19) fix-A-bug (14) enhancement (12) cosmetic (11) changesAPI (10) tests (5) documentation (4) on-hold (3) dependencies (2) bug (2) deprecated (1)

Packages

  • Total packages: 17
  • Total downloads: unknown
  • Total docker downloads: 6,747,227,080
  • Total dependent packages: 6,861
    (may contain duplicates)
  • Total dependent repositories: 2,787
    (may contain duplicates)
  • Total versions: 100
  • Total advisories: 4
proxy.golang.org: github.com/cloudflare/circl

Package circl provides a collection of cryptographic primitives. The goal of this module is to be used as a tool for experimental deployment of cryptographic algorithms targeting Post-Quantum (PQ) and Elliptic Curve Cryptography (ECC). Following blog post describes ideas behind CIRCL in more details: https://blog.cloudflare.com/introducing-circl/

  • Versions: 17
  • Dependent Packages: 6,861
  • Dependent Repositories: 2,787
  • Docker Downloads: 6,747,227,080
Rankings
Dependent packages count: 0.1%
Docker downloads count: 0.1%
Dependent repos count: 0.2%
Average: 1.0%
Stargazers count: 2.1%
Forks count: 2.6%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/internal/sha3

Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. Both types of hash function use the "sponge" construction and the Keccak permutation. For a detailed specification see http://keccak.noekeon.org/ If you aren't sure what function you need, use SHAKE256 with at least 64 bytes of output. The SHAKE instances are faster than the SHA3 instances; the latter have to allocate memory to conform to the hash.Hash interface. If you need a secret-key MAC (message authentication code), prepend the secret key to the input, hash with SHAKE256 and read at least 32 bytes of output. The SHA3-x (x equals 224, 256, 384, or 512) functions have a security strength against preimage attacks of x bits. Since they only produce "x" bits of output, their collision-resistance is only "x/2" bits. The SHAKE-256 and -128 functions have a generic security strength of 256 and 128 bits against all attacks, provided that at least 2x bits of their output is used. Requesting more than 64 or 32 bytes of output, respectively, does not increase the collision-resistance of the SHAKE functions. A sponge builds a pseudo-random function from a public pseudo-random permutation, by applying the permutation to a state of "rate + capacity" bytes, but hiding "capacity" of the bytes. A sponge starts out with a zero state. To hash an input using a sponge, up to "rate" bytes of the input are XORed into the sponge's state. The sponge is then "full" and the permutation is applied to "empty" it. This process is repeated until all the input has been "absorbed". The input is then padded. The digest is "squeezed" from the sponge in the same way, except that output is copied out instead of input being XORed in. A sponge is parameterized by its generic security strength, which is equal to half its capacity; capacity + rate is equal to the permutation's width. Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means that the security strength of a sponge instance is equal to (1600 - bitrate) / 2. The SHAKE functions are recommended for most new uses. They can produce output of arbitrary length. SHAKE256, with an output length of at least 64 bytes, provides 256-bit security against all attacks. The Keccak team recommends it for most applications upgrading from SHA2-512. (NIST chose a much stronger, but much slower, sponge instance for SHA3-512.) The SHA-3 functions are "drop-in" replacements for the SHA-2 functions. They produce output of the same length, with the same security strengths against all attacks. This means, in particular, that SHA3-256 only has 128-bit collision resistance, because its output length is 32 bytes.

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 7 months ago
proxy.golang.org: github.com/cloudflare/circl/sign/ed448

Package ed448 implements Ed448 signature scheme as described in RFC-8032. This package implements two signature variants. Specific functions for sign and verify are defined. A generic signing function for all schemes is available through the crypto.Signer interface, which is implemented by the PrivateKey type. A correspond all-in-one verification method is provided by the VerifyAny function. Both schemes require a context string for domain separation. This parameter is passed using a SignerOptions struct defined in this package. References:

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/sign

Package sign provides unified interfaces for signature schemes. A register of schemes is available in the package

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/dh/x448

Package x448 provides Diffie-Hellman functions as specified in RFC-7748. Validation of public keys. The Diffie-Hellman function, as described in RFC-7748 [1], works for any public key. However, if a different protocol requires contributory behaviour [2,3], then the public keys must be validated against low-order points [3,4]. To do that, the Shared function performs this validation internally and returns false when the public key is invalid (i.e., it is a low-order point). References:

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 7 months ago
proxy.golang.org: github.com/cloudflare/circl/dh/x25519

Package x25519 provides Diffie-Hellman functions as specified in RFC-7748. Validation of public keys. The Diffie-Hellman function, as described in RFC-7748 [1], works for any public key. However, if a different protocol requires contributory behaviour [2,3], then the public keys must be validated against low-order points [3,4]. To do that, the Shared function performs this validation internally and returns false when the public key is invalid (i.e., it is a low-order point). References:

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/ecc/goldilocks

Package goldilocks provides elliptic curve operations over the goldilocks curve.

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/math

Package math provides some utility functions for big integers.

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 7 months ago
proxy.golang.org: github.com/cloudflare/circl/math/mlsbset

Package mlsbset provides a constant-time exponentiation method with precomputation. References: "Efficient and secure algorithms for GLV-based scalar multiplication and their implementation on GLV–GLS curves" by (Faz-Hernandez et al.)

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 7 months ago
proxy.golang.org: github.com/cloudflare/circl/math/fp448

Package fp448 provides prime field arithmetic over GF(2^448-2^224-1).

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/sign/ed25519

Package ed25519 implements Ed25519 signature scheme as described in RFC-8032. This package provides optimized implementations of the three signature variants and maintaining closer compatibility with crypto/ed25519. Specific functions for sign and verify are defined. A generic signing function for all schemes is available through the crypto.Signer interface, which is implemented by the PrivateKey type. A correspond all-in-one verification method is provided by the VerifyAny function. Signing with Ed25519Ph or Ed25519Ctx requires a context string for domain separation. This parameter is passed using a SignerOptions struct defined in this package. While Ed25519Ph accepts an empty context, Ed25519Ctx enforces non-empty context strings. These functions are compatible with the “Ed25519” function defined in RFC-8032. However, unlike RFC 8032's formulation, this package's private key representation includes a public key suffix to make multiple signing operations with the same key more efficient. This package refers to the RFC-8032 private key as the “seed”. References

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/internal/conv
  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.9%
Forks count: 2.3%
Average: 4.1%
Dependent packages count: 5.9%
Dependent repos count: 6.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/pke/kyber/internal/common/asm

AVX2 optimized version of polynomial operations. See the comments on the generic implementation for the details of the maths involved.

  • Versions: 20
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.4%
Forks count: 1.7%
Average: 4.9%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 7 months ago
proxy.golang.org: github.com/cloudflare/circl/simd/keccakf1600/internal/asm
  • Versions: 25
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.4%
Forks count: 1.7%
Average: 4.9%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/sign/dilithium/internal/common/asm

AVX2 optimized version of Poly.[Inv]NTT(). See the comments on the generic implementation for details on the maths involved.

  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 1.4%
Forks count: 1.7%
Average: 4.9%
Dependent packages count: 7.0%
Dependent repos count: 9.3%
Last synced: 6 months ago
proxy.golang.org: github.com/Cloudflare/circl
  • Versions: 17
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.3%
Average: 5.4%
Dependent repos count: 5.6%
Last synced: 6 months ago
proxy.golang.org: github.com/cloudflare/circl/sign/internal/dilithium/asm

AVX2 optimized version of Poly.[Inv]NTT(). See the comments on the generic implementation for details on the maths involved.

  • Versions: 0
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.0%
Average: 6.3%
Dependent repos count: 6.5%
Last synced: 6 months ago

Dependencies

.github/workflows/ci-actions.yml actions
  • actions/checkout v3 composite
  • actions/setup-go v3 composite
  • codecov/codecov-action v2 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/init v2 composite
  • golangci/golangci-lint-action v3 composite