Section 5.42

Key confirmation versus application confirmation

Definition

Key confirmation is a step in which one party proves to another that it holds a particular key, typically by computing a message authentication code §5.7 (MAC) with that key over fresh values from the current exchange. Application confirmation is evidence that a change works in the service itself: a real operation, sent through the normal path under the new key and settings, was accepted and did its job. Key confirmation shows that the key exists at the other end; application confirmation shows that the system still works with it.

The idea

A manager performs a key rotation §5.29, replacing the key that authenticates its commands to a remote device with a new one. It sends the new key, the device stores it, and the device proves that it holds the new key by answering a challenge. The manager then destroys the old key. But the device’s command handler still checks commands against the old key, or a new access rule delivered with the key rejects the manager’s commands. The proof was true, and the device is now unreachable: every command under the new key is rejected, and the old key no longer exists. Recovery needs someone to travel to the device.

A new house key that turns in a lock on the locksmith’s bench fits that lock; it is not yet known to open your front door. Before throwing away the old key, you try the new one in the front door. Application confirmation is trying the front door. The picture stops in one respect: a protocol keeps the old key usable not by someone remembering to hold on to it, but by a rule that returns the device to the old key automatically if confirmation does not arrive in time.

How it works

Key confirmation. NIST Special Publication 800-56A, the United States recommendation for key agreement between two parties, defines key confirmation as a procedure that gives one party, the recipient, assurance that another party, the provider, holds the correct shared secret or the keying material derived from it. The provider computes a MAC, with a MAC key taken from the newly derived keying material, over a message made of a fixed label, both parties’ identifiers, and the fresh public values each side contributed to this exchange. The recipient computes the same MAC and compares. Covering both identifiers and the fresh values stops an old proof from being replayed or redirected to another party. The Finished messages of TLS (Transport Layer Security) are key confirmation in both directions, and proof of possession §5.30 is the general name for showing that one holds a key without revealing it.

Application confirmation. The deployment decides which condition shows that a change worked, and then tests exactly that condition through the path that real traffic uses.

  1. Choose a harmless operation that passes through the same dispatch, authorization §1.7 and state as the operations the system cannot do without, for example a status read through the normal management command handler.

  2. Send it under the new key and the new settings.

  3. Require a response that only the new state could produce, such as a status report, authenticated under the new key, that names the new key’s epoch, a number that increases with each key change.

  4. Treat anything else, silence included, as failure.

Commit only after application confirmation. The two kinds of confirmation fit into one safe sequence.

  1. Stage: the device stores the new key next to the old one, and the old key stays active.

  2. Confirm the key: the device proves that it holds the new key.

  3. Activate tentatively: the device switches to the new key and starts a timer.

  4. Confirm the application: the manager sends a real operation through the normal path under the new key and checks the response.

  5. Commit: on success, the manager tells the device to make the change permanent, the device records it in persistent storage, and only then is the old key destroyed.

  6. Revert: if no commit arrives before the timer expires, the device returns to the old key by itself.

This pattern is a commit-confirmed update §8.23. Juniper’s Junos router operating system applies it to configuration: its commit confirmed command rolls a change back unless the change is confirmed within a set time. MCUboot, an open-source bootloader §6.30 for microcontrollers §6.1, applies it to firmware: a new image boots first as a test, and at the next restart the bootloader returns to the old image unless the new image has marked itself confirmed.

Worked example

A manager rotates the key for device DD from K0K_0 to K1K_1. By mistake, the device’s management handler accepts commands only under K0K_0. The revert timer is 600 seconds.

  1. At t=0t = 0 s, the manager sends K1K_1, protected under K0K_0, and the device stages K1K_1.

  2. At t=2t = 2 s, the manager sends the fresh 8-byte challenge 5A17C3E9014B66D2. The device returns the MAC under K1K_1 of a fixed label, its identifier and the challenge. The manager computes the same MAC, and the values match: key confirmation succeeds.

  3. At t=3t = 3 s, the device activates K1K_1 tentatively and starts the timer.

  4. At t=4t = 4 s, the manager sends a status read under K1K_1. The handler checks it against K0K_0, rejects it and sends nothing back: application confirmation fails, so the manager sends no commit.

  5. At t=3+600=603t = 3 + 600 = 603 s, the timer expires without a commit, and the device returns to K0K_0.

  6. At t=610t = 610 s, the manager reaches the device under K0K_0, finds the misconfigured handler and repairs it.

Had the manager treated the key confirmation at t=2t = 2 s as success and destroyed K0K_0, every later command would fail: under K1K_1 the handler rejects it, and the manager no longer has K0K_0. The device would stay unreachable until someone reached it physically. The key-confirmation result was true in both versions of the story; only the decision drawn from it differed.

Stated precisely

Treat the stages of a key change as separate facts, each with its own evidence. Let S0S_0 be the old state and S1S_1 the new state, meaning the new key K1K_1 together with the settings that come with it.

If the response to the confirming operation is authenticated under K1K_1 and bound to the fresh request, then AC(S1)\mathrm{AC}(S_1) implies KC(K1)\mathrm{KC}(K_1). The converse fails: KC(K1)\mathrm{KC}(K_1) does not imply AC(S1)\mathrm{AC}(S_1), as the worked example shows. The safe rule is: make Committed(S1)\mathrm{Committed}(S_1) true only after observing AC(S1)\mathrm{AC}(S_1); until then, keep S0S_0 able to reach the device; and return to S0S_0 automatically if AC(S1)\mathrm{AC}(S_1) is not observed before a deadline.

Limits and common mistakes

Application confirmation is specific. One successful status read shows that this operation works now. It does not show that every operation works, or that the state survives a restart unless the test includes one. Choose the confirming operation to exercise what the deployment cannot lose, usually the management path, because the management path is the one that repairs everything else.

A confirming operation must be harmless. Using a destructive or irreversible operation as the test causes the very effect the test was meant to guard against.

An acknowledgment is not durability §8.2. A device can confirm before it has written the new state to persistent storage, and a power loss then brings back a state other than the one confirmed. The commit must be recorded durably before the old key is destroyed.

The revert timer is a trade-off. It must be long enough for a slow link and short enough to limit risk, because during this confirmation window §8.24 the old key can still become active again, which is a deliberate exposure with a time limit.

Key confirmation without fresh values and both identities can be replayed or redirected. A confirmation tag computed over fixed data proves nothing about the current exchange.

Questions answered

Can a party prove key possession while the new policy still makes management unreachable?

Yes: proving possession of a key and being reachable under the new settings are separate facts, and the first can be true while the second is false. Proof of possession, also called key confirmation, shows that the device can compute a message authentication code (MAC) with the new key over fresh challenge values. It can succeed through a dedicated confirmation routine while the code that handles management commands still checks the old key, while a new access rule delivered with the key forbids the manager’s commands, or while the channel that carries management traffic is closed. If the manager then destroys the old key, the device rejects every management command and can no longer be reached remotely.

The protection is application confirmation with automatic rollback. After key confirmation, the device activates the new key tentatively and starts a timer. The manager sends a harmless real management operation, such as a status read, through the normal path under the new key. Only if that operation succeeds does the manager commit the change and destroy the old key. If it does not succeed before the timer expires, the device returns to the old key by itself, so the manager can still reach it and repair the fault.

Related entries: Key rotation (§5.29), Proof of possession (§5.30), Confirmation window (§8.24), Commit-confirmed update (§8.23), Staging versus commit versus activation (§8.22). Further reading: [21, 152].