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

File metadata

File hashes

Hashes for swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev3.tar.gz
Algorithm Hash digest
SHA256 bd08fa4f6948713e7968eb697aa5b7e709acbb01d325d11d7031ea53d8599088
MD5 1828cc9fa499a0939a8b231f7a507940
BLAKE2b-256 ed1fdcef162555ecff97681d71dd411ea80eb52aacfe961660f439102fa42183

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 733f7a8134664e53ebb243b538bec29b16809a6c509b821b26ce0ef01556ba44
MD5 fd52dc692da713f87b198fbd13768e77
BLAKE2b-256 3253f1ce520c77697f72899ae4ae39698f7c9811c2b30aff3fae120cf370f467

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