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

File metadata

File hashes

Hashes for swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev4.tar.gz
Algorithm Hash digest
SHA256 2b2d10ecba215d171b5f2a506c431d2775905b2daeaf2e9f27b9f1a18ed48896
MD5 617bd4d04daef84d90063af4e19be522
BLAKE2b-256 65dcd9681fb400fd2ed3d7518ce98afebeeeb613c2bfdb7624fb77dba23e2d48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for swarmauri_mre_crypto_ecdh_es_kw-0.2.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8bab32f157eee49a431728e5e8d6795860d3c1bdd34f23453f2ef6e20bf31a0
MD5 0a68a2881d6001a2e37234e57921b192
BLAKE2b-256 30fddb9555091b4c05cf0d0607621c335690ef77fc06b74a6e3fd971ad1caacd

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