SLH-DSA


NameSLH-DSA JSON
Version 0.1.3 PyPI version JSON
download
home_pageNone
SummaryThe pure python impl of the slh-das algorithm(based on fips205).
upload_time2024-07-09 14:53:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseLGPL-3.0-or-later
keywords fips205 slhdsa sphincs sphincsplus crypto cryptography
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SLH-DSA
[![Test And Build](https://github.com/colinxu2020/slhdsa/actions/workflows/ci.yml/badge.svg)](https://github.com/colinxu2020/slhdsa/actions/workflows/ci.yml)
[![codecov](https://codecov.io/github/colinxu2020/slhdsa/graph/badge.svg?token=OAQXHYD9TM)](https://codecov.io/github/colinxu2020/slhdsa)
![PyPI - Downloads](https://img.shields.io/pypi/dm/slh-dsa)
![GitHub License](https://img.shields.io/github/license/colinxu2020/slhdsa)

The SLH-DSA project implements the stateless-hash digital signing algorithm(standardizing fips 205, adopted on Sphincs-Plus algorithm) in pure Python.

This project offers those future:
1. 🍻 Zero dependencies;
2. 🏷️ 100% type hint for all the codes;
3. ✅ Extreme good 98% test coverage;
4. 🔖 Support any newer python version!
5. ⚒️ Design for Human!
6. :tada: More futures coming soon!


The functionality is extremely simple to use, as demonstrated by the following example:
```python
from slhdsa import KeyPair, shake_256f, PublicKey

kp = KeyPair.gen(shake_256f)  # generate the keypair
sig = kp.sign(b"Hello World!")  # sign the message
kp.verify(b"Hello World!", sig)  # -> True
kp.verify(b"Hello World!", b"I'm the hacker!") # -> False
kp.verify(b"hello world!", sig)  # -> False
sig = kp.sign(b"Hello World!", randomize = True)  # sign the message randomized
kp.verify(b"Hello World!", sig)  # -> True

digest = kp.pub.digest()  # generate the digest of the public key so that other device could verify the sign
pub = PublicKey.from_digest(digest)  # generate public key
pub.verify(b"Hello World!", sig)  # -> True
pub.verify(b"Hello World", sig)  # -> False
```

## Copyright

Copyright(c) Colinxu2020 2024 All Rights Reserved.

This software is licensed under GNU Lesser General Public License Version 3 or later(on your option).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "SLH-DSA",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "fips205, slhdsa, sphincs, sphincsplus, crypto, cryptography",
    "author": null,
    "author_email": "Colinxu2020 <colinxu2020@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/10/19/899a14b35e40147010d3b18e29f1b3e57142a53eb18d835f673370bcb915/slh_dsa-0.1.3.tar.gz",
    "platform": null,
    "description": "# SLH-DSA\n[![Test And Build](https://github.com/colinxu2020/slhdsa/actions/workflows/ci.yml/badge.svg)](https://github.com/colinxu2020/slhdsa/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/github/colinxu2020/slhdsa/graph/badge.svg?token=OAQXHYD9TM)](https://codecov.io/github/colinxu2020/slhdsa)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/slh-dsa)\n![GitHub License](https://img.shields.io/github/license/colinxu2020/slhdsa)\n\nThe SLH-DSA project implements the stateless-hash digital signing algorithm(standardizing fips 205, adopted on Sphincs-Plus algorithm) in pure Python.\n\nThis project offers those future:\n1. \ud83c\udf7b Zero dependencies;\n2. \ud83c\udff7\ufe0f 100% type hint for all the codes;\n3. \u2705 Extreme good 98% test coverage;\n4. \ud83d\udd16 Support any newer python version!\n5. \u2692\ufe0f Design for Human!\n6. :tada: More futures coming soon!\n\n\nThe functionality is extremely simple to use, as demonstrated by the following example:\n```python\nfrom slhdsa import KeyPair, shake_256f, PublicKey\n\nkp = KeyPair.gen(shake_256f)  # generate the keypair\nsig = kp.sign(b\"Hello World!\")  # sign the message\nkp.verify(b\"Hello World!\", sig)  # -> True\nkp.verify(b\"Hello World!\", b\"I'm the hacker!\") # -> False\nkp.verify(b\"hello world!\", sig)  # -> False\nsig = kp.sign(b\"Hello World!\", randomize = True)  # sign the message randomized\nkp.verify(b\"Hello World!\", sig)  # -> True\n\ndigest = kp.pub.digest()  # generate the digest of the public key so that other device could verify the sign\npub = PublicKey.from_digest(digest)  # generate public key\npub.verify(b\"Hello World!\", sig)  # -> True\npub.verify(b\"Hello World\", sig)  # -> False\n```\n\n## Copyright\n\nCopyright(c) Colinxu2020 2024 All Rights Reserved.\n\nThis software is licensed under GNU Lesser General Public License Version 3 or later(on your option).\n",
    "bugtrack_url": null,
    "license": "LGPL-3.0-or-later",
    "summary": "The pure python impl of the slh-das algorithm(based on fips205).",
    "version": "0.1.3",
    "project_urls": {
        "Bug tracker": "https://github.com/colinxu2020/slhdsa/issues",
        "Homepage": "https://github.com/colinxu2020/slhdsa"
    },
    "split_keywords": [
        "fips205",
        " slhdsa",
        " sphincs",
        " sphincsplus",
        " crypto",
        " cryptography"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ab5d4f096ee227c2f6ebd2b3a6d9790d7604711b03c3817b8b0fe6c874c5ee5",
                "md5": "bf661b2d7519337e2ba1047ca64ee2a7",
                "sha256": "7b0d13a16a668fe57d7765ec8b7e3a1f19348d7043d1a9a40a8bd48c4cacc97d"
            },
            "downloads": -1,
            "filename": "slh_dsa-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bf661b2d7519337e2ba1047ca64ee2a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 25982,
            "upload_time": "2024-07-09T14:52:58",
            "upload_time_iso_8601": "2024-07-09T14:52:58.265447Z",
            "url": "https://files.pythonhosted.org/packages/6a/b5/d4f096ee227c2f6ebd2b3a6d9790d7604711b03c3817b8b0fe6c874c5ee5/slh_dsa-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1019899a14b35e40147010d3b18e29f1b3e57142a53eb18d835f673370bcb915",
                "md5": "3646e2e226e9be3fcc0d3fa7be67c883",
                "sha256": "d0eb63948ff0dc5d0e5aef9fb1023d337948418d0dc78f186efa06710d002756"
            },
            "downloads": -1,
            "filename": "slh_dsa-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "3646e2e226e9be3fcc0d3fa7be67c883",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 255790,
            "upload_time": "2024-07-09T14:53:03",
            "upload_time_iso_8601": "2024-07-09T14:53:03.571297Z",
            "url": "https://files.pythonhosted.org/packages/10/19/899a14b35e40147010d3b18e29f1b3e57142a53eb18d835f673370bcb915/slh_dsa-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-09 14:53:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "colinxu2020",
    "github_project": "slhdsa",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "slh-dsa"
}
        
Elapsed time: 1.15938s