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.dev27.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.dev27.tar.gz.

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev27.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.dev27.tar.gz
Algorithm Hash digest
SHA256 651090f08c632a0e3cf2319feee7fdedfdd87ed44987f45b5efc02ef58ab3f5e
MD5 4b68d9d3fc86708807f7886092acb2c6
BLAKE2b-256 331999208368949c9becb80d2dbd1bffcebf18dbdced58314130cb07c331f486

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev27-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.dev27-py3-none-any.whl
Algorithm Hash digest
SHA256 8d9a47213170622b871728d93997b096614f4bfda6ed865be3deeac53d1d150a
MD5 654b2ac051e92f00f2b996257deb1641
BLAKE2b-256 790f3dff667127cf6e5860114a196633c0b4b101ec31234e2a0456547894c987

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