Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
505 views
in Technique[技术] by (71.8m points)

cryptography - Recommended Python cryptographic module?

I've been exploring what cryptographic modules are available to Python, and I've found 3: ezPyCrypt, yawPyCrypt and KeyCzar (which actually supports a few languages, but Python is included amongst them). The first two rely on the PyCrypto module.

Are there choices I am missing? Is there a clear front-runner for ease and features or does it simply come down to a manner of one's comfort level?

I'm currently leaning towards KeyCzar, with ezPyCrypt close behind.

I would be using the library for digital signature signing and verification, and potentially for key creation (although I won't cry if I have to make a call to something else for that functionality).

I am using Python 3.x and have access to GPG.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

A new cryptography library for Python has been in rapid development for a few months now. The 0.2.1 release just happened a few days ago.

https://cryptography.io/en/latest/

It is mainly a CFFI wrapper around existing C libraries such as OpenSSL. It is distributed as a pure python module and supports CPython versions 2.6 - 3.3 as well as PyPy. It is also the upstream of the refactored pyOpenSSL package.

It aims to expose high-level "recipes" that makes cryptography as idiot-proof as possible as well as primitives that should only be used with the appropriate caution. Symmetric algorithms (including AES-GCM) is very well supported and asymmetric algorithms such as RSA and DSA should be coming in the next few releases. Other notable algorithms that are supported includes PBKDF2, HKDF, HOTP and TOTP.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...