# ISCC - Crypto
[![Tests](https://github.com/iscc/iscc-crypto/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/iscc/iscc-crypto/actions/workflows/test.yml)
`iscc-crypto` is the cryptographic signing and verification module for the
[ISCC](https://iscc.codes) (*International Standard Content Code*) Framework.
## Features
- Ed25519 key generation and management
- JSON canonicalization and signing
- W3C Verifiable Credentials Data Integrity proofs
- Multibase and multikey support
- Minimal external dependencies for core cryptographic operations
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install `iscc-crypto`:
```bash
pip install iscc-crypto
```
## Quick Start
```python
import iscc_crypto as ic
# Generate new Ed25519 keypair
keypair = ic.key_generate()
print(f"Public Key: {keypair.public_key}")
print(f"Secret Key: {keypair.secret_key}")
# Sign a JSON document
doc = {"hello": "world"}
signed = ic.sign_json(doc, keypair)
print(f"Signed Doc: {signed}")
# Verify signature
verified = ic.verify_json(signed)
print(f"Verified Doc: {verified}")
# Create W3C Data Integrity Proof
vc = {"type": "VerifiableCredential", "issuer": "did:web:example.com"}
signed_vc = ic.sign_vc(vc, keypair)
print(f"Signed VC: {signed_vc}")
# Verify W3C Data Integrity Proof
verified, doc = ic.verify_vc(signed_vc, keypair.pk_obj)
print(f"VC Verified: {verified}")
```
## Documentation
Documentation is published at <https://crypto.iscc.codes>
## Development
**Requirements**
- [Python 3.10](https://www.python.org/) or higher
- [Poetry](https://python-poetry.org/) for dependency management
**Development Setup**
```shell
git clone https://github.com/iscc/iscc-crypto.git
cd iscc-crypto
poetry install
```
**Testing**
Run the test suite:
```shell
poetry run pytest
```
## Maintainers
[@titusz](https://github.com/titusz)
## Contributing
Pull requests are welcome. For significant changes, please open an issue first to discuss your
plans. Please make sure to update tests as appropriate.
You may also want join our developer chat on Telegram at <https://t.me/iscc_dev>.
## License
`iscc-crypto` is licensed under the Apache License, Version 2.0
Raw data
{
"_id": null,
"home_page": "https://iscc.codes",
"name": "iscc-crypto",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "iscc, cryptography, EdDSA, jsc, verifiable credentials, content identification",
"author": "Titusz",
"author_email": "tp@py7.de",
"download_url": "https://files.pythonhosted.org/packages/10/25/b4f481cf12b27dd58221a5dce0d4f84ccdb888b865f83abf715630acbe29/iscc_crypto-0.2.0.tar.gz",
"platform": null,
"description": "# ISCC - Crypto\n\n[![Tests](https://github.com/iscc/iscc-crypto/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/iscc/iscc-crypto/actions/workflows/test.yml)\n\n`iscc-crypto` is the cryptographic signing and verification module for the\n[ISCC](https://iscc.codes) (*International Standard Content Code*) Framework.\n\n## Features\n\n- Ed25519 key generation and management\n- JSON canonicalization and signing\n- W3C Verifiable Credentials Data Integrity proofs\n- Multibase and multikey support\n- Minimal external dependencies for core cryptographic operations\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install `iscc-crypto`:\n\n```bash\npip install iscc-crypto\n```\n\n## Quick Start\n\n```python\nimport iscc_crypto as ic\n\n# Generate new Ed25519 keypair\nkeypair = ic.key_generate()\nprint(f\"Public Key: {keypair.public_key}\")\nprint(f\"Secret Key: {keypair.secret_key}\")\n\n# Sign a JSON document\ndoc = {\"hello\": \"world\"}\nsigned = ic.sign_json(doc, keypair)\nprint(f\"Signed Doc: {signed}\")\n\n# Verify signature\nverified = ic.verify_json(signed)\nprint(f\"Verified Doc: {verified}\")\n\n# Create W3C Data Integrity Proof\nvc = {\"type\": \"VerifiableCredential\", \"issuer\": \"did:web:example.com\"}\nsigned_vc = ic.sign_vc(vc, keypair)\nprint(f\"Signed VC: {signed_vc}\")\n\n# Verify W3C Data Integrity Proof\nverified, doc = ic.verify_vc(signed_vc, keypair.pk_obj)\nprint(f\"VC Verified: {verified}\")\n```\n\n## Documentation\n\nDocumentation is published at <https://crypto.iscc.codes>\n\n## Development\n\n**Requirements**\n\n- [Python 3.10](https://www.python.org/) or higher\n- [Poetry](https://python-poetry.org/) for dependency management\n\n**Development Setup**\n\n```shell\ngit clone https://github.com/iscc/iscc-crypto.git\ncd iscc-crypto\npoetry install\n```\n\n**Testing**\n\nRun the test suite:\n\n```shell\npoetry run pytest\n```\n\n## Maintainers\n\n[@titusz](https://github.com/titusz)\n\n## Contributing\n\nPull requests are welcome. For significant changes, please open an issue first to discuss your\nplans. Please make sure to update tests as appropriate.\n\nYou may also want join our developer chat on Telegram at <https://t.me/iscc_dev>.\n\n## License\n\n`iscc-crypto` is licensed under the Apache License, Version 2.0\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "ISCC - Crypto",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://iscc.codes"
},
"split_keywords": [
"iscc",
" cryptography",
" eddsa",
" jsc",
" verifiable credentials",
" content identification"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dd33f6c9cecd212b3ac7111e74a6784e8d92cf6c1f8ae4cb697dbfa15daabf38",
"md5": "f8818b342836d7e8fb21e538565e95f6",
"sha256": "623749586d66ba61f2f393a71255737cb8ab1d24a6412d81702347a471ff7a59"
},
"downloads": -1,
"filename": "iscc_crypto-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f8818b342836d7e8fb21e538565e95f6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 8702,
"upload_time": "2024-12-09T22:58:59",
"upload_time_iso_8601": "2024-12-09T22:58:59.932942Z",
"url": "https://files.pythonhosted.org/packages/dd/33/f6c9cecd212b3ac7111e74a6784e8d92cf6c1f8ae4cb697dbfa15daabf38/iscc_crypto-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1025b4f481cf12b27dd58221a5dce0d4f84ccdb888b865f83abf715630acbe29",
"md5": "a6a47186b1f9198bd9ffe44a1be88e8b",
"sha256": "89c0bb92983238026f3c83810ef006c0222c0e3e128b3e921ae7238d71cac622"
},
"downloads": -1,
"filename": "iscc_crypto-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "a6a47186b1f9198bd9ffe44a1be88e8b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 7569,
"upload_time": "2024-12-09T22:59:13",
"upload_time_iso_8601": "2024-12-09T22:59:13.805201Z",
"url": "https://files.pythonhosted.org/packages/10/25/b4f481cf12b27dd58221a5dce0d4f84ccdb888b865f83abf715630acbe29/iscc_crypto-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-09 22:59:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "iscc-crypto"
}