Skip to content

Commit 4eb06c2

Browse files
armfazhbwesterb
authored andcommitted
Fix CIRCL integration and dependencies. (#115)
* circl: adding CIRCL v1.2.0 Updated the ./cf-copy-from-circle.py script to fetch from main branch. Included CIRCL's dependencies as vendored packages. * crypto/tls: updates testing of PQ certificates Certificates were hardcoded, now the PQ certificate is created as part of the test script.
1 parent 8e8e677 commit 4eb06c2

File tree

437 files changed

+36236
-15592
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+36236
-15592
lines changed

cf-copy-from-circle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
base = os.path.dirname(os.path.abspath(sys.argv[0]))
99

1010
REPO = 'https://github.com/cloudflare/circl'
11-
BRANCH = 'master'
11+
BRANCH = 'main'
1212

1313
circl = os.path.join(base, 'src/circl')
1414

@@ -52,6 +52,8 @@
5252
print("Removing misc cruft ...")
5353
subprocess.check_call(['rm', '-r', '-f',
5454
os.path.join(circl, '.git'),
55+
os.path.join(circl, '.github'),
56+
os.path.join(circl, 'CITATION.cff'),
5557
os.path.join(circl, 'go.mod'),
5658
os.path.join(circl, 'go.sum'),
5759
os.path.join(circl, '.etc'),

src/circl/.github/workflows/ci-actions.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/circl/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/circl/README.md

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
# CIRCL
44

5+
[![GitHub release](https://img.shields.io/github/release/cloudflare/circl.svg)](https://GitHub.com/cloudflare/circl/releases/)
56
[![CIRCL](https://circl/workflows/CIRCL/badge.svg)](https://circl/actions)
67
[![GoDoc](https://godoc.org/circl?status.svg)](https://pkg.go.dev/circl?tab=overview)
78
[![Go Report Card](https://goreportcard.com/badge/circl)](https://goreportcard.com/report/circl)
8-
[![codecov](https://codecov.io/gh/cloudflare/circl/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudflare/circl)
9+
[![codecov](https://codecov.io/gh/cloudflare/circl/branch/main/graph/badge.svg)](https://codecov.io/gh/cloudflare/circl)
910

1011
**CIRCL** (Cloudflare Interoperable, Reusable Cryptographic Library) is a collection
1112
of cryptographic primitives written in Go. The goal of this library is to be used as a tool for
@@ -14,44 +15,63 @@ Curve Cryptography (ECC).
1415

1516
## Security Disclaimer
1617

17-
🚨 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.
18+
🚨 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](https://circl/security/policy).
1819

1920
## Installation
2021

21-
You can get it by typing:
22+
You can get CIRCL by fetching:
2223

2324
```sh
2425
go get -u circl
2526
```
2627

27-
## Versioning
28+
## List of Algorithms
2829

29-
Version numbers are [Semvers](https://semver.org/). We release a minor version for new functionality, a major version for breaking API changes, and increment the patchlevel for bugfixes.
30+
#### Diffie-Hellman Protocol
31+
- [X25519](https://datatracker.ietf.org/doc/html/rfc7748/)
32+
- [X448](https://datatracker.ietf.org/doc/html/rfc7748/)
33+
- [Curve4Q](https://datatracker.ietf.org/doc/draft-ladd-cfrg-4q/)
3034

31-
## Implemented Primitives
35+
#### Digital Signature Schemes
36+
- [Ed25519](https://datatracker.ietf.org/doc/rfc8032/)
37+
- [Ed448](https://datatracker.ietf.org/doc/rfc8032/)
3238

33-
| Category | Algorithms | Description | Applications |
34-
|-----------|------------|-------------|--------------|
35-
| PQ Key Exchange | SIDH | SIDH provide key exchange mechanisms using ephemeral keys. | Post-quantum key exchange in TLS |
36-
| PQ Key Exchange | cSIDH | Isogeny based drop-in replacement for Diffie–Hellman | Post-Quantum Key exchange. |
37-
| PQ KEM | SIKE | SIKE is a key encapsulation mechanism (KEM). | Post-quantum key exchange in TLS |
38-
| Key Exchange | X25519, X448 | RFC-7748 provides new key exchange mechanisms based on Montgomery elliptic curves. | TLS 1.3. Secure Shell. |
39-
| Key Exchange | FourQ | One of the fastest elliptic curves at 128-bit security level. | Experimental for key agreement and digital signatures. |
40-
| Key Exchange / Digital signatures | P-384 | Our optimizations reduce the burden when moving from P-256 to P-384. | ECDSA and ECDH using Suite B at top secret level. |
41-
| Digital Signatures | Ed25519, Ed448 | RFC-8032 provides new signature schemes based on Edwards curves. | Digital certificates and authentication. |
42-
| Key Encapsulation | P-256, P-384, P-521, X25519 and X448 | Key encapsulation methods based on Diffie-Hellman. | HPKE |
43-
| Hybrid Public-Key Encryption | Base, Auth, PSK, AuthPSK | [HPKE](https://www.ietf.org/archive/id/draft-irtf-cfrg-hpke-07.html) is a combination of KEM and AEAD. | TLS |
44-
| PQ KEM/PKE | Kyber | Lattice (M-LWE) based IND-CCA2 secure key encapsulation mechanism and IND-CPA secure public key encryption | Post-Quantum Key exchange |
45-
| PQ Digital Signatures | Dilithium, Hybrid modes | Lattice (Module LWE) based signature scheme | Post-Quantum PKI |
39+
#### Groups based on Elliptic Curves
40+
- P-256, P-384, P-521, [FIPS 186-4](https://doi.org/10.6028/NIST.FIPS.186-4)
41+
- [Ristretto](https://datatracker.ietf.org/doc/draft-irtf-cfrg-ristretto255-decaf448/01/)
42+
- [Hash to Curve](https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve/)
4643

47-
### Work in Progress
44+
#### High-Level Protocols
45+
- Bilinear pairings with [BLS12-381](https://electriccoin.co/blog/new-snark-curve/).
46+
- [HPKE](https://datatracker.ietf.org/doc/draft-irtf-cfrg-hpke/): Hybrid Public-Key Encryption
47+
- [VOPRF](https://datatracker.ietf.org/doc/draft-irtf-cfrg-voprf/): Verifiable Oblivious Pseudorandom function.
4848

49-
| Category | Algorithms | Description | Applications |
50-
|----------|------------|-------------|--------------|
51-
| Hashing to Elliptic Curve Groups | Several algorithms: Elligator2, Ristretto, SWU, Icart. | Protocols based on elliptic curves require hash functions that map bit strings to points on an elliptic curve. | VOPRF. OPAQUE. PAKE. Verifiable random functions. |
52-
| Bilinear Pairings | Plans for moving BN256 to stronger pairing curves. | A bilineal pairing is a mathematical operation that enables the implementation of advanced cryptographic protocols, such as identity-based encryption (IBE), short digital signatures (BLS), and attribute-based encryption (ABE). | Geo Key Manager, Randomness Beacon, Ethereum and other blockchain applications. |
53-
| PQ KEM | HRSS-SXY | Lattice (NTRU) based key encapsulation mechanism. | Key exchange for low-latency environments |
54-
| PQ Digital Signatures | SPHINCS+ | Stateless hash-based signature scheme | Post-Quantum PKI |
49+
#### Post-Quantum Key Encapsulation Methods
50+
- [SIDH/SIKE](https://sike.org/): Supersingular Key Encapsulation with primes p434, p503, p751
51+
- [CSIDH](https://csidh.isogeny.org/): Post-Quantum Commutative Group Action
52+
- [Kyber](https://pq-crystals.org/kyber/) KEM: modes 512, 768, 1024
53+
- [FrodoKEM](https://frodokem.org/) KEM: modes 640-SHAKE
54+
55+
#### Post-Quantum Public-Key Encryption
56+
- [Kyber](https://pq-crystals.org/kyber/) PKE: modes 512, 768, 1024
57+
58+
#### Post-Quantum Digital Signature Schemes
59+
- [Dilithium](https://pq-crystals.org/dilithium/): modes 2, 3, 5
60+
61+
#### Field Arithmetic
62+
- Fp25519, Fp448, Fp381
63+
64+
#### Elliptic Curves
65+
- P-384 Curve
66+
- [FourQ](https://eprint.iacr.org/2015/565)
67+
- [Goldilocks](https://eprint.iacr.org/2015/625)
68+
69+
#### Parallel SIMD
70+
- [Keccak](https://keccak.team/keccak_specs_summary.html) f1600 Permutation
71+
72+
#### XOF: eXtendable Output Functions
73+
- [FIPS 202](https://doi.org/10.6028/NIST.FIPS.202): SHAKE128 and SHAKE256
74+
- [BLAKE2X](https://www.blake2.net/blake2x.pdf): BLAKE2XB and BLAKE2XS
5575

5676
## Testing and Benchmarking
5777

@@ -69,17 +89,16 @@ To contribute, fork this repository and make your changes, and then make a Pull
6989
Request. A Pull Request requires approval of the admin team and a successful
7090
CI build.
7191

72-
## How to Cite
92+
## How to Cite
7393

74-
To cite CIRCL, use one of the following formats and update with the date
75-
you accessed this project.
94+
To cite CIRCL, use one of the following formats and update the version and date you accessed this project.
7695

7796
APA Style
7897

7998
```
80-
Faz-Hernández, A. and Kwiatkowski, K. (2019). Introducing CIRCL:
81-
An Advanced Cryptographic Library. Cloudflare. Available at
82-
https://circl. Accessed Feb 2021.
99+
Faz-Hernández, A. and Kwiatkowski, K. (2019). Introducing CIRCL:
100+
An Advanced Cryptographic Library. Cloudflare. Available at
101+
https://circl. v1.2.0 Accessed Jun 2022.
83102
```
84103

85104
Bibtex Source
@@ -90,16 +109,20 @@ Bibtex Source
90109
author = {Armando Faz-Hern\'{a}ndez and Kris Kwiatkowski},
91110
organization = {Cloudflare},
92111
abstract = {{CIRCL (Cloudflare Interoperable, Reusable Cryptographic Library) is
93-
a collection of cryptographic primitives written in Go. The goal
94-
of this library is to be used as a tool for experimental
112+
a collection of cryptographic primitives written in Go. The goal
113+
of this library is to be used as a tool for experimental
95114
deployment of cryptographic algorithms targeting Post-Quantum (PQ)
96115
and Elliptic Curve Cryptography (ECC).}},
97-
note = {Available at \url{https://circl}. Accessed Feb 2021},
116+
note = {Available at \url{https://circl}. v1.2.0 Accessed Jun 2022},
98117
month = jun,
99118
year = {2019}
100119
}
101120
```
102121

122+
CFF Style
123+
124+
See attached [CITATION.cff](CITATION.cff) file.
125+
103126
## License
104127

105128
The project is licensed under the [BSD-3-Clause License](./LICENSE).

0 commit comments

Comments
 (0)