update readme

This commit is contained in:
Henry Case 2021-03-27 00:00:15 +00:00
parent ff710a4e66
commit 313899ad7a

View File

@ -4,27 +4,19 @@ This is a repository of post-quantum schemes copied from the submission to the N
Users shouldn't expect any level of security provided by this code. The library is not meant to be used on live production systems. Users shouldn't expect any level of security provided by this code. The library is not meant to be used on live production systems.
## Schemes ## Schemes support
### Key Encapsulation Mechanisms | Name | NIST Round | x86 optimized |
|--------------------------|------------|---------------|
**Finalists:** | Kyber | 3 | x |
* Kyber | NTRU | 3 | x |
* NTRU | SABER | 3 | x |
* SABER | FrodoKEM | 3 | |
| NTRU Prime | 3 | x |
**Alternate candidates:** | Dilithium | 3 | x |
* FrodoKEM | Falcon | 2 | |
| Rainbow | 3 | |
### Signature schemes | SPHINCS+ SHA256/SHAKE256 | 3 | x |
**Finalists:**
* Dilithium
* Falcon
* Rainbow
**Alternate candidates:**
* SPHINCS+
## Building ## Building
@ -56,7 +48,7 @@ Library provides simple API, wrapping PQClean. For example to use KEM, one shoul
pqc_kem_encapsulate(p, ct.data(), ss1.data(), pk.data()); pqc_kem_encapsulate(p, ct.data(), ss1.data(), pk.data());
pqc_kem_decapsulate(p, ss2.data(), ct.data(), sk.data()); pqc_kem_decapsulate(p, ss2.data(), ct.data(), sk.data());
const params_t *p = pqc_sig_alg_by_id(DILITHIUM2); params_t *p = pqc_sig_alg_by_id(DILITHIUM2);
size_t sigsz = sig.capacity(); size_t sigsz = sig.capacity();
pqc_keygen(p, pk.data(), sk.data()); pqc_keygen(p, pk.data(), sk.data());
pqc_sig_create(p, sig.data(), &sigsz, msg.data(), msg.size(), sk.data()); pqc_sig_create(p, sig.data(), &sigsz, msg.data(), msg.size(), sk.data());
@ -67,8 +59,16 @@ See test implemetnation in ``test/ut.cpp`` for more details.
## Rust binding ## Rust binding
Rust bindgings are provided in the ``src/rustapi/pqc-sys`` and can be regenerated automatically by running ``cargo build`` in this directory. Rust bindgings are provided in the ``src/rustapi/pqc-sys`` and can be regenerated automatically by running ``cargo build`` in that directory.
## Testing ## Testing
Algorithms are tested against KATs, by the runner implemented in the ``teste/katrunner``. The runner uses ``katwalk`` crate. Algorithms are tested against KATs, by the runner implemented in the ``test/katrunner``. The runner uses ``katwalk`` crate. To run it:
```
cd test/katrunner
curl http://amongbytes.com/~flowher/permalinks/kat.zip --output kat.zip
unzip kat.zip
cargo run -- --katdir KAT
```