In both node.js and OpenSSL, I am seeing cipher "aes-256-gcm".

However, in NIST Special Publication 800-38D, that defines GCM, I am reading:

The underlying block cipher shall be approved, the block size shall be 128 bits, and the key size shall be at least 128 bits.

How is this possible?

edit:

I see a similar question has been asked already - GCM encryption for 256-bit and 512-bit block ciphers - but that one is more theoretical question, while in openssl, there is a practical implementation.

Those answers imply that it might be insecure. Is it true, and are the openssl implementations inherently insecure?

up vote 11 down vote accepted

AES has a block-size of 128 bits in all its variants. The number in AES-128/192/256 is the key-size. Rijndael, the block-cipher that became AES, also supports 256 bit blocks, but that part was not standardized as AES.

Since the block-size is 128 bits, GCM works exactly the same way for AES-256 as it does for AES-128.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.