Skip to main content

pyCrypto wrapper, used by various MissingLink.ai libraries

Project description

ML-Crypto

This library is pycrypto / pycryptodome wrapper that standardises the MissingLink.ai-s encryption and allows easy extentions to support additional encryption schemes.

Overview

  • This library contains a set of Ciphers. Each Cipher has
    • encrpyt and decrypt functions that MUST return/accept byte array and
    • encrpyt_string / decrypt_string that work with string objects that will be a base64 representation of the encrypted byte output of the underlying [en|de]crypt functions
    • If your cipher returns structured data (such as IV and other data), you SHOULD use namedtuples and extend them with MsgPackNamedTuple mixin. This will allow you to easly dump the named tuple into optimised byterarray, in order to be flexable with the object, currently we are converting the named tuple into dict in order to be able to add fields in the feature
    • You SHOULD provide key generation function as part of the cipher that will generate key (the function may perform external calls in case of cloud kms and etc.)

Current Ciphers

  • Symmetric - AES-CTR encryption with 256 bits (32 bytes) key length
  • Asymmetric - PKCS1_OAEP encryption with SHA512 hashAlgo
  • Envelope - Envelope encryption where the body is encrypted with the Symmetric cipher. the DEK (data encryption key) is encrypted using non-specific cipher provided during init

PyCryptoDome vs PyCrypto vs None

  • When installing, no cryptography package is provided by default. Use mlcrypto[pycryptodome] or mlcrypto[pycrypto] to ensure one is installed or use the default if you know you have one installed
  • As pycrypto is dead, prefer using pycryptodome and expect some issues (The main one is encrypted ssh private keys) not to work

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlcrypto-0.6.297.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

mlcrypto-0.6.297-py2.py3-none-any.whl (7.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mlcrypto-0.6.297.tar.gz.

File metadata

  • Download URL: mlcrypto-0.6.297.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mlcrypto-0.6.297.tar.gz
Algorithm Hash digest
SHA256 bb93d55deaa8c21e5e3b7be4258a64d5bdd19c3494ed97ddfb57da9bbad175bc
MD5 35511bd3b1c4d16e4493acb5a42c180d
BLAKE2b-256 98d26eb946b43b67fdbd63173c712382da7128ca261206440a1641c5e1920e4c

See more details on using hashes here.

File details

Details for the file mlcrypto-0.6.297-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mlcrypto-0.6.297-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 62001a7fc3e91c7ef0e59d07cae6fc7381fa2ecbef46fd4cccc854449846e582
MD5 53bd5501e11138f9e4d8aa91a036d41e
BLAKE2b-256 cb9a13d1486907faded369e49b9274f9118cba608183b0ef175edc26bd307c5f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page