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

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 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:

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

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