Skip to main content

Falcon Python Bindings

Python bindings for the Falcon post-quantum signature scheme, implemented in Rust using PyO3.

Features

  • Two security levels:
    • Falcon-512 (NIST security level 1)
    • Falcon-1024 (NIST security level 5)
  • Complete functionality:
    • Key pair generation
    • Message signing (both attached and detached signatures)
    • Signature verification
  • High performance - Rust implementation provides faster operations than pure Python
  • Type annotated - full .pyi stub file included

Installation

pip install falcon-python

For building from source:

pip install maturin
maturin build --release
pip install ./target/wheels/falcon_python-*.whl

Quick Start

from falcon_python import Falcon512, Falcon1024

# Falcon-512 example
pub, priv = Falcon512.generate_keypair()
message = b"Important message"

# Attached signature
signed = Falcon512.sign_message(message, priv)
verified_msg = Falcon512.verify_sign(signed, pub)

# Detached signature
signature = Falcon512.detached_sign(priv, message)
is_valid = Falcon512.verify_detached_sign(signature, message, pub)

Key Sizes

Algorithm Public Key Secret Key Signature
Falcon-512 897 bytes 1281 bytes 666 bytes
Falcon-1024 1793 bytes 2305 bytes 1280 bytes

Security Notice

This implementation uses the reference implementation from PQClean. While Falcon has been selected for standardization by NIST, this is still a relatively new cryptographic algorithm. Use in production systems should be done with proper security considerations.

License

MIT License. Contains code derived from PQClean project (also MIT licensed).

Release files for falcon-python 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for falcon-python 0.1.0
File Size Uploaded
falcon_python-0.1.0.tar.gz 6.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for falcon-python 0.1.0
File Interpreter ABI Platform
falcon_python-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
falcon_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details

Total release size: 786.7 kB

Release files / falcon_python-0.1.0.tar.gz

Download URL falcon_python-0.1.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e4d3c9742cb882a76c61c4d68390662413b774961cb15d2607fee22b9447c670
BLAKE2b-256 checksum
How to use checksums
4b103d2d3e4789ee500d62e621a9cbe803933a24be5566c65f20fbb909d194b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / falcon_python-0.1.0-cp312-cp312-win_amd64.whl

Download URL falcon_python-0.1.0-cp312-cp312-win_amd64.whl
Size 257.3 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
fa7c3ec809265b87e3abecc28677d241768910cb465ec7b5b6324d1c10fcc311
BLAKE2b-256 checksum
How to use checksums
60e2cc6fb7099c478aa3ecfc8beea004bc5b01e69feff19d8f135c3ac67f4f22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / falcon_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL falcon_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Size 523.1 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
5bef34c17c7c427dad92e1a7ffe83e10edb31e9ad7df2133ac4e98dd9794d82b
BLAKE2b-256 checksum
How to use checksums
34c5a8ac863fae47288a97d6ad00d81d14c820529e79076c461d73fec1177c5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page