Is there a python crypto library that does not rely on anything besides python? Or pre-complied bundles of PyCrypto for Linux?
migrated from crypto.stackexchange.com Apr 25 at 11:51
This question came from our site for software developers, mathematicians and others interested in cryptography.
Cryptography involves intensive numerical computations that are significantly faster when implemented in a low-level language such as C and compiled to machine code, than when implemented in a high-level language such as Python and executed as interpreted bytecode. This is why you should expect any library that provides basic cryptographic primitives to be at least partly written in C (or even assembler).
Furthermore, Python has built-in arbitrary-precision integer arithmetic, which allows efficiently implementing some asymmetric algorithms in pure Python (at least signing and verification, not necessarily key generation). Python-RSA (
Python does not ship with any encryption algorithms (in particular AES), because the distribution of encryption code is legally restricted in many parts of the world. The officially recommended external library is PyCrypto.
You should install PyCrypto. It would be in the standard library if it wasn't for legal restrictions. Most distributions include a Pycrypto package. If yours doesn't (I'm unfamiliar with Levinux), you will need to install gcc. If your distribution lacks gcc (or a cross-compilation system to easily compile packages on a more complete system), it isn't suitable for serious work.