cryptidy-1.2.2
توضیحات
Python high level library for symmetric & asymmetric encryption
| ویژگی | مقدار |
|---|---|
| سیستم عامل | POSIX :: Linux |
| نام فایل | cryptidy-1.2.2 |
| نام | cryptidy |
| نسخه کتابخانه | 1.2.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | NetInvent - Orsiris de Jong |
| ایمیل نویسنده | contact@netinvent.fr |
| آدرس صفحه اصلی | https://github.com/netinvent/cryptidy |
| آدرس اینترنتی | https://pypi.org/project/cryptidy/ |
| مجوز | BSD |
# cryptidy
## Python high level library for symmetric & asymmetric encryption
[](https://opensource.org/licenses/BSD-3-Clause)
[](http://isitmaintained.com/project/netinvent/Cryptidy "Percentage of issues still open")
[](https://codeclimate.com/github/netinvent/cryptidy/maintainability)
[](https://codecov.io/gh/netinvent/cryptidy)
[](https://github.com/netinvent/cryptidy/actions/workflows/linux.yaml)
[](https://github.com/netinvent/cryptidy/actions/workflows/windows.yaml)
[](https://github.com/netinvent/cryptidy/releases/latest)
This library has been written to make encryption / decryption of any python object as simple as possible, while keeping the encryption solution secure.
It is based on pycryptodomex AES and RSA encrpytion implementations.
It's main features are:
- Encrypt any pickable Python object / variable / blob
- Add an UTC timestamp to the encrypted message
- Verify that decrypted messages timestamps aren't in the future or too old (for bad RTC clock diags)
- Allow symmetric encryption (AES-EAX mode)
- 128, 192 or 256 bits encryption
- Allow asymmetric encryption (RSA encryption with SHA384 hash algorithm and above AES encryption)
- 1024, 2048 or 4096 bits RSA encryption with AES-256 session encryption
- Provide the encypted data as base64 string for maximum portability between platforms and encodings
- Unload AES key from memory as soon as possible to help prevent memory attacks
# Setup
cryptidy requires Python 2.7+
`pip install cryptidy`
# Symmetric encryption usage
```
from cryptidy import symmetric_encryption
key = symmetric_encryption.generate_key(32) # 32 bytes == 256 bits
some_python_objects = ['foo', 'bar'], 'some long string', 12
encrypted = symmetric_encryption.encrypt_message(some_python_objects, key)
timestamp, original_object = symmetric_encryption.decrypt_message(encrypted, key)
```
# Asymmetric encryption usage
```
from cryptidy import asymmetric_encryption
priv_key, pub_key = asymmetric_encryption.generate_keys(2048) # 2048 bits RSA key
some_python_objects = ['foo', 'bar'], 'some long string', 12
encrypted = asymmetric_encryption.encrypt_message(some_python_objects, pub_key)
timestamp, original_object = asymmetric_encryption.decrypt_message(encrypted, priv_key)
```
نیازمندی
| مقدار | نام |
|---|---|
| >=3.6.0 | pycryptodomex |
نحوه نصب
نصب پکیج whl cryptidy-1.2.2:
pip install cryptidy-1.2.2.whl
نصب پکیج tar.gz cryptidy-1.2.2:
pip install cryptidy-1.2.2.tar.gz