fusion-cryptography


Namefusion-cryptography JSON
Version 0.0.0 PyPI version JSON
download
home_pagehttps://github.com/geometry-labs/fusion-cryptography
SummaryFusion: highly aggregatable digital signatures using post-quantum lattice cryptography
upload_time2023-06-01 19:51:44
maintainer
docs_urlNone
authorGeometry Labs
requires_python>=3.6
licenseMIT
keywords lattice cryptography fusion signatures
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Fusion cryptography

Created by [Geometry Labs](https://www.geometrylabs.io) in partnership with [The QRL Foundation](https://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](https://eprint.iacr.org/2023/303).


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.

```python
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/geometry-labs/fusion-cryptography",
    "name": "fusion-cryptography",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "lattice,cryptography,fusion,signatures",
    "author": "Geometry Labs",
    "author_email": "info@geometrylabs.io",
    "download_url": "https://files.pythonhosted.org/packages/d4/e2/7999216e0ff897dffc7c3f4b8ba674d3e250aa8fac47588ea7bc864c0ea4/fusion-cryptography-0.0.0.tar.gz",
    "platform": null,
    "description": "# Fusion cryptography\n\nCreated by [Geometry Labs](https://www.geometrylabs.io) in partnership with [The QRL Foundation](https://qrl.foundation/)\n\n## Introduction \n\nFusion 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](https://eprint.iacr.org/2023/303).\n\n\nFusion 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.\n\n**Disclaimer**: Fusion algorithms are still undergoing security analysis and this codebase has not been independently audited.\n\n## Installation\n\n`pip install fusion-cryptography`\n\n## Usage\n\nHere 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.\n\n```python\nimport random\nimport string\nfrom typing import List\n\nfrom fusion.fusion import (\n    fusion_setup,\n    keygen,\n    sign,\n    aggregate,\n    verify,\n    OneTimeKeyTuple,\n    Params,\n    Signature,\n    OneTimeVerificationKey,\n)\n\n# >> Set how many N signatures to create and aggregate for the demo\nnum_signatures: int = 2\n\n# 1. Set up the cryptographic system using a security parameter and a seed\nsecpar: int = 256\nseed: int = 42\na: Params = fusion_setup(secpar, seed)\nprint(f\"Setup completed with security parameter {secpar} and seed {seed}.\")\n\n# 2. Generate N one-time key pairs\nkeys: List[OneTimeKeyTuple] = [keygen(a, seed) for _ in range(2)]\nprint(f\"Generated {len(keys)} key pairs.\")\n\n# 3. Sign N messages using the key pairs\nmessages: List[str] = [\n    \"\".join(random.choices(string.ascii_letters + string.digits, k=20))\n    for _ in range(num_signatures)\n]\nsigs: List[Signature] = [sign(a, key, message) for key, message in zip(keys, messages)]\nprint(f\"Signed {len(messages)} messages.\")\n\n# 4. Aggregate signatures from the signed messages\nvks: List[OneTimeVerificationKey] = [key[1] for key in keys]  # public keys\nagg_sig: Signature = aggregate(a, vks, messages, sigs)\nprint(\"Aggregated the signatures.\")\n\n# 5. Verify the aggregate signature\nresult_bit, result_message = verify(a, vks, messages, agg_sig)\nif result_bit:\n    print(\"Verification successful!\")\nelse:\n    print(f\"Verification failed! Reason: {result_message}\")\n```\n\n## Tests\n\nInstall packages in `requirements-tests.txt` and run scripts in `tests` folder with `pytest`.\n\n## Contributors\n\nBrandon Goodell (lead author), Mitchell P. Krawiec-Thayer\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fusion: highly aggregatable digital signatures using post-quantum lattice cryptography",
    "version": "0.0.0",
    "project_urls": {
        "Homepage": "https://github.com/geometry-labs/fusion-cryptography"
    },
    "split_keywords": [
        "lattice",
        "cryptography",
        "fusion",
        "signatures"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ef7dfaa314e2232c4ebcaeda8e08f549d8dea136e861e728cd2797ede26c6350",
                "md5": "ddb9798b60d11876de594895d93b91b7",
                "sha256": "dc6ff35ef84d07e8d9641295b049c8d19592c3bfaeab4641c95d4806608e4fac"
            },
            "downloads": -1,
            "filename": "fusion_cryptography-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ddb9798b60d11876de594895d93b91b7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 16921,
            "upload_time": "2023-06-01T19:51:42",
            "upload_time_iso_8601": "2023-06-01T19:51:42.697026Z",
            "url": "https://files.pythonhosted.org/packages/ef/7d/faa314e2232c4ebcaeda8e08f549d8dea136e861e728cd2797ede26c6350/fusion_cryptography-0.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4e27999216e0ff897dffc7c3f4b8ba674d3e250aa8fac47588ea7bc864c0ea4",
                "md5": "35f4a4567584d51081ed793d96e78a99",
                "sha256": "1de655595a777bf25a423fc29e560de013e183bf70a10280d43505ee0538376c"
            },
            "downloads": -1,
            "filename": "fusion-cryptography-0.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "35f4a4567584d51081ed793d96e78a99",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 29111,
            "upload_time": "2023-06-01T19:51:44",
            "upload_time_iso_8601": "2023-06-01T19:51:44.769590Z",
            "url": "https://files.pythonhosted.org/packages/d4/e2/7999216e0ff897dffc7c3f4b8ba674d3e250aa8fac47588ea7bc864c0ea4/fusion-cryptography-0.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-01 19:51:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "geometry-labs",
    "github_project": "fusion-cryptography",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fusion-cryptography"
}
        
Elapsed time: 0.08935s