aes-encryption.com
English

AES · GCM / CBC / CTR

AES-GCM vs CBC vs CTR: Authentication and Parameters

Compare GCM authentication, CBC padding and CTR counter rules before configuring raw AES compatibility.

Compare the complete construction

ModeIV / nonce herePadding hereAuthentication
GCM12-byte nonceNone128-bit tag
CBC16-byte IVPKCS7None
CTR16-byte counter; 64-bit counter fieldNoneNone

GCM is the password profile's fixed default. CBC and CTR are exposed for raw compatibility, with a warning. This is not a recommendation to replace an established protocol with a bare cipher mode.

Why GCM can refuse to decrypt

GCM verifies a tag over the ciphertext and any AAD. Changing the key, nonce, ciphertext, tag or AAD can prevent authentication. The tool returns no partial plaintext when this happens. Its output appends a 16-byte tag; if a system stores the tag separately, split or combine the bytes correctly rather than duplicating it.

The same key must not reuse a nonce. The tool generates fresh nonces by default. A manual nonce option exists only for deliberate interoperability and test vectors; a random-looking nonce copied from a previous operation must not become a permanent default.

CBC and CTR failure is different

CBC needs an unpredictable IV and a padding convention. A wrong key can cause a padding error, but occasional valid padding is not authentication. CTR has no padding and can return altered bytes without an error. Neither mode proves integrity or a correct key simply because processing completed.

CTR compatibility also depends on how counter blocks advance. This tool fixes the low-order counter field to 64 bits and rejects wrap for the input length. A peer using a different counter layout may not interoperate even with the same displayed IV.

An interoperability checklist

Before moving ciphertext between systems, record mode, key bytes, IV/nonce, encoding, tag placement, AAD and padding or counter length. Test with public data first. The site supports GCM, CBC and CTR only; ECB, CFB and OFB are not hidden options. For a new authenticated workflow, prefer the password GCM profile or a reviewed application protocol rather than inventing a CBC-plus-checksum scheme.

Technical references

Updated October 16, 2026

Frequently asked questions

Is CBC broken whenever it has no tag?

CBC is a mode with requirements. A bare CBC operation lacks authentication; a wider protocol may add appropriate integrity protection. This tool does not add that protection automatically.

Can GCM use PKCS7 padding?

GCM does not use PKCS7. Adding or removing such padding changes the plaintext and can break compatibility.