Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Where i can find a "reviewed" version of AES implementation in python. Not an API like PyCrypto whereby you can call AES algorithms in a single line.

share|improve this question
2  
What do you mean by reviewed? Tested with the NIST CMVP? I can provide a pure python AES implementation, but its just a learning tool, not meant for actual usage –  calccrypto Jan 16 '13 at 14:51
1  
As a programming question, this might be better off at stackoverflow. –  owlstead Jan 18 '13 at 23:41
add comment

3 Answers

up vote 5 down vote accepted

This is an implementation of AES written completely in Python.

It's not written as a library, it's a program to encrypt files, but looking at the source (which is a single file) the entire AES workings are implemented within it.

There are publicly available test vectors from CMVP for validating that an AES implementation conforms to the spec properly. However, this alone does not address the many pragmatic problems an implementation may have.

share|improve this answer
add comment

Take a look at tlslite, it offers an AES implementation. The API seems to support CBC mode only though.

https://github.com/trevp/tlslite/blob/master/tlslite/utils/python_aes.py

share|improve this answer
add comment

Have a look at pyCrypto. It is also linked by the official python doc. As you can see in the pyCrypto doc it implements the following encryption algorithms:

AES 16, 24, or 32 bytes/16 bytes
ARC2 Variable/8 bytes
Blowfish Variable/8 bytes
CAST Variable/8 bytes
DES 8 bytes/8 bytes
DES3 16 bytes/8 bytes
IDEA 16 bytes/8 bytes
RC5 Variable/8 bytes

As you already pointed out:

Some modules are implemented in C for performance; others are written in Python for ease of modification. Generally, low-level functions like ciphers and hash functions are written in C, while less speed-critical functions have been written in Python.

There are also some interesting tutorials:

[update] found a python implementation of aes here and here. I did not verify if it works well.

share|improve this answer
    
AES.c, that's unlikely to be python. –  owlstead Jan 18 '13 at 23:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.