# 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.
```
Raw data
{
"_id": null,
"home_page": "https://github.com/godaddy/asherah-python/",
"name": "asherah",
"maintainer": "GoDaddy",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": "oss@godaddy.com",
"keywords": "encryption",
"author": "Jeremiah Gowdy",
"author_email": "jeremiah@gowdy.me",
"download_url": "https://files.pythonhosted.org/packages/04/9a/02d4de93447c4e0e8b0b0570e1734188bc48b87a293fdb8284807665ffa1/asherah-0.3.9.tar.gz",
"platform": null,
"description": "# asherah-python\n\nAsherah envelope encryption and key rotation library\n\nThis is a wrapper of the Asherah Go implementation using the Cobhan FFI library\n\n## Usage\n\nExample code:\n\n```python\nfrom asherah import Asherah, AsherahConfig\n\nconfig = AsherahConfig(\n kms='static',\n metastore='memory',\n service_name='TestService',\n product_id='TestProduct',\n verbose=True,\n enable_session_caching=True\n)\ncrypt = Asherah()\ncrypt.setup(config)\n\ndata = b\"mysecretdata\"\n\nencrypted = crypt.encrypt(\"partition\", data)\nprint(encrypted)\n\ndecrypted = crypt.decrypt(\"partition\", encrypted)\nprint(decrypted)\n```\n\n## Benchmarking\n\nIncluded is a `benchmark.py` script that will give you an idea of the execution\nspeeds you can see from this library. Our goal is to make this as performant as\npossible, as demonstrated by this example output:\n\n```sh\n> python benchmark.py\nBenchmarking encrypt/decrypt round trips of \"mysecretdata\".\nExecuted 100 iterations in 0.026045440000000003 seconds.\nExecuted 1000 iterations in 0.237702095 seconds.\nExecuted 10000 iterations in 2.3570790550000003 seconds.\nExecuted 100000 iterations in 23.717442475 seconds.\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Asherah envelope encryption and key rotation library",
"version": "0.3.9",
"project_urls": {
"Homepage": "https://github.com/godaddy/asherah-python/",
"Repository": "https://github.com/godaddy/asherah-python/"
},
"split_keywords": [
"encryption"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "17a9cf0a0134782b9e48ee894e39a956131897cb3840ca65a4d31476587518b3",
"md5": "44fb0fcf783425c83c6b51d446225a8e",
"sha256": "3d1f8b32aed8019e674b88645728c511e33c2995f1cfe3361870b7fb2ebf3cf6"
},
"downloads": -1,
"filename": "asherah-0.3.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "44fb0fcf783425c83c6b51d446225a8e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 15420776,
"upload_time": "2024-08-12T19:15:18",
"upload_time_iso_8601": "2024-08-12T19:15:18.954828Z",
"url": "https://files.pythonhosted.org/packages/17/a9/cf0a0134782b9e48ee894e39a956131897cb3840ca65a4d31476587518b3/asherah-0.3.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "049a02d4de93447c4e0e8b0b0570e1734188bc48b87a293fdb8284807665ffa1",
"md5": "7ff72b4a78e9b8cd5d1b9ba99467d5cd",
"sha256": "b378c53dea24c760073765e178cb68ce06f4a62265222e084f43a30a53c2459c"
},
"downloads": -1,
"filename": "asherah-0.3.9.tar.gz",
"has_sig": false,
"md5_digest": "7ff72b4a78e9b8cd5d1b9ba99467d5cd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 15334472,
"upload_time": "2024-08-12T19:15:22",
"upload_time_iso_8601": "2024-08-12T19:15:22.092276Z",
"url": "https://files.pythonhosted.org/packages/04/9a/02d4de93447c4e0e8b0b0570e1734188bc48b87a293fdb8284807665ffa1/asherah-0.3.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-12 19:15:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "godaddy",
"github_project": "asherah-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "asherah"
}