A hospital IT team is choosing how to encrypt patient records before a cloud migration.
One vendor’s sales deck leads with a single line: “military-grade AES-256 encryption.” It sounds decisive. It sounds like the safer box to tick.
But nobody on the vendor’s call can explain what would actually go wrong with AES-128 — only that 256 is a bigger number.
That gap between marketing and mechanism is exactly where this comparison lives.
Both AES-128 and AES-256 are considered extremely secure today. In practice, a hospital — or any organisation — is far more likely to suffer a breach from stolen credentials, an unpatched vulnerability, a misconfiguration, or a phishing email than from any theoretical weakness in either encryption standard.
Understanding the real difference means looking past the marketing line and into how AES actually works.
What Is AES?
AES stands for Advanced Encryption Standard — a symmetric encryption algorithm used to protect data.
“Symmetric” means the same key encrypts and decrypts.
AES shows up in:
- HTTPS
- VPNs
- Wi-Fi security
- Cloud storage
- Password managers
- Database encryption
- File encryption tools
- Messaging applications
NIST selected AES in 2001 after a multi-year public competition, and it remains the global standard for symmetric encryption today — including, most likely, whatever the hospital’s cloud vendor ends up using under the hood.
What Is the Difference Between AES-128 and AES-256?
The core difference is key size.
| Algorithm | Key Length |
|---|---|
| AES-128 | 128 bits |
| AES-192 | 192 bits |
| AES-256 | 256 bits |
A longer key means more possible combinations an attacker would have to try in a brute-force attack.
AES-128 Key Space
2^128
Approximately:
340,282,366,920,938,463,463,374,607,431,768,211,456
possible keys.
AES-256 Key Space
2^256
Approximately:
115,792,089,237,316,195,423,570,985,008,687,907,853,
269,984,665,640,564,039,457,584,007,913,129,639,936
possible keys.
Both figures are so large they’re effectively meaningless as human-scale numbers — which is part of why the marketing line lands so easily.
How AES Works
AES encrypts data through repeated rounds of mathematical transformation, each one making the original data harder to recover without the correct key.
| Algorithm | Rounds |
|---|---|
| AES-128 | 10 |
| AES-192 | 12 |
| AES-256 | 14 |
More rounds for AES-256 means slightly more computational work, and a slightly larger theoretical security margin.
Is AES-128 Still Secure?
Yes.
No practical attack exists today that can brute-force correctly implemented AES-128. Even with enormous computing resources, an exhaustive key search would take an unrealistic amount of time.
For the hospital’s patient-record system — or almost any real-world application — AES-128 provides security well beyond what’s needed, which is exactly why it remains widely used in:
- TLS connections
- Wi-Fi encryption
- Enterprise applications
- Secure communications
The idea that AES-128 is “weak” is a misconception the vendor’s slide deck was quietly leaning on.
Why Does AES-256 Exist?
AES-256 exists to widen the security margin — not to patch a known weakness in AES-128, but to guard against future advances in computing and cryptanalysis that haven’t happened yet.
Organisations handling especially sensitive data often lean toward AES-256 for exactly that reason:
- Government agencies
- Military systems
- Intelligence organisations
- Financial institutions
- Critical infrastructure providers
A hospital storing decades-long patient histories arguably belongs on that list too — long retention periods are one of the better real arguments for AES-256, separate from any marketing pitch.
AES-128 vs AES-256 Security Comparison
| Factor | AES-128 | AES-256 |
|---|---|---|
| Key Size | 128-bit | 256-bit |
| Rounds | 10 | 14 |
| Brute Force Resistance | Extremely high | Even higher |
| Performance | Faster | Slightly slower |
| Security Margin | Very large | Larger |
| Government Use | Common | Common |
| Future-Proofing | Strong | Stronger |
For most threat models — including a hospital’s — both options exceed practical security requirements.
What About Quantum Computing?
Quantum computing gets invoked constantly in AES-256 pitches, usually citing Grover’s Algorithm — the idea that a sufficiently powerful quantum computer could, in theory, cut the effective security of symmetric encryption roughly in half.
| Algorithm | Approximate Quantum Security |
|---|---|
| AES-128 | ~64 bits |
| AES-256 | ~128 bits |
This is a legitimate reason security professionals recommend AES-256 for data that needs to stay confidential for decades — patient records again being a reasonable example.
But large-scale quantum computers capable of actually attacking AES don’t exist yet. For today’s systems, this remains a theoretical, forward-looking consideration rather than an active threat.
Performance Differences
AES-128 is generally a touch faster than AES-256, because it does fewer rounds, less key expansion, and less overall computation.
On modern hardware, the gap is often negligible — most CPUs have AES acceleration built in. But at genuinely massive scale — high-volume databases, large cloud storage platforms, data-centre-scale workloads — that small difference can start to matter, and should be weighed against the surrounding data-protection strategy rather than assumed.
Why Many Systems Default to AES-256
If AES-128 is already secure, why do so many products default to the bigger key anyway?
Marketing simplicity. A bigger number reads as stronger, even when the practical difference is negligible — precisely the pitch that hospital IT team just sat through.
Compliance requirements. Some regulatory frameworks explicitly require AES-256.
Future-proofing. Data with a multi-decade shelf life benefits from a wider margin.
Minimal performance cost. On modern hardware, the overhead is often small enough that there’s little reason not to default to the larger key.
Real-World Security Problems Rarely Involve AES
The uncomfortable truth for that sales pitch: encryption is rarely the weak point.
Most breaches trace back to problems elsewhere — the same authentication and credential failures covered in password entropy:
- Weak passwords
- Credential theft
- Phishing attacks
- Vulnerable software
- Misconfigured systems
- Insecure APIs
- Excessive permissions
Switching the hospital’s system from AES-128 to AES-256 does nothing to fix any of those. An organisation running AES-256 with sloppy access controls is still exposed.
When Should You Use AES-128?
- Performance genuinely matters
- Data has a limited useful lifespan
- No compliance mandate requires AES-256
- An existing system already uses AES-128 correctly
Plenty of production systems run successfully on AES-128 today.
When Should You Use AES-256?
- Long-term confidentiality matters — patient records, for instance
- Regulation specifies it
- The data is especially sensitive
- Future-proofing is a real priority
- Government or defence workloads are involved
Is AES-256 Always Better?
No.
It offers a larger theoretical margin, but it can’t fix weak key generation, nonce reuse, an insecure mode, exposed credentials, or poor access controls.
A properly implemented AES-128-GCM system can be safer in practice than a badly implemented AES-256-CBC one — a fact that would have made the vendor’s pitch a lot less convincing.
Encryption is one layer of a larger strategy — it doesn’t replace integrity checks like checksums or trust chains like certificates.
Does AES-256 Have a Weaker Key Schedule?
AES doesn’t use the raw key directly in every round. Instead it derives a separate round key for each stage through a key schedule (key expansion). AES-128 generates 11 round keys; AES-256 generates 15, since it runs more rounds from a larger starting key.
That makes the AES-256 key schedule larger and somewhat more complex — and it has drawn extra cryptanalysis as a result.
In 2009, researchers published related-key attacks against full AES-192 and AES-256. These target an unusual scenario where an attacker can observe encryptions performed under multiple keys with specific mathematical relationships to each other.
This does not mean AES-256 is practically broken. Correctly designed systems generate independent random keys and never expose the predictable relationships these attacks depend on. The published attacks also assume computational resources and access models that don’t map onto ordinary deployments — a hospital’s cloud storage included.
The real takeaway isn’t “AES-128 is stronger.” It’s that a bigger key doesn’t automatically make every internal component simpler or immune to theoretical scrutiny. AES-256 remains NIST-approved and widely used for highly sensitive data; this line of research matters mainly to cryptographers and protocol designers, not to application teams choosing a key length.
Further reading:
- NIST FIPS 197: Advanced Encryption Standard
- Related-Key Cryptanalysis of the Full AES-192 and AES-256
Hardware Acceleration and AES Performance
Part of the AES-128 vs AES-256 performance gap comes down to rounds: 10 versus 14. In pure software, that extra work costs something.
Modern hardware narrows that gap considerably. Many Intel and AMD chips include AES-NI, dedicated instructions that accelerate encryption, decryption, and key expansion. Many ARM chips offer similar acceleration via the ARM Cryptography Extensions.
With that hardware support, both AES-128 and AES-256 hit high throughput, and the gap between them is often smaller than the cost of:
- Reading data from storage
- Transferring data over a network
- Performing authentication
- Running application logic
- Talking to a remote key-management service
That’s not a blanket statement that the difference is always zero — AES-128 can still offer a real edge in throughput or power draw for enormous encryption workloads, older processors, embedded devices, or anything without hardware acceleration. But for most desktop, server, and mobile applications, the honest move is to measure rather than assume.
Processor documentation:
Why the AES Mode Can Matter More Than Key Length
AES is a block cipher — it encrypts fixed 128-bit blocks, but doesn’t by itself decide how a whole file, disk, or network message gets protected. That’s the job of the mode of operation.
| Mode | Typical Use | Important Characteristic |
|---|---|---|
| GCM | Network traffic, APIs and application data | Provides encryption and authentication |
| CBC | Older protocols and legacy applications | Requires separate integrity protection and careful padding |
| XTS | Disk and storage encryption | Designed for storage sectors, not general messages |
| CTR | High-performance data encryption | Requires a unique counter and separate authentication |
| CCM | Embedded and wireless systems | Provides authenticated encryption |
AES-GCM
Galois/Counter Mode provides confidentiality and integrity together, generating an authentication tag that flags unauthorised tampering. This is authenticated encryption — secrecy and tamper-detection built in as one property rather than bolted on separately. It requires every nonce (IV) to stay unique under a given key; reuse can seriously undermine security even at AES-256.
AES-CBC
Cipher Block Chaining, widely used historically. CBC can be secure when implemented correctly, but it doesn’t provide integrity on its own — it needs a separate authentication mechanism plus careful handling of padding, IVs, and error responses. A poorly built AES-256-CBC system can end up less secure than a properly built AES-128-GCM one.
AES-XTS
Purpose-built for encrypting storage devices and disk sectors, preventing identical plaintext blocks in different sector positions from producing identical ciphertext. Not a general-purpose message-authentication mode — it shouldn’t stand in for GCM in network protocols or APIs.
Mode Selection in Practice
The mode governs:
- Whether tampering is detectable
- How nonces or IVs must be generated
- Whether operations can run in parallel
- Suitability for disks versus messages
- What happens if data is altered or truncated
That’s exactly why choosing the right authenticated mode — and managing its nonces correctly — often matters more for the hospital’s system than whether the key is 128 or 256 bits.
Official mode specifications:
How Major Platforms Use AES-128 and AES-256
Real systems don’t converge on one universal choice. The decision depends on the data type, compatibility needs, hardware support, and the surrounding security design.
Microsoft BitLocker
BitLocker supports AES with 128-bit or 256-bit keys in CBC or XTS mode. Current Windows device-encryption defaults generally use XTS-AES-128, with administrators able to select XTS-AES-256 via policy when compliance requires it.
Microsoft defaulting to AES-128 for everyday Windows storage is itself a signal that AES-128 is considered plenty for most use — though BitLocker’s real security also leans on the Trusted Platform Module, recovery-key handling, and device authentication.
TLS 1.3
TLS 1.3 supports cipher suites for both AES-128-GCM and AES-256-GCM:
TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
The client and server negotiate whichever suite they both support — TLS doesn’t default to the bigger number. ChaCha20-Poly1305 is also an option and can outperform AES on devices without fast AES hardware.
AWS Key Management Service
AWS KMS’s default symmetric key spec uses AES-256-GCM, with symmetric operations performed inside hardware security modules. In many AWS services, KMS protects or generates shorter-lived data-encryption keys rather than encrypting every large object directly — an example of envelope encryption, where a protected master key secures the working keys that do the actual encrypting.
iPhone and iPad
Apple’s Data Protection system generates a new 256-bit per-file key at file creation. Recent Apple hardware encrypts files using AES-256 in XTS mode with dedicated hardware support, layered with file-protection classes, device-specific hardware keys, and the Secure Enclave.
The system’s real strength comes from that whole stack, not the AES key length alone.
Android
The standard AOSP file-based encryption configuration uses:
- AES-256-XTS for file contents
- AES-256-CBC-CTS for file names
Android can substitute Adiantum on devices where AES hardware acceleration isn’t available or suitable. As with Apple, Android’s real security depends on key derivation, hardware-backed key protection, user authentication, and filesystem design — not the cipher choice in isolation.
OpenSSL
OpenSSL supports both AES-128 and AES-256 across TLS and its general cryptographic APIs. For TLS 1.3, applications commonly enable both AES-128-GCM and AES-256-GCM suites alongside ChaCha20-Poly1305 — the final choice depends on OpenSSL version, application config, peer support, and negotiation order.
OpenSSL doesn’t enforce “AES-256 always wins.” It offers secure options at both key lengths and leaves the choice to the protocol or application.
What Does NIST Recommend?
NIST defines AES in FIPS 197, specifying three permitted key lengths — AES-128, AES-192, AES-256 — without describing AES-128 as obsolete or insecure. All three remain part of the standard.
NIST also publishes separate guidance on modes of operation and key management, because selecting AES-256 alone doesn’t guarantee a secure implementation. A real deployment — the hospital’s included — still has to get right:
- Approved modes of operation
- Secure random-key generation
- Nonce and IV requirements
- Key storage
- Key rotation
- Authentication
- Cryptographic module validation
- Appropriate security strength for the required protection period
Useful NIST documents:
- FIPS 197: Advanced Encryption Standard
- SP 800-38A: Confidentiality Modes
- SP 800-38D: GCM and GMAC
- SP 800-38E: XTS-AES
- SP 800-131A: Transitioning Cryptographic Algorithms and Key Lengths
Compliance always needs a separate check — a regulation, a customer contract, or internal policy may mandate AES-256 even where AES-128 would be technically sufficient. For a hospital handling patient data, that compliance layer (HIPAA and related frameworks) often ends up the deciding factor anyway.
Which Should You Choose?
flowchart TD
A[Do regulations or customer requirements mandate AES-256?] -->|Yes| B[Use AES-256]
A -->|No| C[Must the data remain confidential for decades?]
C -->|Yes| B
C -->|No| D[Is this an existing secure AES-128 system?]
D -->|Yes| E[Keep AES-128 unless there is another reason to migrate]
D -->|No| F[Does performance or power usage matter at very high scale?]
F -->|Yes| G[Benchmark AES-128 and AES-256 on the target hardware]
F -->|No| H[Use the secure default provided by the platform]
G --> I{Is AES-256 overhead material?}
I -->|Yes| J[Use AES-128 if permitted by the threat model]
I -->|No| B
B --> K[Use an appropriate authenticated mode and protect the keys]
E --> K
H --> K
J --> K
A practical rule:
- Choose AES-256 when it’s required, when long-term confidentiality genuinely matters — patient records again — or when the overhead is negligible.
- Choose AES-128 when it’s the platform’s secure default, when performance matters, or when an existing correct implementation already uses it.
- Either way, lean on a well-reviewed library and the right mode rather than implementing AES by hand.
Frequently Asked Questions
Is AES-128 less secure than AES-256?
It has a smaller key space and a smaller theoretical margin — but no practical brute-force attack against correctly implemented AES-128 currently exists. Its real-world margin remains enormous.
Is AES-128 crackable?
Theoretically, since a finite number of keys exist. Practically, exhausting all 2^128 possibilities is beyond any realistic computing capability. Attackers go after passwords, key storage, application flaws, or implementation mistakes long before they’d ever attempt this.
Has AES-256 ever been broken?
Researchers have published theoretical and related-key attacks against AES-256, but none offer a practical way to break ordinary AES-256 encryption — they rely on unusual assumptions, huge resource requirements, or reduced-round variants that aren’t the full standard algorithm.
Is AES-256 always better than AES-128?
No. It provides a larger theoretical margin, but that margin can’t fix weak key generation, nonce reuse, insecure modes, exposed credentials, or poor access control. A properly implemented AES-128-GCM system can beat a badly implemented AES-256-CBC one.
Is AES-256 slower than AES-128?
Usually, since it runs 14 rounds instead of 10. The gap is often small on hardware with AES acceleration, though it can still be measurable in high-throughput, power-constrained, or software-only environments.
Does AES-256 protect against quantum computers?
It offers a larger margin against theoretical quantum search (Grover’s algorithm is often cited as cutting AES-256’s effective strength to roughly 128 bits) — but that’s a simplified comparison, not evidence that a practical quantum attack against AES exists today.
Which AES version is used by banks?
No single configuration applies across every bank. Financial institutions use AES-128 or AES-256 depending on system, protocol, hardware, vendor, and compliance needs — with key management, authentication, and monitoring mattering at least as much as the key length itself.
Does TLS use AES-128 or AES-256?
Either. TLS 1.3 defines standard cipher suites for both AES-128-GCM and AES-256-GCM, and client and server negotiate whichever they mutually support.
Should password managers use AES-256?
It’s common, but key derivation and vault design usually matter more than 128 versus 256. A strong password manager needs a proper password-based key derivation function, authenticated encryption, secure randomness, and careful key handling.
Is AES-GCM better than AES-CBC?
For new general-purpose work, usually yes — GCM provides authenticated encryption out of the box. CBC can still be secure paired with correct authentication, but it’s easier to misuse, and existing protocols shouldn’t be modified casually.
Can I change an existing system from AES-128 to AES-256?
Usually, but it may require re-encrypting existing data, rotating keys, updating configuration, and confirming compatibility across every component. A migration should be justified by a real requirement — changing key length while ignoring key storage, access controls, and implementation quality delivers little practical benefit.
Platform behaviour described above reflects current implementations, not permanent guarantees — defaults shift between software and hardware versions over time.
Conclusion
AES-128 and AES-256 are both exceptionally strong, widely trusted encryption algorithms.
AES-256 offers a bigger key, more rounds, and a larger security margin against future threats. AES-128 offers excellent security with a slight performance edge.
For most applications — including that hospital’s patient-record system — either one provides more protection than any realistic attacker will ever need to overcome; the actual failures tend to come from misused systems, weak credentials, or operational gaps, not the cipher itself.
The real decision usually comes down to compliance requirements, long-term confidentiality needs, and organisational risk tolerance — not some hidden weakness in AES-128 that a sales deck implied but never quite explained.
Most organisations will get far more security from tightening authentication, access controls, patching, and monitoring than from debating whether the number after “AES-” is 128 or 256.





