I have a working test of a hardware device that uses RSA encryption, in Python using M2Crypto. Now I need to test a similar device that uses 3DES encryption. But I can't figure out how to use M2Crypto to do triple DES encryption.
I know it should be possible from this chart. But unfortunately the documentation of M2Crypto I've found is sketchy. (The homepage at http://chandlerproject.org/ seems to be gone, along with Chandler.)
I've searched for 3DES and "OpenSSL API" and found some hard to grok C code for decrypting which makes it look like I need to use M2Crypto.EVP.Cipher. But I haven't found any examples of using it for DES. The closest I've found is this blog post on using it for AES encryption. It looks like I just need to figure out the correct arguments to M2Crypto.EVP.Cipher.__init__()
. I'll keep digging, but I thought it worth posting this question.