Add support for Rijndael algorithms (encryption methods 14, 15, and 16) #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code was previous attempting to use PyCrypto's AES module to
implement these methods. That did not work because they are actually
Rijndael ciphers and AES-256 is not the same as Rijndael-256 (and
similarly with 128 and 192)¹. It is possible to implement Rijndael-128
using PyCrypto's AES module by setting the key_size to 32.
Unfortunately, it is not possible to do so for Rijndael-192 or
Rijndael-256.
To support all three Rijndael methods, the mcrypt module is needed.
Rather than use PyCrypto for just one of the Rijndael methods, replace
all three with an mcrypt version.
¹ http://stackoverflow.com/a/8355432
I attempted to run the unit tests but they failed for me, initially because they rely on a non-upstream patch to nsca from debian, but even when running from an ubuntu system I had no luck.
I have been using this on production systems for a month or so though, FWIW.
Thanks for this module, it's been a great help!