KWC core: the seven classes
Layer 1 of the Key Weakness Classification (KWC), version 0.1 (draft). No measure, formula or cost model is needed to read it. All class names are proposed terms, not standard ones.
An earlier layer never requires a later one:
| Layer | Content | Read | For |
|---|---|---|---|
| 1 | The seven classes, in words, with examples | This page | Engineers, auditors, scanner authors, responders |
| 2 | Evidence levels, disposition rules, report format | Decision guide, examples, schema | Operational security, risk management |
| 3 | Structural advantage, prevalence, attack cost, definitions | Membership criteria Part I, the paper, the experiments | Cryptographers, researchers |
Where this page and the membership criteria differ, the criteria are right: this page restates them.
The principle
Classify the weakness, not the key. A finding describes a weakness: where it lies, which security goal it affects, and against what attacker. The key's value alone gives none of these, so "this key is weak" is not a finding.
Three rules hold for every class:
- A key can be in several classes at once. Never force a key into exactly one.
- The class, the strength of the evidence, and what to do with the key are three separate answers.
- Finding a bad key says what is wrong with that key. It does not by itself say what caused it.
The classes
| Code | Name | Where the weakness lies |
|---|---|---|
| A1 | Primitive-weak key | The cipher or MAC, under this key |
| A2 | Problem-instance-weak key | The mathematical problem the key creates |
| B1 | Low-guesswork key | A named search that reaches the key early |
| B2 | Predictably generated key | The process that produced the key |
| C1 | Relationally vulnerable key | Other keys, protocol runs or leaked data |
| C2 | Compromised key | Who knows or controls the key |
| C3 | Policy-inadequate key | A named rule the key fails |
| - | Invalid key | Not an admissible key at all |
A1 Primitive-weak key
Under this key the cipher or MAC itself behaves in a special way that an attacker can use.
- Example: a DES weak key. Encrypting twice with it returns the plaintext.
- It is not: a key that only looks simple. An all-zero AES key is not A1; no attack on AES treats it differently from any other key.
A2 Problem-instance-weak key
The public problem that protects the key (factoring this modulus, finding this discrete logarithm) is easier than it should be, because of a known attack on a kind of instance named in advance.
- Examples: an RSA modulus whose two primes are close together; an RSA modulus with the ROCA structure; an elliptic-curve private key known to lie in a small range.
- It is not: a key that is merely too short. If the ordinary attack works on every key of that size, the finding is C3.
B1 Low-guesswork key
A search that someone names, and that was run or is used by a known tool, reaches this key within its budget.
- Examples: an all-zero AES key against a tool that tries zero first; the private key 4 against a search that counts upward.
- It is not: a defect in the cipher or in the generator. Some order reaches every key early, so B1 always names the search.
B2 Predictably generated key
The process that produced the key, or put it in place, is predictable or biased beyond what the key's use allows. This includes copying a public value, choosing a bad value on purpose, and giving many devices the same key when each should have its own.
- Examples: keys from the Debian OpenSSL generator of 2006 to 2008; a private key copied from documentation; one firmware key shared by every device of a model.
- It is not: something one odd-looking key proves. It is judged from knowledge of the process, never from the public key alone.
C1 Relationally vulnerable key
The key is safe when looked at alone and unsafe together with something outside it: another key, another run of the protocol, a leaked helper value.
- Examples: two RSA moduli that share a prime; an ECDSA key whose signatures used biased nonces; an AES-GCM key used twice with the same nonce.
- It is not: an attack that needs only this key's own public data. That is A2.
C2 Compromised key
Someone who is not authorized knows the key, has had access to it, or has replaced or misused it.
- Examples: a private key committed to a public repository; a key that an outside scanner recovered.
- It is not: a key that could be attacked but has not been, nor a key recovered by its owner's own auditor.
C3 Policy-inadequate key
The key, or the way it is used, fails a rule of a named policy and version.
- Examples: an RSA-1024 key under the CA/Browser Forum requirements; any DES key after the standard was withdrawn.
- It is not: a statement that the key can be attacked. It is a statement about the rule.
Invalid key
The value is not an admissible key under the specification, for example an elliptic-curve private scalar of 0. It is rejected as invalid and sits outside the seven classes.
One key, several classes
The private key 4 on the curve P-384, which started this project, is in four classes at once, and each says something different:
| Class | What it says about this key |
|---|---|
| A2 | A known attack finds any key in a small range quickly |
| B1 | A search that counts upward reaches it on the fourth try |
| B2 | Several of the CA's keys were byte-sized, which a correct generator would almost never produce |
| C2 | An outside researcher recovered it, so it is known to an outsider |
A2 and B1 depend on 4 lying in a small range and early in an upward count, which any small value shares. B2 and C2 do not depend on the value at all.
Next
- To grade the evidence, decide what to do with a key, or write a report: layer 2, the decision guide.
- For the definitions and measures behind the classes: layer 3, the membership criteria.