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

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev32.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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.dev32.tar.gz
Algorithm Hash digest
SHA256 c8e3aa66b170840ef7fc13a15689b46201c89f7e53ae7160bbc4e331fb50ec08
MD5 d4233548569bf4130d47936e8b8b2953
BLAKE2b-256 f0093538b31cba85070facaf14b37c28d3a336ca58e00545b033f6069da39433

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev32-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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.dev32-py3-none-any.whl
Algorithm Hash digest
SHA256 689b8c149e6540a21cec49b6ca19928a01a44d7676ed5b99f43034fd822ecae2
MD5 95819df9a4efd6e5033096cb08835ccb
BLAKE2b-256 3f9d4f2e6fee5d5c2ef4af9486c66e99458d1d559dcbeb77ea8f723c1ea0076f

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