Does anyone know of a python library or wrapper around a c library that will easily provide Authenticated AES via GCM mode?
PyCrypto does not support it and it does not appear that PyOpenSSL supports direct access to the symmetric cipher portions of OpenSSL
AES-GCM is a block cipher mode of operation that provides high speed of authenticated encryption and data integrity. Todays, the level of privacy protection is insufficient and make the data is been hacked easily.
The Galois/Counter Mode (GCM) is a typical block cipher modes of operation using block cipher algorithm. In this version, we provide Advanced Encryption Standard (AES) processing ability, the cipherkey length for AES should be 128/192/256 bits.
GCM. Nonce. A value used once during a cryptographic operation and then discarded.
AES-GCM is a more secure cipher than AES-CBC, because AES-CBC, operates by XOR'ing (eXclusive OR) each block with the previous block and cannot be written in parallel. This affects performance due to the complex mathematics involved requiring serial encryption.
The PyCA cryptography library provides AES-GCM: https://cryptography.io/en/latest/hazmat/primitives/symmetric-encryption/#cryptography.hazmat.primitives.ciphers.modes.GCM
I have just finished looking for an EAX or GCM mode AES encryption algorithm in python. This was a particularly difficult search because I was unable to download the PyCrypto alpha version, which includes both of these, due to a dependency issue.
Eventually I turned to an offshoot of pycrypto that can be pip installed without issue, and has a stable release of GCM.
http://pycryptodome.readthedocs.org/en/latest/src/introduction.html
I am looking for exactly the same thing, and strangely enough I cannot find any "official" solutions, just those:
So it looks like the answer above (which I have upvoted) is right, you have to do the maths yourself.. It's a shame there isn't a python wrapper for a C/assembly library because the latest CPUs provide hardware acceleration for those calculations, and we won't benefit from those with a pure python solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With