This module implements the password-based key derivation function, PBKDF, specified in RSA PKCS#12 v1.0.
Quick start
Install from PyPI: https://pip.pypa.io/en/latest/installing.html
pip install PBKDF_PKCS12
Example PBKDF PKCS#12 v1.0 usage
PBKDF_PKCS12v1(iteration, password, salt, keylen)
1 2 3 4 5 6 7 8 | import PBKDF_PKCS12 from Crypto.Cipher import AES import os salt = os.urandom( 8 ) # 64-bit salt key = PBKDF_PKCS12.PBKDF_PKCS12v1( 2 , "This passphrase is a secret" , salt, 32 ) # 256-bit key iv = os.urandom( 16 ) # 128-bit IV cipher = AES.new(key, AES.MODE_CBC, iv) |