Infrastructure declares a symmetric key or hash below the post-quantum baseline
ID |
pqc_weak_keylength |
Severity |
info |
Remediation Complexity |
medium |
Remediation Risk |
low |
Remediation Effort |
medium |
Vendor |
All |
Resource |
Encryption |
Tags |
ASVS50:v11.3.1, CWE:326, NIST.IR.8547, crypto, pqc, quantum |
Description
Grover’s algorithm halves the effective brute-force security of a symmetric key and weakens the preimage resistance of a hash. AES-128 therefore offers about 64 bits of post-quantum security, and SHA-256 about 128 — fine against a classical attacker, short of the NSA CNSA 2.0 baseline of AES-256 and SHA-384.
Unlike the Shor axis, this is hardenable in place: the same algorithm with a larger size restores the margin. That is why it is a separate rule from pqc_readiness, whose findings need a different algorithm entirely.
A key that is also brute-forceable by a classical attacker — a suite naming DES, a managed key spec of 64 bits — is reported here as well, and the finding says it is both. The remediation is the same one this rule always gives, and no other rule gives it: for a symmetric cipher, a longer key really is the fix. A classically broken cipher whose key is long enough that only Grover threatens it (RC4, 3DES at 168 bits) stays with the weak-cipher rules.
The detector reads the sizes the infrastructure actually declares — a cipher suite that writes AES_128, an at-rest algorithm that names its size, a managed key whose size sits in a sibling attribute (azurerm_key_vault_key.key_size, ARM keySize) beside the key type — and never judges a key size the template did not state. A hash is different: it has no key size to declare, its strength is its output size, and that the algorithm itself fixes, so SHA256 in a suite is judged wherever it is named. The baselines are configurable through minPqcStrength, and they are the same property and the same defaults the code-side pqc_weak_keylength rules use.
Examples
Kubernetes
apiVersion: v1
kind: Pod
metadata:
name: kube-apiserver
spec:
containers:
- command:
- kube-apiserver
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (1)
name: kube-apiserver
| 1 | The suite states 128-bit AES, half the post-quantum baseline. |
The hash axis is judged the same way, and a suite can fail on it alone:
apiVersion: v1
kind: Pod
metadata:
name: kube-apiserver
spec:
containers:
- command:
- kube-apiserver
- --tls-cipher-suites=TLS_CHACHA20_POLY1305_SHA256 (1)
name: kube-apiserver
| 1 | A 256-bit cipher, but a 256-bit hash: SHA-256 offers about 128 bits of preimage resistance against Grover’s algorithm, below the SHA-384 baseline. |
Terraform
A managed key names the family in one attribute and the size in another; neither can be judged on its own.
resource "azurerm_key_vault_key" "envelope" {
name = "envelope"
key_type = "oct"
key_size = 128 (1)
}
| 1 | A 128-bit symmetric key: about 64 bits of post-quantum security. A key type that states no size is not judged at all — nothing may supply a size the template did not write. |
Mitigation / Fix
Buildtime
Raise the size; the algorithm does not have to change.
apiVersion: v1
kind: Pod
metadata:
name: kube-apiserver
spec:
containers:
- command:
- kube-apiserver
- --tls-cipher-suites=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 # FIXED
name: kube-apiserver
Set minPqcStrength on the detector to follow a different baseline (for example symmetric/128 while a migration is planned), and keep it identical to the value the code-side rules use — a project that disagrees with itself about the baseline reports contradictory findings for the same algorithm.