From 9523ee5debeabc73f28151240e3a88f54777d793 Mon Sep 17 00:00:00 2001 From: julien tayon Date: Fri, 29 Mar 2019 19:42:43 +0100 Subject: [PATCH] you don't let friends use pycrypto Unmaintained package with CVE might not be a good help https://www.cvedetails.com/product/22441/Dlitz-Pycrypto.html?vendor_id=11993 I also share the opinion of the author that pycrypto and its fork may promote insecure usage (like AES::ECB) https://theartofmachinery.com/2017/02/02/dont_use_pycrypto.html --- docs/scenarios/crypto.rst | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/docs/scenarios/crypto.rst b/docs/scenarios/crypto.rst index a5c3d7737..262337204 100644 --- a/docs/scenarios/crypto.rst +++ b/docs/scenarios/crypto.rst @@ -89,34 +89,3 @@ Example print("Hang on ... did you say *all* of GnuPG? Yep.") else: pass - - - -******** -PyCrypto -******** - -`PyCrypto `_ is another library, -which provides secure hash functions and various encryption algorithms. It -supports Python version 2.1 through 3.3. - -Installation -~~~~~~~~~~~~ - -.. code-block:: console - - $ pip install pycrypto - -Example -~~~~~~~ - -.. code-block:: python - - from Crypto.Cipher import AES - # Encryption - encryption_suite = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') - cipher_text = encryption_suite.encrypt("A really secret message. Not for prying eyes.") - - # Decryption - decryption_suite = AES.new('This is a key123', AES.MODE_CBC, 'This is an IV456') - plain_text = decryption_suite.decrypt(cipher_text)