Definition
Key compromise impersonation (KCI) is an attack in which an attacker who has stolen one party’s long-term secret key, say Alice’s, uses it to impersonate a different party, say Bob, to Alice. Stealing Alice’s key always lets the attacker pose as Alice; KCI is the further damage of posing as others to Alice. A protocol is KCI-resistant when Alice’s key alone does not let anyone convince Alice that the other party is Bob. KCI resistance is a property of a whole authentication §1.6 or key-exchange protocol, not of one algorithm §14.1.
The idea
A device’s long-term key §7.28, the secret it keeps for years to prove its identity, is read out through its debug port, and the device stays in service. Everyone expects the attacker to pose as the device to its server. The KCI question is the reverse direction: can the attacker now pose as the server to the device and send commands that the device obeys? If it can, the extraction leaked more than the device’s identity; it handed over control of the device.
The answer depends on what Alice checks when authenticating Bob, and on whether Alice’s own secret suffices to produce it. With a key that Alice and Bob share, Alice can compute everything Bob can, so an attacker with Alice’s copy can produce anything Bob could: shared-key protocols cannot resist KCI. With digital signatures §5.14, Alice checks Bob’s signature with Bob’s public key, and producing that signature needs Bob’s private key, which Alice never had. Some public-key protocols sit in between, and that is where KCI appears unexpectedly.
How it works
Determine KCI exposure in three steps.
For each receiver, write down what it checks before accepting a peer: a message authentication code §5.7 (MAC) under a shared key, a signature under the peer’s public key, or a value computed from a Diffie–Hellman §19.1.4 secret.
For each check, list which secrets suffice to produce an answer that the receiver accepts.
For each single stolen key, mark every check that the key alone lets the attacker pass, and note whom the receiver then believes it is talking to.
Static Diffie–Hellman authentication shows how a public-key protocol can fail. Alice has a long-term private value and public value ; Bob has and ; is a public generator, and all arithmetic is modulo a public prime , meaning that only the remainder after division by is kept. Alice and Bob share the static secret , which Alice computes as and Bob as . If Bob authenticates to Alice with a MAC under a key derived from , then anyone holding computes and that MAC: Alice’s key reproduces Bob’s proof. A protocol that also mixes fresh per-session values into the key fails in the same way if the attacker can compute every input to the key from Alice’s private value, public data and values the attacker chooses itself.
A key shared by a whole group of devices is KCI in its widest form: stealing it from any one member lets the attacker pose as any member to any other.
Worked example
Use the toy group of the numbers 1 to 22 multiplied modulo the prime , with generator ; real groups are far larger. Alice’s long-term private value is , so , because . Bob’s is . By repeated squaring, , and , where means equal after reduction modulo 23, so , that is . Their static secret is ; since , , so .
In the protocol, Alice sends a fresh challenge, and Bob answers with a MAC over the challenge and Bob’s name, under a key derived from . The attacker steals from Alice. From Bob’s public value it computes , derives the same MAC key, and answers Alice’s next challenge. Alice’s check passes, and Alice believes that the other party is Bob. The attacker never touched Bob or Bob’s secret .
If Bob instead answers with a digital signature over Alice’s challenge, made with Bob’s own signing key, Alice’s private value does not help: producing Bob’s signature requires Bob’s private signing key.
The table shows what Alice’s stolen key allows under three designs, each design used in both directions.
| How each party proves itself | Pose as Alice to Bob | Pose as Bob to Alice (KCI) |
|---|---|---|
| Shared key | yes | yes |
| Static Diffie–Hellman secret | yes | yes |
| Signature over a fresh challenge | yes | no |
Stated precisely
Formal models of authenticated key exchange §19.1.6, such as the extended Canetti–Krawczyk (eCK) model, include KCI among the attacker’s powers. The experiment lets the attacker obtain the long-term secret key of party . The attacker wins if completes a session that believes is with party , while ’s long-term key has not been revealed and took part in no matching session; in the key-secrecy version it also wins if it learns the key of such a session. The protocol resists KCI if every feasible attacker wins with only negligible probability: a probability that, as the key length grows, falls faster than one divided by any polynomial in the key length.
The experiment rests on three assumptions.
Only ’s long-term key leaks: ’s software still runs correctly, and ’s ephemeral secrets for the target session stay hidden.
’s long-term key is not revealed.
The primitives hold: signatures cannot be forged, and the Diffie–Hellman problem §19.1.3 is hard.
A practical form of the same condition is the impersonation table. For every single key and every ordered pair of parties , ask whether alone lets the attacker make accept a message as coming from . Stealing ’s key always marks every row with claimed sender . A KCI weakness is any marked row in which holds and .
Limits and common mistakes
Direction labels do not give KCI resistance. A field such as from-Bob inside a MAC-protected message stops a message from being reflected back or accepted in the wrong role, but an attacker who holds the shared key writes any label it likes.
KCI resistance assumes that only the key leaked. If the attacker controls Alice’s device, it can make Alice’s software accept anything, and no protocol property helps.
Using signatures somewhere is not enough. A protocol can contain signatures and still be KCI-vulnerable if what Alice actually checks before accepting Bob can be computed from Alice’s key, for example a value derived from the static secret . Every check must be traced.
KCI resistance does not limit the obvious damage: with Alice’s key, the attacker still poses as Alice to everyone. Alice’s key must be revoked and replaced.
With shared symmetric keys the remedy is containment, not resistance. Give each pair of parties its own key, so that a stolen key exposes one pair, instead of one key for a whole group, which exposes every member to every other.
Questions answered
Whom can the attacker impersonate after each individual key compromise?
The answer depends on what each receiver checks, so it is a table with one row per stolen key. Stealing a party’s long-term key always lets the attacker impersonate that party to everyone who accepts that key. Key compromise impersonation (KCI) asks the further question: whom can the attacker impersonate to the victim whose key was stolen?
With a key shared by Alice and Bob, stealing Alice’s copy lets the attacker pose as Alice to Bob and as Bob to Alice, because both sides check the same key.
With a key shared by a group of devices, stealing it from one device lets the attacker pose as any member to any other member.
With static Diffie–Hellman authentication, Alice’s private key lets the attacker compute Alice’s static shared secret with every peer whose public value it knows, so it can pose as each of those peers to Alice.
With signatures over fresh challenges, each party proves itself with its own private key, so Alice’s key lets the attacker pose only as Alice.
KCI-resistant protocols use the last design, but the whole protocol must still be checked, because one check that Alice’s key can satisfy is enough to reopen the weakness.
Related entries: Symmetric versus asymmetric cryptography (§5.15), Proof of possession (§5.30), Post-compromise security (§5.34), Digital signature (§5.14), Authenticated key exchange and transcript binding (§19.1.6).