Fusion cryptography
Created by Geometry Labs in partnership with The QRL Foundation
Introduction
Fusion signatures are based on lattice cryptography for post-quantum security, and are highly aggregatable. They are based on the 2023 whitepaper Fusion One-Time Non-Interactively-Aggregatable Digital Signatures From Lattices.
Fusion signatures are elegantly simple in both theory and implementation, reducing the risk of implementation errors. As a one-time signature scheme, Fusion can achieve more narrow tightness gaps in security, smaller signatures, and smaller keys. Our analysis permits parameters to be flexibly tailored to given target security levels and aggregation capacities. Fusion signatures have a number of other generally desirable characteristics: avoiding NTRU assumptions by using only the usual short integer solution assumption, avoiding floating-point arithmetic by using 32-bit signed integers, avoiding trapdoors, and avoiding some issues associated with randomization and statelessness.
Disclaimer: Fusion algorithms are still undergoing security analysis and this codebase has not been independently audited.
Installation
pip install fusion-cryptography
Usage
Here is a little demo showing the full lifecycle of a fusion signature. This includes (1) configuring the cryptographic system, (2) generating multiple keypairs, (3) signing multiple messages, (4) aggregating the signatures, and (5) verifying the result.
import random
import string
from typing import List
from fusion.fusion import (
fusion_setup,
keygen,
sign,
aggregate,
verify,
OneTimeKeyTuple,
Params,
Signature,
OneTimeVerificationKey,
)
# >> Set how many N signatures to create and aggregate for the demo
num_signatures: int = 2
# 1. Set up the cryptographic system using a security parameter and a seed
secpar: int = 256
seed: int = 42
a: Params = fusion_setup(secpar, seed)
print(f"Setup completed with security parameter {secpar} and seed {seed}.")
# 2. Generate N one-time key pairs
keys: List[OneTimeKeyTuple] = [keygen(a, seed) for _ in range(2)]
print(f"Generated {len(keys)} key pairs.")
# 3. Sign N messages using the key pairs
messages: List[str] = [
"".join(random.choices(string.ascii_letters + string.digits, k=20))
for _ in range(num_signatures)
]
sigs: List[Signature] = [sign(a, key, message) for key, message in zip(keys, messages)]
print(f"Signed {len(messages)} messages.")
# 4. Aggregate signatures from the signed messages
vks: List[OneTimeVerificationKey] = [key[1] for key in keys] # public keys
agg_sig: Signature = aggregate(a, vks, messages, sigs)
print("Aggregated the signatures.")
# 5. Verify the aggregate signature
result_bit, result_message = verify(a, vks, messages, agg_sig)
if result_bit:
print("Verification successful!")
else:
print(f"Verification failed! Reason: {result_message}")
Tests
Install packages in requirements-tests.txt and run scripts in tests folder with pytest.
Contributors
Brandon Goodell (lead author), Mitchell P. Krawiec-Thayer
Metadata
Release files for fusion-cryptography 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fusion-cryptography-0.0.0.tar.gz | 29.1 kB | Without provenance | Details for fusion-cryptography-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fusion_cryptography-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for fusion_cryptography-0.0.0-py3-none-any.whl |
Total release size: 46.0 kB
Release files / fusion-cryptography-0.0.0.tar.gz
| Download URL | fusion-cryptography-0.0.0.tar.gz |
|---|---|
| Size | 29.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1de655595a777bf25a423fc29e560de013e183bf70a10280d43505ee0538376c
|
|
BLAKE2b-256 checksum How to use checksums |
d4e27999216e0ff897dffc7c3f4b8ba674d3e250aa8fac47588ea7bc864c0ea4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / fusion_cryptography-0.0.0-py3-none-any.whl
| Download URL | fusion_cryptography-0.0.0-py3-none-any.whl |
|---|---|
| Size | 16.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc6ff35ef84d07e8d9641295b049c8d19592c3bfaeab4641c95d4806608e4fac
|
|
BLAKE2b-256 checksum How to use checksums |
ef7dfaa314e2232c4ebcaeda8e08f549d8dea136e861e728cd2797ede26c6350
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for fusion-cryptography 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.