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

File metadata

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

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swarmauri_cipher_suite_cose-0.1.0.dev35-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","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.dev35-py3-none-any.whl
Algorithm Hash digest
SHA256 9124d7cc363f4733308e33ff093c728069a6ba2a45ca30bcb4006c03ad064706
MD5 433feda3fb2ed29ad7ed29d0966b73e9
BLAKE2b-256 5ecbcc85ab31cd7f06a6fa67d4b0b74bc90666585754fd42f570c9f5d9d6f4c9

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