Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.2.4 instead.
Reason given by maintainers: Another typo :(

cryptidy

Python high level library for symmetric & asymmetric encryption

License Percentage of issues still open Maintainability codecov linux-tests windows-tests GitHub Release

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.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cryptidy-1.2.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file cryptidy-1.2.1.tar.gz.

File metadata

  • Download URL: cryptidy-1.2.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for cryptidy-1.2.1.tar.gz
Algorithm Hash digest
SHA256 6ce6d362559ac01521d74fd5dddd26906b4ba9b2c87fafc22bc057abc18acacf
MD5 a88b851f128e7caa6dc4b3d91d583a62
BLAKE2b-256 45093a0120fb4d551fcaa2c56ced3e073f116b63c4adb3a6b90fa083fa0dc1b9

See more details on using hashes here.

File details

Details for the file cryptidy-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: cryptidy-1.2.1-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

Hashes for cryptidy-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e27fd9d98a9e4ab374d5374e91cb319e9d9ba2459b5b8229a004ecb80838c0d
MD5 f1cde751f572340e845ac6e1a206a1b7
BLAKE2b-256 2c54da7e23b78afbea3165339b65c42e8061d8a9bc883287c69e3412da564270

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page