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 ml-crypto[pycryptodome] or ml-crypto[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

ml-crypto-0.7.678.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

ml_crypto-0.7.678-py2.py3-none-any.whl (10.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ml-crypto-0.7.678.tar.gz.

File metadata

  • Download URL: ml-crypto-0.7.678.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for ml-crypto-0.7.678.tar.gz
Algorithm Hash digest
SHA256 f59e75c41db94ea1112da7a7d89ac5217ef92298ee6ed38e5195f45a3bc895bd
MD5 19956ee7efccfd348f85112d41bcc624
BLAKE2b-256 464cbf937323bad92c28d362cc7315829c8c90029998f8a25cd138c3955ed7d6

See more details on using hashes here.

File details

Details for the file ml_crypto-0.7.678-py2.py3-none-any.whl.

File metadata

  • Download URL: ml_crypto-0.7.678-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for ml_crypto-0.7.678-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9e38c19f00214354b9055b1d1cb4ba629cd2d43e34454e7db926fce8112dd5c3
MD5 86c0382d52f3b0edcf4f3e81120d7d16
BLAKE2b-256 f8cb30d0cbac53cfd2183750dc804882fac859f7b95ce971c6069575fc1550e0

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 Pingdom Monitoring Sentry Error logging StatusPage Status page