Decision guide
Layer 2 of the Key Weakness Classification. Turns the criteria in classification into a question
sequence that produces a report in the format of
report-schema.yaml. Worked cases are in examples/ and are
checked by tools/check_reports.py.
This is layer 2 of KWC. Layer 1, the classes in words, is core.md.
Classes are nonexclusive: answer every question; do not stop at the first match.
Contents
- Step 0. Identify the secret
- Steps 1 to 8. Questions
- Step 9. Descriptors
- Step 10. Evidence
- Step 11. Disposition
- Wording rules
- Worked cases
Step 0. Identify the secret
Name the secret under analysis and its role: long-term, ephemeral, nonce,
seed, generator-state. If the defect may lie in an auxiliary secret (a nonce,
a seed), run this guide on that secret as well and link the reports
(auxiliary-secret rule, classification I.5). A repeated or predictable secret
value (ECDSA nonce) is B2 whether by fault or by design. A repeated public value
that only has to be unique (AEAD nonce) gets no report: the key is C1,
subtype cross-execution.
Steps 1 to 8. Questions
| Step | Question | If yes | Record |
|---|---|---|---|
| 1 | Does the value or its encoding fail the specification's admissibility rules? | validity: invalid; continue for handling flaws |
Rule violated |
| 2 | Is there a declared attack (subset and algorithm fixed before the target is seen) that covers this key and beats both listing its subset and the generic attack? | A, Route 1. A1 if the attack uses oracle access to the keyed map; A2 if it uses a public instance derived from the key | Objective, subset, algorithm, full cost (precomputation, memory), \(\rho\), mass |
| 3 | Does the keyed map satisfy a relation \(\Phi\), stated on maps, that holds for more keys than in an ideal cipher or function, by a stated excess beyond chance, and that an adversary can exploit using the relation alone? | A, Route 2 (A1 or A2 as in step 2) | Objective, \(\Phi\), key model, queries, \(\kappa\), \(\delta_\Phi\), mass |
| 4 | Does the report name a search strategy (one that was run, or that a named tool or party uses) that reaches the key within its budget? That some order would reach it is not enough. | B1 | Strategy, budget |
| 5 | Is there evidence that the generating process is predictable from information about the process itself (seeds, state, other outputs) beyond what \(\lambda\) allows, or leaves a bias that a known attack exploits within budget? The key's own public key does not count. | B2 | \(\lambda\), mechanism, root cause, evidence for the cause |
| Bias detected but no \(\lambda\) shortfall and no known attack within budget? | Not B2; descriptor generator_fingerprint |
Fingerprint | |
| 6 | Does data from outside this instance (other keys, other executions, auxiliary secrets, side channels, a related-key oracle) clearly raise the attack's success? | C1 | Objective, subtype, observations, class of the auxiliary secret |
| 7 | Is the key known to, or has it been accessed, substituted, or misused by, a party outside the authorized set? This includes recovery by a detector outside the authorized set and inclusion in a public list of private keys. | C2 | Mode, party, history |
| 8 | Does the key or its use fail a named policy rule? | C3 | Policy, version, rule, whether it mandates rejection |
Disambiguation, by step:
- Step 2, margin. The advantage must grow with the subset size, at a cited rate. For a fixed parameter set with no family, require \(\sigma\ge\sigma_{\min}\), declared by the policy in advance; the default is 16 bits.
- Step 2 and precomputation. A table of the subset built in advance is listing: count its cost, or give the baseline the same table.
- Step 2 vs 4. Step 2 needs structure that beats listing the subset. A subset that is merely tried first is step 4 only. Small ECC scalars are both: interval discrete log (step 2) and ascending search (step 4).
- Step 2 vs 6. Only the instance's own public data or oracle: step 2. Anything from another instance or execution: step 6. Close primes are step 2; a shared prime is step 6.
- Step 2 vs 8. A policy threshold that encodes an attack (close primes within 100 Fermat rounds) is step 8. Record step 2 as well only if the attack actually succeeded.
- Step 3, excess. Report \(\kappa\) and \(\delta_\Phi\). A \(\kappa\) just above 1 is not an excess: half of all ideal families show one.
- Step 3, objective. The relation itself gives
dist. Recordconf,forgeorreconly with the setting of use that gives it (mode or protocol, what the adversary can query, who chooses inputs), and mark it feasible only if that is this key's deployment. An involution key isconfin output feedback mode anddistwhere no setting of use is stated. Report no \(\rho\) for an objective other thanrec. - Step 3, small class. If the key's membership is at credible or above and the class can be listed within the budget, set
listing_feasiblewith the class size. Rule 2 then applies; the objective stays as it is. - Step 5, one key. One key in a subset named before looking supports the B2 effect at
indicated, and only if the chance of such a match under correct generation is stated and small and the generator is not audited. An audited generator gives no B2. The cause stays unknown orhypothesizedwithout evidence about the process; see step 10. - Step 7, published values. A published value is C2 only if an outsider can link it to this key without guessing (a private key for this public key, a product's default key). A symmetric key that equals a test vector is not C2.
- Step 7 without recovery. A feasible attack nobody has run is not C2, and neither is recovery by an authorized tester. Both still trigger disposition rule 2 (step 11).
Step 9. Descriptors
Record when relevant; descriptors never make a key vulnerable on their own:
bit length and encoding width, self-information under a stated \(D\), description
complexity (or a compressor proxy), generator fingerprint, computational
accessibility (least known cost against a stated budget). Write a budget as a
number with its unit, or name a profile: commodity is \(2^{64}\) operations,
well-resourced is \(2^{80}\) (conventions, classification II.3). For bit length
a byte-string key is read as a big-endian unsigned integer.
Step 10. Evidence
Give every finding an evidence level for its effect, and B2 findings a separate
level for the cause. For a group A or C1 finding the level is the weaker of two
claims: the attack works as stated, and it covers this key. Levels: unknown, hypothesized, indicated, credible,
demonstrated (classification II.1).
| Situation | Level |
|---|---|
| Pattern noticed after looking at the data | hypothesized, until tested on fresh data |
| Positive predeclared test or list match | the match is demonstrated; any cause beyond the list's provenance at most indicated |
| Strong evidence under a stated model, alternatives weighed | credible |
| Key recovered, factor found, defect located in code, firmware or image, or reproduced | demonstrated |
| Cause stated by the responsible party (vendor documentation, vendor confirmation) | credible |
| Cause claimed by someone else, unverified | at most indicated |
| Group A or C1: effect shown on this key (key recovered, forgery produced, relation checked) | demonstrated |
| Group A or C1: attack proved in a reviewed publication or reproduced, and coverage shown by a predeclared test with a stated error rate or stated by the responsible party | credible |
| Group A or C1: attack unreviewed and unreproduced, cost extrapolated beyond the sizes reproduced, or coverage only asserted | at most indicated |
| Group A or C1: stronger objective deduced from the setting of use, not shown | at most credible |
| Private key said to be public: checked against this public key | demonstrated |
| Private key said to be public: full-key match against a maintained list of private keys | credible |
| Private key said to be public: no artifact, or a truncated identifier | at most indicated |
| Clean scan | no level; record checks run |
Step 11. Disposition
Apply in order; the first match decides the action.
┌─────────────────────────────────────────────┐ ┌──────────────────────┐
│ 0 Key invalid under the specification? ├─yes──►│ reject as invalid │
└──────────────────────┬──────────────────────┘ └──────────────────────┘
│ no
▼
┌─────────────────────────────────────────────┐ ┌──────────────────────┐
│ 1 C2 at credible or above? ├─yes──►│ treat as compromised │
└──────────────────────┬──────────────────────┘ └──────────────────────┘
│ no
▼
┌─────────────────────────────────────────────┐ ┌──────────────────────┐
│ 2 Recovery demonstrated (any class); A or ├─yes──►│ treat as compromised │
│ C1 credible or above with a feasible │ └──────────────────────┘
│ attack; or A class listable in budget? │
└──────────────────────┬──────────────────────┘
│ no
▼
┌─────────────────────────────────────────────┐ ┌──────────────────────┐
│ 3 B2 at credible or above, effect ├─yes──►│ treat as compromised │
│ or cause, with a λ shortfall? │ └──────────────────────┘
└──────────────────────┬──────────────────────┘
│ no
▼
┌─────────────────────────────────────────────┐ ┌──────────────────────┐
│ 4 C3 rule mandates rejection? ├─yes──►│ reject by policy │
└──────────────────────┬──────────────────────┘ └──────────────────────┘
│ no
▼
┌─────────────────────────────────────────────┐ ┌──────────────────────┐
│ 5 Any finding, or B2 cause, ├─yes──►│ investigate │
│ at indicated or above? │ └──────────────────────┘
└──────────────────────┬──────────────────────┘
│ no
▼
┌───────────┐
│ no action │
└───────────┘
The same rules as a table:
| Rule | Condition | Action |
|---|---|---|
| 0 | validity: invalid |
reject-invalid |
| 1 | C2 at credible or above | treat-as-compromised |
| 2 | Recovery demonstrated with adversary-accessible information (A, C1, or a B1 strategy that found the key); or A or C1 at credible or above with rec, forge or conf feasible; or group A at credible or above with listing_feasible |
treat-as-compromised |
| 3 | B2 at credible or above (cause or effect) with a \(\lambda\) shortfall | treat-as-compromised |
| 4 | C3 rule that mandates rejection | reject-by-policy |
| 5 | Any finding at indicated or above, counting a B2 cause level | investigate |
| 6 | Otherwise | none |
Notes on rules 2 and 5:
- B1 strategy that found the key. Set
strategy.recovered: true. The class stays B1, and rule 2 applies because any adversary can repeat the guess. If an outside party ran it, C2 applies as well and rule 1 decides. - B1 without a recovery. Rule 5. A hit under a predeclared strategy is a reason to check the generator for B2;
investigateasserts no defect. demonstratedon arecfinding in group A or C1 means the recovery was carried out on this key.feasible. Mark an attack feasible only if it works against this key, in its actual setting of use, within the budget and with success above the generic bound. The flag counts for rule 2 only on a finding at credible or above. A distinguisher alone never fires rule 2.- Generic bound. What the same budget achieves without the finding: the generic attack for
rec; fordist,forgeandconf, the advantage against the ideal counterpart of the construction in the same setting of use. - Budget. A cost equal to the budget is within it. Use
commodityunless the report says why a larger attacker is assumed.
treat-as-compromised means reject at issuance, revoke, replace. Under the
CA/Browser Forum Baseline Requirements [R23] rules 1 to 3 all map to CRLReason
keyCompromise.
Wording rules
- Name the class with its parameters: "A2[rec], interval \([1,2^8)\), BSGS, \(\rho\approx2^4\)", not "weak".
- "Weak key" only for A1 or A2, with the objective.
- "Vulnerable key" only for a finding at credible or above in A1, A2, B2, C1 or C2. For anything broader write "key finding".
- Costs are best known classical costs. Write "no faster attack is known", never "cannot be attacked faster".
- Entropy describes the generator, never one key. Write "high self-information under uniform selection".
- A clean scan: "checks X, Y, Z did not fire". Never "the key is secure".
Worked cases
Each file in examples/ is one report. tools/check_reports.py validates them
against report-schema.yaml, recomputes the disposition, and compares the class
labels (with objective) and disposition with this table.
| File | Case | Classes | Disposition |
|---|---|---|---|
emudhra-p384.yaml |
P-384 issuing key, scalar 4 | A2[rec], B1, B2, C2 | treat-as-compromised |
rsa-close-primes.yaml |
Fermat-factorable modulus | A2[rec], B2, C2, C3 | treat-as-compromised |
rsa-shared-prime.yaml |
Modulus sharing a prime | C1[rec], B2, C2 | treat-as-compromised |
aes-all-zero.yaml |
Uniform AES key that is all zero | B1 | treat-as-compromised |
constant-generator.yaml |
Firmware constant key | B2, C2 | treat-as-compromised |
shared-device-key.yaml |
One key on every device, not extracted | B2, C2 | treat-as-compromised |
aead-nonce-reuse.yaml |
AES-GCM key with a repeated nonce | C1[forge] | treat-as-compromised |
roca.yaml |
ROCA-structured modulus | A2[rec], B2 | treat-as-compromised |
rsa-1024.yaml |
Obsolete key length | C3 | reject-by-policy |
debian-openssl.yaml |
Debian OpenSSL generated key | B2, C2 | treat-as-compromised |
ecdsa-biased-nonce-key.yaml |
Long-term key via biased nonces | C1[rec], C2 | treat-as-compromised |
ecdsa-biased-nonce.yaml |
The nonces themselves | B2 | treat-as-compromised |
published-key.yaml |
Key copied from public example code | B2, C2 | treat-as-compromised |
leaked-key.yaml |
Correctly generated key, leaked later | C2 | treat-as-compromised |
des-weak-key.yaml |
DES weak key | A1[dist], B2, C3 | treat-as-compromised |
polymac-subset.yaml |
Polynomial-MAC pervasive class | A1[forge] | investigate |