Categorygithub.com/cloudflare/circl
modulepackage
1.6.0
Repository: https://github.com/cloudflare/circl.git
Documentation: pkg.go.dev

# 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.0 Accessed Jan, 2025.

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.0 Accessed Jan, 2025},
  month        = jun,
  year         = {2019}
}

CFF Style

See attached CITATION.cff file.

License

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

# Packages

Package abe provides Attribute-based data encryption algorithms.
Package blindsign provides blind signature schemes.
Package cipher provides data encryption algorithms.
Package dh provides variety of Diffie-Hellman key exchange methods.
Package ecc provides implementation of arithmetic on some elliptic curves.
Package expander generates arbitrary bytes from an XOF or Hash function.
Package group provides prime-order groups based on elliptic curves.
Package hpke implements the Hybrid Public Key Encryption (HPKE) standard specified by draft-irtf-cfrg-hpke-07.
Package kem provides a unified interface for KEM schemes.
Package math provides some utility functions for big integers.
Package oprf provides Verifiable, Oblivious Pseudo-Random Functions.
Package ot provides oblivious-transfer protocols.
Package pke provides a variety of public key encryption mechanisms.
Package secretsharing provides methods to split secrets into shares.
Package sign provides unified interfaces for signature schemes.
Package simd provides parallel implementations of some primitives.
Package tss provides threshold signature schemes.
Package vdaf provides verifiable distributed aggregation functions.
Package xof provides an interface for eXtendable-Output Functions.
Package zk provides primitives for zero-knowledge proofs of knowledge.