Metadata-Version: 2.1
Name: asherah
Version: 0.3.7
Summary: Asherah envelope encryption and key rotation library
Home-page: https://github.com/godaddy/asherah-python/
License: MIT
Keywords: encryption
Author: Jeremiah Gowdy
Author-email: jeremiah@gowdy.me
Maintainer: GoDaddy
Maintainer-email: oss@godaddy.com
Requires-Python: >=3.7,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security :: Cryptography
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: cobhan (>=0.4.2,<0.5.0)
Project-URL: Repository, https://github.com/godaddy/asherah-python/
Description-Content-Type: text/markdown

# 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:

```python
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:

```sh
> 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.
```

