Skip to main content

COSE-aware cipher suite for Swarmauri

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_cipher_suite_cose


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_cipher_suite_cose-0.2.0.dev2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_cipher_suite_cose-0.2.0.dev2.tar.gz.

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.2.0.dev2.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

Hashes for swarmauri_cipher_suite_cose-0.2.0.dev2.tar.gz
Algorithm Hash digest
SHA256 96f79454e9a67c52202e26b0cb2653b7d4e7aefe0f60d41c22b296e99f0612c7
MD5 7d9cb9ecf72eaef1ac40dbda4dc28523
BLAKE2b-256 d77870ff5828c72aee4dda4d6d66b172a2165b9433e793626d88e68fe2ee5af5

See more details on using hashes here.

File details

Details for the file swarmauri_cipher_suite_cose-0.2.0.dev2-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.2.0.dev2-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

Hashes for swarmauri_cipher_suite_cose-0.2.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8be4cf59e7f8da9adccb372e9f2e3ed04a77306a7b2d1a5311efea60f9eb663
MD5 a892db72948470375383e86945530d23
BLAKE2b-256 8a18531631cc3a0ad717964429f36df283878f71f443cd2f4f90786e7167af15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page