diff --git a/README.rst b/README.rst index bb43a023..048f4655 100644 --- a/README.rst +++ b/README.rst @@ -9,6 +9,10 @@ KEMs McEliece, Kyber, and HQC are currently provided, all with the same interface.:: + # Available: hqc_128, hqc_192, hqc_256, + # kyber512, kyber768, kyber1024, + # mceliece348864, mceliece460896, + # mceliece6688128, mceliece6960119, mceliece8192128 from pqc.kem import mceliece6960119 as kemalg @@ -36,6 +40,14 @@ Signature Algorithms SPHINCS+, Dilithium, and Falcon are provided, all with the same interface.:: + # Supported: dilithium2, dilithium3, dilithium5, + # falcon_512, falcon_512_padded, falcon_1024, falcon_1024_padded, + # sphincs_sha2_128f_simple, sphincs_sha2_128s_simple, + # sphincs_shake_128f_simple, sphincs_shake_128s_simple, + # sphincs_sha2_192f_simple, sphincs_sha2_192s_simple, + # sphincs_shake_192f_simple, sphincs_shake_192s_simple, + # sphincs_sha2_256f_simple, sphincs_sha2_256s_simple, + # sphincs_shake_256f_simple, sphincs_shake_256s_simple from pqc.sign import sphincs_shake_256s_simple as sigalg @@ -53,12 +65,11 @@ SPHINCS+, Dilithium, and Falcon are provided, all with the same interface.:: sigalg.verify(sig, MY_MESSAGE, pk) Regarding SPHINCS+: the Simple version is included; the Robust version is is not; -SHA256 and SHAKE256 are included; Haraka is not. These decisions are all inherited -from PQClean; I don't know much about their rationale. +SHA256 and SHAKE256 are included; Haraka is not. See https://github.com/PQClean/PQClean/discussions/548#discussioncomment-8565116 +for more information. -Regarding Falcon: the Compressed version is included. -The Padded version is not included, but TODO as soon as upstream adds it; -the CT version is probably not going to be included. +Regarding Falcon: the Compressed and Padded versions are included, and are able to +``verify()`` each others' signatures. The CT version is not currently planned. Development =========== diff --git a/cffi_modules/falcon_1024_padded_clean.py b/cffi_modules/falcon_1024_padded_clean.py new file mode 100644 index 00000000..507fbed6 --- /dev/null +++ b/cffi_modules/falcon_1024_padded_clean.py @@ -0,0 +1,3 @@ +from cffi_modules._falcon_cffi_maker import make_falcon_ffi + +ffi = make_falcon_ffi('./Modules/PQClean/crypto_sign/falcon-1024-padded/clean') diff --git a/cffi_modules/falcon_512_padded_clean.py b/cffi_modules/falcon_512_padded_clean.py new file mode 100644 index 00000000..b49a2e27 --- /dev/null +++ b/cffi_modules/falcon_512_padded_clean.py @@ -0,0 +1,3 @@ +from cffi_modules._falcon_cffi_maker import make_falcon_ffi + +ffi = make_falcon_ffi('./Modules/PQClean/crypto_sign/falcon-512-padded/clean') diff --git a/pqc/sign/falcon_1024_padded.py b/pqc/sign/falcon_1024_padded.py new file mode 100644 index 00000000..0229601f --- /dev/null +++ b/pqc/sign/falcon_1024_padded.py @@ -0,0 +1,17 @@ +from .._common import _SigAlg + +from pathlib import Path +import os + + +if os.environ.get('LICENSED_FALCON', '0') == '0': + # fmt: off + from .._util import patent_notice + patent_notice(['US7308097B2'], + 'the Falcon cryptosystem', 2, + ['https://csrc.nist.gov/csrc/media/Projects/post-quantum-cryptography/documents/selected-algos-2022/final-ip-statements/Falcon-Statements-final.pdf#page=20'] + ) + # fmt: on + + +_SigAlg._init_module(Path(__file__).stem, globals()) diff --git a/pqc/sign/falcon_512_padded.py b/pqc/sign/falcon_512_padded.py new file mode 100644 index 00000000..0229601f --- /dev/null +++ b/pqc/sign/falcon_512_padded.py @@ -0,0 +1,17 @@ +from .._common import _SigAlg + +from pathlib import Path +import os + + +if os.environ.get('LICENSED_FALCON', '0') == '0': + # fmt: off + from .._util import patent_notice + patent_notice(['US7308097B2'], + 'the Falcon cryptosystem', 2, + ['https://csrc.nist.gov/csrc/media/Projects/post-quantum-cryptography/documents/selected-algos-2022/final-ip-statements/Falcon-Statements-final.pdf#page=20'] + ) + # fmt: on + + +_SigAlg._init_module(Path(__file__).stem, globals()) diff --git a/pyproject.toml b/pyproject.toml index 341db168..d629f094 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = 'pypqc' -version = '0.0.7.0-a0' +version = '0.0.7.0-a1' description = 'Python bindings for the "PQClean" post-quantum cryptography library.' readme = 'README.rst' license.file = 'COPYING.rst'