cryptidy
Python high level library for symmetric & asymmetric encryption
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)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cryptidy-1.2.2.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
cryptidy-1.2.2-py3-none-any.whl
(13.0 kB
view details)
File details
Details for the file cryptidy-1.2.2.tar.gz.
File metadata
- Download URL: cryptidy-1.2.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d278950b4e6b4a48aab21fb0f6c063564913e82b8619a246f5dfa8d9d9452f7
|
|
| MD5 |
46aecd58f2d635f254472bf102546fec
|
|
| BLAKE2b-256 |
e5eec05e8cdf295fad4e973205c8f4107dbdd9082c087ac1250a13161035ffba
|
File details
Details for the file cryptidy-1.2.2-py3-none-any.whl.
File metadata
- Download URL: cryptidy-1.2.2-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9a13f9a2f5b975b19b215d6992e0c6ac990c560a00cf40d8b0b715c15257e39
|
|
| MD5 |
9fd33eed1f57281b72a09cfbecab35bd
|
|
| BLAKE2b-256 |
ff09ecdf9f66e2ead60bf5d373ea789087dc81ee1ff86bf73a1c3cdba7b86e3c
|