Skip to main content

ECDH-ES+A128KW based multi-recipient encryption provider for Swarmauri

Project description

Swamauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_mre_crypto_ecdh_es_kw


Swarmauri MRE Crypto ECDH-ES+A128KW

ECDH-ES+A128KW based multi-recipient encryption provider implementing the IMreCrypto contract.

  • ECDH-ES key agreement per recipient
  • AES-128 Key Wrap of a shared content-encryption key
  • AES-128-GCM payload encryption with optional AAD

Installation

pip install swarmauri_mre_crypto_ecdh_es_kw

Usage

from cryptography.hazmat.primitives.asymmetric import ec
from swarmauri_mre_crypto_ecdh_es_kw import EcdhEsA128KwMreCrypto

crypto = EcdhEsA128KwMreCrypto()

sk = ec.generate_private_key(ec.SECP256R1())
pk = sk.public_key()
ref = {"kid": "1", "version": 1, "kind": "cryptography_obj", "obj": pk}

env = await crypto.encrypt_for_many([ref], b"secret")
pt = await crypto.open_for({"kind": "cryptography_obj", "obj": sk}, env)

Entry point

The provider is registered under the swarmauri.mre_cryptos entry-point as EcdhEsA128KwMreCrypto.

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_mre_crypto_ecdh_es_kw-0.2.0.dev5.tar.gz (7.8 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_mre_crypto_ecdh_es_kw-0.2.0.dev5.tar.gz.

File metadata

File hashes

Hashes for swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev5.tar.gz
Algorithm Hash digest
SHA256 89126c47a07d8a15ac7cdd08aaae3098123a394512235c22b2672c1c82dafb35
MD5 712bfc8f2a9fda8f272b4ece23fd9bd6
BLAKE2b-256 ce4fd84aaee012c319759040814c1a041617fa97e68b368b0556843fd8cc3561

See more details on using hashes here.

File details

Details for the file swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev5-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev5-py3-none-any.whl
Algorithm Hash digest
SHA256 23ca3bb54dca6d89e1f62f952e6ccffbed61e68580a5dc91d415fef8d76f4719
MD5 afbb72079e6b48013b0ef99ec2cc88a6
BLAKE2b-256 c10cb8afd23426362295f9a706c8250d8ba519763f4b43b47e2385d67d314784

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