COSE-aware cipher suite for Swarmauri
Project description
Swarmauri Cipher COSE
Cipher suite that understands CBOR Object Signing and Encryption (COSE) algorithm identifiers and maps them into Swarmauri crypto provider descriptors.
Features
- Accepts both integer and string COSE algorithm identifiers while normalizing to canonical string tokens
- Supplies JWA aliases so cross-protocol code can align crypto operations
- Provides default AEAD tag sizing and metadata for providers that expect it
- Designed to be injected into crypto or signing providers for algorithm policy reuse
Installation
pip
pip install swarmauri_cipher_suite_cose
Poetry
poetry add swarmauri_cipher_suite_cose
uv
To add the dependency to a pyproject.toml managed by uv:
uv add swarmauri_cipher_suite_cose
Or install it into the active environment:
uv pip install swarmauri_cipher_suite_cose
Usage
from swarmauri_cipher_suite_cose import CoseCipherSuite
suite = CoseCipherSuite(name="default-cose")
# Normalize a COSE signing request using the integer identifier for EdDSA
descriptor = suite.normalize(op="sign", alg=-8)
print(descriptor["alg"]) # -> "-8"
print(descriptor["mapped"]["provider"]) # -> "-8"
print(descriptor["params"]["tagBits"]) # -> 128 for COSE AEAD defaults
The resulting descriptor captures the operation, canonical algorithm token, provider mapping, and normalized parameter set. Crypto providers can share the suite to avoid re-implementing COSE policy logic across code paths.
Entry Point
The suite registers under the swarmauri.cipher_suites entry point as
CoseCipherSuite.
Want to help?
If you want to contribute to swarmauri-sdk, read up on our guidelines for contributing that will help you get started.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swarmauri_cipher_suite_cose-0.2.0.dev3.tar.gz.
File metadata
- Download URL: swarmauri_cipher_suite_cose-0.2.0.dev3.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71f10bdf2d540f7d257fbeebbec027f868e83e6810dd445b49d903e2a13a7c8b
|
|
| MD5 |
ed11ff2f91515d9eaf1eb0fe69027f45
|
|
| BLAKE2b-256 |
1c4601ebf4ad9bf30c3dc2c6eace72055022dc727a399cb36cec90307b8de2f6
|
File details
Details for the file swarmauri_cipher_suite_cose-0.2.0.dev3-py3-none-any.whl.
File metadata
- Download URL: swarmauri_cipher_suite_cose-0.2.0.dev3-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c6270859dfd2c9573d460c3199a45c0be2461ac26432b03607cba5a4868b190
|
|
| MD5 |
8e28eb80b795689aa1441aac65c7c447
|
|
| BLAKE2b-256 |
8220c65c410be2f627a3332c67223cb6f9924fc979a9f0addc84a1fc7c1ec99e
|