Skip to main content

Asherah envelope encryption and key rotation library

Project description

asherah-python

Asherah envelope encryption and key rotation library

This is a wrapper of the Asherah Go implementation using the Cobhan FFI library

Usage

Example code:

from asherah import Asherah, AsherahConfig

config = AsherahConfig(
    kms='static',
    metastore='memory',
    service_name='TestService',
    product_id='TestProduct',
    verbose=True,
    enable_session_caching=True
)
crypt = Asherah()
crypt.setup(config)

data = b"mysecretdata"

encrypted = crypt.encrypt("partition", data)
print(encrypted)

decrypted = crypt.decrypt("partition", encrypted)
print(decrypted)

Benchmarking

Included is a benchmark.py script that will give you an idea of the execution speeds you can see from this library. Our goal is to make this as performant as possible, as demonstrated by this example output:

> python benchmark.py
Benchmarking encrypt/decrypt round trips of "mysecretdata".
Executed 100 iterations in 0.026045440000000003 seconds.
Executed 1000 iterations in 0.237702095 seconds.
Executed 10000 iterations in 2.3570790550000003 seconds.
Executed 100000 iterations in 23.717442475 seconds.

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

asherah-0.3.9.tar.gz (15.3 MB view details)

Uploaded Source

Built Distribution

asherah-0.3.9-py3-none-any.whl (15.4 MB view details)

Uploaded Python 3

File details

Details for the file asherah-0.3.9.tar.gz.

File metadata

  • Download URL: asherah-0.3.9.tar.gz
  • Upload date:
  • Size: 15.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure

File hashes

Hashes for asherah-0.3.9.tar.gz
Algorithm Hash digest
SHA256 b378c53dea24c760073765e178cb68ce06f4a62265222e084f43a30a53c2459c
MD5 7ff72b4a78e9b8cd5d1b9ba99467d5cd
BLAKE2b-256 049a02d4de93447c4e0e8b0b0570e1734188bc48b87a293fdb8284807665ffa1

See more details on using hashes here.

File details

Details for the file asherah-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: asherah-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 15.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.14 Linux/6.5.0-1025-azure

File hashes

Hashes for asherah-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 3d1f8b32aed8019e674b88645728c511e33c2995f1cfe3361870b7fb2ebf3cf6
MD5 44fb0fcf783425c83c6b51d446225a8e
BLAKE2b-256 17a9cf0a0134782b9e48ee894e39a956131897cb3840ca65a4d31476587518b3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page