PyCrypto —— 一个极好的信息安全python库

来源:互联网 发布:2017中国贫富差距数据 编辑:程序博客网 时间:2024/05/29 07:38

在网上发现一个极好的python库,用于信息安全的,叫PyCrypto
https://www.dlitz.net/software/pycrypto/

又找了windows的版本:
http://www.voidspace.org.uk/python/modules.shtml#pycrypto

下载后装了用了一下,感觉很好:

我运行的结果

包括听说过的所有主流算法:
http://packages.python.org/pycrypto/ 

Submodules
  • Crypto.CipherSymmetric- and asymmetric-key encryption algorithms.
    • Crypto.Cipher.AESAES symmetric cipher
    • Crypto.Cipher.ARC2RC2 symmetric cipher
    • Crypto.Cipher.ARC4ARC4 symmetric cipher
    • Crypto.Cipher.BlowfishBlowfish symmetric cipher
    • Crypto.Cipher.CASTCAST-128 symmetric cipher
    • Crypto.Cipher.DESDES symmetric cipher
    • Crypto.Cipher.DES3Triple DES symmetric cipher
    • Crypto.Cipher.PKCS1_OAEPRSA encryption protocol according to PKCS#1 OAEP
    • Crypto.Cipher.PKCS1_v1_5RSA encryption protocol according to PKCS#1 v1.5
    • Crypto.Cipher.XORXOR toy cipher
    • Crypto.Cipher.blockalgoModule with definitions common to all block ciphers.
  • Crypto.HashHashing algorithms
    • Crypto.Hash.HMACHMAC (Hash-based Message Authentication Code) algorithm
    • Crypto.Hash.MD2MD2 cryptographic hash algorithm.
    • Crypto.Hash.MD4MD4 cryptographic hash algorithm.
    • Crypto.Hash.MD5MD5 cryptographic hash algorithm.
    • Crypto.Hash.RIPEMDRIPEMD-160 cryptographic hash algorithm.
    • Crypto.Hash.SHASHA-1 cryptographic hash algorithm.
    • Crypto.Hash.SHA224SHA-224 cryptographic hash algorithm.
    • Crypto.Hash.SHA256SHA-256 cryptographic hash algorithm.
    • Crypto.Hash.SHA384SHA-384 cryptographic hash algorithm.
    • Crypto.Hash.SHA512SHA-512 cryptographic hash algorithm.
    • Crypto.Hash.hashalgo
  • Crypto.ProtocolCryptographic protocols
    • Crypto.Protocol.AllOrNothingThis file implements all-or-nothing package transformations.
    • Crypto.Protocol.ChaffingThis file implements the chaffing algorithm.
    • Crypto.Protocol.KDFThis file contains a collection of standard key derivation functions.
  • Crypto.PublicKeyPublic-key encryption and signature algorithms.
    • Crypto.PublicKey.DSADSA public-key signature algorithm.
    • Crypto.PublicKey.ElGamalElGamal public-key algorithm (randomized encryption and signature).
    • Crypto.PublicKey.RSARSA public-key cryptography algorithm (signature and encryption).
  • Crypto.Random
    • Crypto.Random.Fortuna
      • Crypto.Random.Fortuna.FortunaAccumulator
      • Crypto.Random.Fortuna.FortunaGenerator
      • Crypto.Random.Fortuna.SHAd256SHA_d-256 hash function implementation.
    • Crypto.Random.OSRNGProvides a platform-independent interface to the random number generators supplied by various operating systems.
      • Crypto.Random.OSRNG.fallback
      • Crypto.Random.OSRNG.nt
      • Crypto.Random.OSRNG.posix
      • Crypto.Random.OSRNG.rng_base
    • Crypto.Random._UserFriendlyRNG
    • Crypto.Random.randomA cryptographically strong version of Python's standard "random" module.
  • Crypto.SignatureDigital signature protocols
    • Crypto.Signature.PKCS1_PSSRSA digital signature protocol with appendix according to PKCS#1 PSS.
    • Crypto.Signature.PKCS1_v1_5RSA digital signature protocol according to PKCS#1 v1.5
  • Crypto.UtilMiscellaneous modules
    • Crypto.Util.CounterFast counter functions for CTR cipher modes.
    • Crypto.Util.RFC1751
    • Crypto.Util._counter
    • Crypto.Util._number_new
    • Crypto.Util.asn1
    • Crypto.Util.number
    • Crypto.Util.py21compatCompatibility code for Python 2.1
    • Crypto.Util.py3compatCompatibility code for handling string/bytes changes from Python 2.x to Py3k
    • Crypto.Util.randpool
    • Crypto.Util.strxor
    • Crypto.Util.winrandom
  • Crypto.pct_warnings

我在【win7操作系统 + 32位机器】上装python2.7 和PyCrypto(也有64位的版本),用这个辅助学习,感觉挺方便的。


其他引用来源:

Installing PyCrypto On Windows (Or How To Build Installers For Libraries With C-Modules)

http://www.razorvine.net/blog/user/irmen/article/2009-12-05/166


pycrypto 2.0.1 - Cryptographic modules for Python.

http://pypi.python.org/pypi/pycrypto/2.0.1


Hashing passwords using SHA256 is not enough today

http://forums.udacity.com/questions/6016855/hashing-passwords-using-sha256-is-not-enough-today#cs253


Python-list -- General discussion list for the Python programming language

http://mail.python.org/mailman/listinfo/python-list