chacha20poly1305-0.0.3
توضیحات
Chacha20Poly1305
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | chacha20poly1305-0.0.3 |
| نام | chacha20poly1305 |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dusan Klinec |
| ایمیل نویسنده | dusan.klinec@gmail.com |
| آدرس صفحه اصلی | https://github.com/ph4r05/py-chacha20poly1305 |
| آدرس اینترنتی | https://pypi.org/project/chacha20poly1305/ |
| مجوز | LGPL |
Chacha20poly1305
================
Simple pure-python chacha20-poly1305 implementation based on
`tlslite-ng <https://github.com/tomato42/tlslite-ng>`__ code. Designed
to be compatible with Cryptography API.
.. code:: python
import os
from chacha20poly1305 import ChaCha20Poly1305
key = os.urandom(32)
cip = ChaCha20Poly1305(key)
nonce = os.urandom(12)
ciphertext = cip.encrypt(nonce, b'test')
plaintext = cip.decrypt(nonce, ciphertext)
print(plaintext)
Pip
---
.. code:: bash
pip install chacha20poly1305
Note
----
Please note the pure python implementation probably suffers form
side-channels leakage (timing, memory access). For constant time
implementations use compiled versions:
- https://github.com/ph4r05/py-trezor-crypto
- https://github.com/AntonKueltz/rfc7539
نحوه نصب
نصب پکیج whl chacha20poly1305-0.0.3:
pip install chacha20poly1305-0.0.3.whl
نصب پکیج tar.gz chacha20poly1305-0.0.3:
pip install chacha20poly1305-0.0.3.tar.gz