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.1.0.dev26.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.1.0.dev26.tar.gz.

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev26.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.1.0.dev26.tar.gz
Algorithm Hash digest
SHA256 49e3fb1a921debbeb0201ff4cc3cf43ad643be17e4d2a3de34d7234366b9c735
MD5 1654c30f1c54c2c05672ba79f4d33936
BLAKE2b-256 94605cd68c17ef2b259a7d04f0ec8e5d81a84556159b5ec5bfc243dca741862d

See more details on using hashes here.

File details

Details for the file swarmauri_cipher_suite_cose-0.1.0.dev26-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev26-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","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.1.0.dev26-py3-none-any.whl
Algorithm Hash digest
SHA256 9301ad28fbe0e970187a8b43ac2a2529a09c4ba7698806527bde7c9ee5538251
MD5 aa4fcca5fd241b1b09f019aea23c8b27
BLAKE2b-256 d135dbd40d9da41376af4751667eb303e56934a31d4e81e43df5492b2ad05d8d

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