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
Cipher
s. EachCipher
hasencrpyt
anddecrypt
functions that MUST return/accept byte array andencrpyt_string
/decrypt_string
that work with string objects that will be abase64
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 usenamedtuples
and extend them withMsgPackNamedTuple
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 intodict
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 with256
bits (32 bytes) key length - Asymmetric -
PKCS1_OAEP
encryption withSHA512
hashAlgo - Envelope - Envelope encryption where the body is encrypted with the
Symmetric
cipher. theDEK
(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]
ormlcrypto[pycrypto]
to ensure one is installed or use the default if you know you have one installed - As
pycrypto
is dead, prefer usingpycryptodome
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 hashes)
Built Distribution
Close
Hashes for mlcrypto-0.6.297-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62001a7fc3e91c7ef0e59d07cae6fc7381fa2ecbef46fd4cccc854449846e582 |
|
MD5 | 53bd5501e11138f9e4d8aa91a036d41e |
|
BLAKE2b-256 | cb9a13d1486907faded369e49b9274f9118cba608183b0ef175edc26bd307c5f |