-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into use_circl_sign_interfaces
- Loading branch information
Showing
11 changed files
with
168 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This workflow will build a golang project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | ||
|
||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.20' | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,91 @@ | ||
|
||
|
||
# HPQC | ||
|
||
## hybrid post quantum cryptography | ||
HPQC is known as hpqc. | ||
|
||
|
||
[](https://pkg.go.dev/github.com/katzenpost/hpqc) | ||
[](https://github.com/katzenpost/hpqc/tags) | ||
[](https://goreportcard.com/report/github.com/katzenpost/hpqc) | ||
[](https://github.com/katzenpost/hpqc/actions/workflows/go.yml) | ||
|
||
|
||
we have but two simple goals at the moment: | ||
|
||
1. silo ALL of the katzenpost cryptography into this one library so that it's easier to audit, | ||
easier to reason about. This will help us standardize our approach to solving cryptographic problems | ||
across multiple protocols. | ||
2. Provide a very niche cryptography library that other golang software projects can use if they | ||
want hybrid constructions consisting of classical and post quantum cryptographic primitives. | ||
## hybrid post quantum cryptography | ||
|
||
Hybrid cryptographic constructions rely on a classical public key | ||
primitive and a post quantum public key cryptographic primitive, namely: | ||
|
||
* hybrid KEMs | ||
* hybrid NIKEs | ||
* hybrid signature schemes | ||
|
||
This entire cryptography library is rendered in serviced to the | ||
above post quantum trifecta of cryptographic primitives. | ||
However, our main contributions are the following: | ||
|
||
1. a set of generic NIKE interfaces for NIKE scheme, public key and private key types | ||
2. generic hybrid NIKE, combines any two NIKEs into one | ||
3. secure KEM combiner that can combine an arbtrary number of KEMs into one KEM | ||
4. a "NIKE to KEM adapter" which uses an ad hoc hashed elgamal construction | ||
5. cgo bindings for the Sphincs+ C reference source | ||
6. cgo bindings for the CTIDH C source | ||
7. generic hybrid signature scheme, combines any two signature schemes into one | ||
|
||
All that having been said, we get our cryptographic primitives mostly from other cryptography | ||
projects such as circl, highctidh, katzenpost, various golang cryptography libraries on github etc. | ||
|
||
If you want a well known hybrid KEM that has a paper about it then maybe | ||
Xwing is the KEM you are looking for. Otherwise you can construct your own | ||
using our secure KEM combiner and or NIKE to KEM adapter. | ||
|
||
Our secure KEM combiner is based on the Split PRF KEM combiner from this paper: | ||
|
||
`Secure KEM Combiner` https://eprint.iacr.org/2018/024.pdf | ||
|
||
|
||
| NIKE: Non-Interactive Key Exchange | | ||
|:---:| | ||
* X25519 | ||
* CTIDH511, CTIDH512, CTIDH1024, CTIDH2048 | ||
* X25519_CTIDH511, X25519_CTIDH512, X25519_CTIDH1024, X25519_CTIDH2048 | ||
* NOBS_CSIDH-512 | ||
* X25519_NOBS_CSIDH-512 | ||
|
||
| KEM: Key Encapsulation Methods | | ||
|:---:| | ||
* X25519 (adapted via ad hoc hashed elgamal construction) | ||
* CTIDH1024 (adapted via ad hoc hashed elgamal construction) | ||
* MLKEM-768 | ||
* Xwing | ||
* McEliece | ||
* NTRUPrime | ||
* Kyber | ||
* FrodoKEM | ||
|
||
| SIGN: Cryptographic Signature Schemes | | ||
|:---:| | ||
* ed25519 | ||
* sphincs+ | ||
* ed25519_sphincs+ | ||
* ed25519_dilithium2/3 | ||
|
||
|
||
# licensing | ||
|
||
this is agpl-3 licensed code however some modules written by other authors | ||
is included here and in those cases we've included their LICENSE file in the | ||
directory or in the top comment of the file. | ||
hpqc is free libre open source software (FLOSS) under the AGPL-3.0 software license. | ||
This git repository provides a LICENSE file, here: https://github.com/katzenpost/hpqc/blob/main/LICENSE | ||
|
||
|
||
Read about free software philosophy --> https://www.gnu.org/philosophy/free-sw.html | ||
|
||
|
||
* There are precisely two files which were borrowed | ||
from cloudflare's `circl` cryptography library | ||
which provide the kem and signature interfaces: | ||
|
||
1. https://github.com/katzenpost/hpqc/blob/main/kem/interfaces.go | ||
2. https://github.com/katzenpost/hpqc/blob/main/sign/interfaces.go | ||
|
||
Those two files have their licenses attached at the top in a code comment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.