python: module 'Crypto.Cipher.AES' has no attribute 'MODE_CCM' even though pycrypto installed

Viewed 15638

pycrypto is installed (when I run pip list one of the result is pycrypto (2.6.1))

and it works but when I would like to use the MODE_CCM it returns: module 'Crypto.Cipher.AES' has no attribute 'MODE_CCM'

My Python version: Python 3.5.2 :: Anaconda 4.2.0 (x86_64)

3 Answers

By using python 3, i solved it by installing pycryptodome (pip3 install pycryptodome). No need to replace Crypto by Cryptodome

You can use dir(AES) to see the list of supported MODE_xxx.

Related