GCM mode documentation - Question

37 views
Skip to first unread message

Viñas Arnis

unread,
Oct 5, 2023, 2:20:54 PM10/5/23
to PyCryptodome
I am interested in clarifying on if the AES-GCM mode can handle 256 bit keys. The documentation says, "Galois/Counter Mode, defined in NIST SP 800-38D. It only works in combination with a 128 bits cipher like AES.". When I read this it sounds like PyCryptodome's implementation of the AES-GCM mode will only work with AES 128bit keys. I am assuming the document text is wrong and GCM mode should work with all key bit types, 128, 192, and 256 bits long. Please know I have tried encrypting and decrypting with a 256 bit key and everything works fine, so I simply want to clarify that the documentation isn't worded correctly and GCM mode can utilize all key bit types, thank you very much.

Helder Eijs

unread,
Oct 5, 2023, 5:08:45 PM10/5/23
to Viñas Arnis, PyCryptodome
Hi,

128 bits refer to the block size, not to the key size, so AES-GCM
works fine with AES-128, AES-192, and AES-256.

HE

Viñas Arnis

unread,
Oct 5, 2023, 5:37:13 PM10/5/23
to PyCryptodome
Hello,

I really appreciate the clarification, now how it reads make sense and I should have realized this.

I hope you have a fantastic day, thank you.

Paulo Braga

unread,
Oct 24, 2024, 7:02:50 PM10/24/24
to PyCryptodome
pycryptodome is a requirement for EasyTuya (https://pypi.org/project/EasyTuya/), which I'm looking into.

Downloaded pycryptodome-3.21.0-pp310-pypy310_pp73-win_amd64.whl
However, when I tried to install it (Python 3.13 on Windows 10 Pro machine with Ryzen processor) received this message:
ERROR: pycryptodome-3.21.0-pp310-pypy310_pp73-win_amd64.whl is not a supported wheel on this platform.

Why may be the cause?
Reply all
Reply to author
Forward
0 new messages