Application case · Toner security

Toner Cartridge Security: How Do Identity, Keys and Trusted Records Protect Consumables?

Both say A17. What else must the printer establish?

13 min read

The office has replaced a toner cartridge. It fits the printer, carries the expected model label and says A17. Printing has not started. The printer first needs evidence that the responding authentication chip has an acceptable identity and that the usage record remains trustworthy.

A second cartridge also says A17. A photograph cannot establish which one meets the system's authorization policy. It cannot establish toner quality either. This lesson adds the missing evidence step by step before returning to the two devices on the desk.

The story, serial number and version values are teaching examples, not a vendor protocol or measurements. Compatibility, refilling and repair do not by themselves imply malicious behavior. The attacks examined here are impersonation, replay, record rollback and verifier bypass.

  • Evaluate identity, state and system policy separately.
  • Explain the different jobs of certificates and fresh challenge responses.
  • Trace how PUF root material can protect a separate private key.
  • See why encryption and integrity alone do not prevent rollback.

Try identity and state decisions →Try real signatures and AEAD →

Can identical-looking cartridges be trusted?

1/12 — Appearance and labels can be copied. Identity and record freshness need different evidence.
1/12 — Appearance and labels can be copied. Identity and record freshness need different evidence.

A label is a claim. Reading A17 establishes that the interface supplied those characters; it does not establish which physical device responded. Suppose both cartridges return the same serial number. A program that checks only that number receives the same answer from each. The defense then depends on how difficult the number is to copy.

The system can ask a harder question: does the responder possess a secret associated with the claimed identity? The authentication chip uses that secret to produce evidence. The host verifies it using a previously established trust relationship. The next pages use a public/private-key design to explain this process. It is the architecture chosen for this lesson, not a claim about every printer. [1] [2]

Identity can be valid while the usage record is wrong for the present moment. A genuine chip might receive a record restored from an earlier backup. The system really created that record, but it no longer describes current progress. Identity asks who is responding. Trustworthy state also asks whether this record is appropriate now.

The conclusion must stay within the evidence. A valid chip response does not measure toner particle size or print quality. A security design can address authorization and trustworthy records. Material quality still needs separate tests. Keeping these judgments apart prevents each mechanism from being assigned a job it cannot perform.

Why are a serial number and certificate not enough?

2/12 — A certificate binds a public key to identity. Copying it does not automatically provide the matching private key.
2/12 — A certificate binds a public key to identity. Copying it does not automatically provide the matching private key.

In a public/private-key design, the verifier can receive the public key while the device protects the private key. The two are mathematically related, but publishing the public key should not make recovering the private key practical. The verification rules can be public while the ability to produce valid new proofs remains restricted.

A certificate binds a public key to a subject or attributes, with an issuer's signature over that binding. The printer can check whether the binding comes from a certification system it accepts. Fields such as serial numbers, permitted uses and validity periods supply context for that decision. The certificate normally does not depend on secrecy. [1] [2]

A photocopied identity document is a useful, limited analogy. An attacker can copy a public certificate without acquiring the ability to create new signatures. The responding device must still demonstrate that ability for this request. A system that stops at a valid certificate checks the document without checking the presenter's capability.

Possession of a private key must also be separated from physical distance. A fresh challenge can defeat straightforward reuse of an old response. It does not necessarily stop someone from forwarding the request to a genuine chip in real time. First distinguish public information from secret capability, then add the protocol conditions the application needs.

Which decision is the attacker trying to change?

3/12 — Impersonation, replay, rollback and host bypass change different decisions.
3/12 — Impersonation, replay, rollback and host bypass change different decisions.

A useful threat model begins with the decision an attacker wants to change. One attacker wants another device to be accepted as A17. Another has a genuine A17 and wants its recorded usage restored to an earlier state. These goals require different capabilities. The second does not necessarily require identity forgery.

Replay uses previously observed communication. If a device always supplies the same answer, an observer may record and submit it again. The observer need not know the private key or decrypt every message. An old response can become a false new proof if the verifier does not distinguish the transactions. [2]

A different path targets the host. The cartridge may produce a sound proof, yet modified host software can skip the check and allow operation. Malformed inputs can also disrupt how the verifier follows its policy. Those are failures of the checking system. Strengthening a key inside the cartridge alone cannot repair them.

Write down capabilities and boundaries rather than labeling every user an attacker. Reading communication, rewriting external storage and reaching a debug interface are different assumptions. Authorization for repair, compatible supplies and refilling belongs in an explicit system policy. None of those activities is treated as malicious merely by name in this lesson.

Why can one compromised device affect many others?

4/12 — Compromise scope depends on provisioning and key allocation. Symmetric designs can also use per-device keys.
4/12 — Compromise scope depends on provisioning and key allocation. Symmetric designs can also use per-device keys.

Suppose an entire batch of authentication chips contains one secret. The host checks a message authentication code, or MAC, using that secret. Extracting it from one chip may let an attacker create acceptable messages for other devices in the same trust domain. The scope of sharing causes that exposure; an algorithm name alone does not determine it.

A symmetric system can provision a different key for each device. It can install individual secrets securely or derive purpose-specific keys from a protected root and device identifiers. Obtaining one device key should not directly disclose the others. The root key and provisioning service still carry a larger protection responsibility. [2] [4]

An asymmetric design assigns different capabilities. The device signs with its private key, and the printer verifies with a public key. Obtaining that public key normally does not provide the device's signing capability. Many verifiers can operate without sharing the device secret. Certificate issuance, key generation and implementation still have costs.

Compare designs by following a compromise outward. Which identities become impersonable? Who can revoke a key or issue a replacement certificate? Per-device keys do not automatically survive a compromised root service or stolen provisioning database. They can limit certain exposures, but the complete judgment depends on the trust relationships.

Who vouches for the public key's identity?

5/12 — The host checks a certificate path and policy from an accepted trust anchor, not an arbitrary self-declared issuer.
5/12 — The host checks a certificate path and policy from an accepted trust anchor, not an arbitrary self-declared issuer.

The printer cannot trust a public key merely because a document carries a signature. Anyone can create a key pair and sign a claim about it. The verifier must first know which issuers it accepts. That configured starting point is a trust anchor. It typically contains a verification public key and associated constraints.

An intermediate issuer may sign the device certificate. The host follows the certificate path, checking signatures and restrictions until it reaches an accepted anchor. RFC 5280 provides the X.509 certificate and path-validation foundation used to explain that relationship here. This is not a claim that a particular cartridge implements the full format. [1] [2]

Signature correctness is only part of validation. The system also needs acceptable usage, validity conditions and a policy for revocation and offline operation. A device without a trusted clock or network connection must address those conditions explicitly. Failure to obtain information must not silently become evidence that everything is acceptable.

Updating the trust anchor matters too. If unauthorized software can install its own root public key, every later signature may verify against the wrong starting point. Certificate handling therefore depends on protected host configuration. After checking the documents, the host still needs evidence that the present responder can answer a new request.

How do we establish a response to this request?

6/12 — The signature binds a fresh challenge, identity and context. Replay resistance is not relay resistance.
6/12 — The signature binds a fresh challenge, identity and context. Replay resistance is not relay resistance.

The printer can generate a fresh challenge for a transaction and require the chip to sign it. The diagram calls the previous challenge N1 and the current one N2. These short names aid reading. A real protocol needs adequate freshness rather than a tiny set of easily repeated or predictable values.

The chip encodes the challenge and agreed context into an unambiguous message, then signs it. The host reconstructs the expected message and verifies the signature with the validated device public key. Relevant identities, protocol purpose and transaction conditions should be bound too, so a valid answer cannot be moved freely into another context. [2] [5]

An observer may retain the complete answer for N1, but submitting it to a host expecting N2 fails this check. The signed message differs. This depends on the host checking the current challenge and managing its lifetime correctly. Displaying a random number without including it in the signed message does not provide that protection.

A live relay has a different capability. An intermediary can forward N2 to a genuine remote device and return its new answer. The signature may be correct while the application's location or physical-connection assumption is false. Applications that must limit relay need suitable channel binding, physical constraints or distance checks. Freshness alone does not establish distance.

Lab 1: Which check actually passed?

Predict the result, then change one condition. Every case assumes the same valid public certificate. The responder, record and host enforcement differ.

Start by changing only the responder. Plates 9–11 explain records, trusted floors and host bypass.

This decision model uses explicit assumptions. It performs no cryptographic computation or physical attack. Lab 2 uses real cryptography. Service availability is not the same as passing verification.

Change the conditions

What can still go wrong with a valid signature?

7/12 — A leaked private key lets an impersonator answer a fresh challenge. Storage, execution and interfaces all need protection.
7/12 — A leaked private key lets an impersonator answer a fresh challenge. Storage, execution and interfaces all need protection.

A fresh challenge blocks an old answer, but not an attacker who has acquired the private key. That attacker can create a valid signature for N2 without replaying N1. The verifier sees a correct mathematical result. This one verification cannot reveal that the key was copied. Protecting the private key preserves the intended meaning of the identity proof.

Secrets can be exposed at different stages. Persistent storage, temporary working registers and test-interface output all require appropriate controls. Even without a software instruction that reads the key, side channels may reveal related information through power or timing. Fault injection seeks to disrupt computation or permission checks. These attack categories do not establish that every chip is compromised. [2]

Designers must restrict which services may use the key and avoid handing raw private material to ordinary software where possible. A signing service inside a protected boundary can accept a defined request and return only its result. It still needs authorization and purpose checks. A non-readable key can otherwise be misused to sign arbitrary content.

OTP, other nonvolatile storage and PUFs must be evaluated within the complete architecture. A storage technology's name does not establish its probing resistance or remove digital exposure during use. The next page considers PUF-based root protection by identifying its specific job, rather than assigning it every security responsibility.

Which part of this system does the PUF protect?

8/12 — This example derives a wrapping key from PUF root material to protect a separately generated signing private key.
8/12 — This example derives a wrapping key from PUF root material to protect a separately generated signing private key.

This example first generates a private key suitable for signing, then protects it. The PUF supplies root material associated with physical variation in the chip. The system obtains that material reliably under allowed conditions, applies suitable processing and derives a purpose-specific key. Here it derives a key-encryption key, or KEK, to protect the separate signing private key.

After wrapping with appropriate confidentiality and integrity protection, the protected private-key material can reside in external storage. During authorized use, the protected service obtains the same chip's root material, recovers the KEK, unwraps the private key and signs. The security boundary still controls where the raw key is used and what can leave. The wrapping method also has parameter and management requirements. [2] [3] [4] [8] [9]

Reliable extraction differs across PUF mechanisms. SRAM PUFs commonly address differences between startup observations. Other mechanisms can have different readout and processing needs. This lesson does not impose one error-correction or helper-data requirement on every PUF. The preceding lessons on PUF families, SRAM reliability and NeoPUF explain those mechanisms separately.

A derivation function cannot invent secret entropy absent from the root material. If an attacker obtains usable root material or can freely invoke the unwrapping service, an external wrapped object cannot repair that failure. The PUF serves the root-material layer. Signing, access control, purpose separation and lifecycle management remain necessary. Separating the keys also leaves room to rotate the signing key.

Why can an encrypted record still cause trouble?

9/12 — Confidentiality, integrity, device binding and freshness differ. A valid old seal remains valid.
9/12 — Confidentiality, integrity, device binding and freshness differ. A valid old seal remains valid.

Encrypting a usage record primarily prevents parties without the key from reading it. Detecting unauthorized changes requires integrity protection too. Authenticated encryption, such as correctly used AEAD, can combine those goals. Authentication in that data-protection term must not be confused with completion of the entire device-identity protocol.

Device binding addresses movement between devices. If an attacker copies A17's protected record to another chip, the system should check whether it belongs to the present device. A device-specific key or authenticated identity and context can contribute to that design. An unprotected serial-number note does not provide the same property. [6] [2]

Now keep the same A17 but replace version 8 with a saved version 5. The old data and old authentication tag still match. No bit has been corrupted, so AEAD can succeed normally. It establishes that the object satisfies its cryptographic checks. It does not know that version 8 happened later.

Determining whether the data is stale requires additional trusted progress information. Not every field needs encryption either: a public certificate usually needs authenticity rather than secrecy. State which actions each object must resist before choosing mechanisms. That exposes gaps more clearly than putting every object behind one generic padlock.

How does the system detect a restored old record?

10/12 — Compare version 5 with a separately protected floor of 8. The trusted reference must not roll back with the backup.
10/12 — Compare version 5 with a separately protected floor of 8. The trusted reference must not roll back with the backup.

In this example, the system retains a trusted version floor of 8. It authenticates a supplied record, then checks whether its version is below that floor. Version 5 may be cryptographically valid, yet it is stale because 5 is less than 8. The diagram's values illustrate the comparison, not measured device behavior.

The floor must be somewhere an attacker cannot restore with the same backup. Restoring both record and floor to 5 would make the comparison pass again. Options include protected monotonic state or a trusted service that retains progress. Offline operation, device migration and maintenance authority affect which architecture fits. [2] [7]

Power loss complicates updates. If only the new record or the trusted progress commits, a restart can reveal inconsistent state. A recoverable commit protocol must define intermediate states, when work may continue and when it must be refused. This lesson does not prescribe one universal write order for every storage architecture.

Trusted state has costs. Counter capacity, nonvolatile-storage endurance and remote-service availability require planning. Authorized maintenance that replaces a chip or resets records needs an auditable process too. Otherwise a strong rollback barrier may prevent a legitimately repaired device from returning to service.

Lab 2: real signatures and AEAD

Each load creates ephemeral ECDSA and AES-GCM keys. Start normally, then replay a response, alter ciphertext, move a record or remove the trusted floor. Counters 10/11 here and versions 5/8 in the plates are teaching values.

Experiment: actual signatures, old state and anti-rollback

Verify an ECDSA response bound to the printer, cartridge and nonce, then read an AES-GCM protected counter. A response to an old challenge fails signature verification. An old counter can still have a valid tag; rejecting rollback needs a protected floor.

ECDSA, AES-GCM and random nonces are computed using classroom data. Each load creates a new trial, not persistent hardware state. Public-key trust, print permission and floor protection are supplied. It does not parse X.509, generate a physical PUF or prove OEM provenance, quality or lawful compatibility. A PUF or encryption alone does not create a monotonic counter.

Conditions for this experiment

Who protects the verifier?

11/12 — Device proofs, host firmware, trust anchors and failure handling belong in the same threat model.
11/12 — Device proofs, host firmware, trust anchors and failure handling belong in the same threat model.

Return to the printer controller. It receives certificates, creates challenges, verifies responses and decides whether to provide a service. If modified software simply returns success, strong key protection in the cartridge cannot force the host to follow its original decision process. Device evidence and host enforcement are connected but distinct responsibilities.

Secure boot can establish a chain of trust for loaded software. Controlled updates address later versions. Both need trusted starting points, key management and recovery design. Signed software can still contain runtime vulnerabilities, so input parsing, memory protection and least privilege remain relevant. Trusted loading is not a promise of permanent runtime safety. [2] [7]

Debug and factory-test functions often require broad access. Production and shipped states should not retain that access unconditionally. Interface authorization and possible secret output belong in lifecycle planning. Authority to change trust anchors is especially consequential because it can change the entire identity system accepted afterward.

On verification failure, the system should refuse sensitive operations according to explicit policy and offer appropriate authorized recovery. Treating an error as success for convenience creates a bypass. Having no recovery path can also damage availability. The design must reconcile both needs rather than leaving them to improvised error handling.

Back at the desk, what can we decide?

12/12 — Check identity, trustworthy state and policy. Appearance cannot fill missing evidence.
12/12 — Check identity, trustworthy state and policy. Appearance cannot fill missing evidence.

Both devices on the desk still say A17. We can now name the evidence needed: an acceptable certificate path, a response to the current challenge and a signature over the correct context. Under assumptions that include an uncompromised private key, those checks provide grounds to accept this identity proof.

Then examine the usage record. It needs integrity and device-binding checks, and its version must meet the trusted progress reference. A device that supplies an authentic but stale record does not gain freshness from passing identity verification. The host must still apply its authorization policy to the requested service. [1] [2] [6]

The same questions apply to repair and refilling. Which evidence changes when a housing, toner supply or authentication chip is replaced? Does the system define an acceptable maintenance process and who may update identity or state? This lesson does not settle those commercial policies, replace material-quality tests or make a legal judgment from authentication results.

Replace the cartridge with a smart battery or industrial sensor and the main questions remain. Who is responding, are the records trustworthy, and who enforces the final policy? Real systems must also address revocation, offline operation, recovery and attack testing. The PUF trilogy and key-management lesson continue the lifecycle of root secrets and purpose keys.

Engineering notes

How should the signed message be encoded and bound?

The teaching transcript includes a protocol identifier, verifier, device identity and fresh challenge. Implementations need unambiguous encoding and appropriate challenge expiry. Validate the public key's identity and permitted use before accepting its proof. Bind transaction data, firmware state or channel identifiers when the threat model requires them. Adding a nonce alone does not establish physical distance.

PUF root material, KEK and signing private key

The signing private key is generated independently and wrapped under a PUF-derived KEK. Raw PUF bits are not simply treated as an elliptic-curve scalar. Assess entropy, reliable extraction, purpose separation and reconstruction-data protection for the actual mechanism. The unwrapped key should remain within the protected service with controlled inputs, outputs and callers.

Rollback-resistant commits and recovery

Protect the trusted floor separately from restorable records while coordinating both in one update protocol. Test power loss at each stage, partial writes, retries and damaged storage. Dual slots or journals can assist recovery but do not create a trusted anti-rollback reference by themselves. Authorized replacement, migration and retirement also need auditable state transitions.

What do the two experiments demonstrate?

The first lab is a Boolean decision model. It deliberately separates check results from service use after bypass and performs no physical attack. The second retains real WebCrypto ECDSA and AES-GCM operations with new ephemeral keys on each load. Its counters 10/11 and the plates' versions 5/8 are different teaching values. It models no physical PUF, certificate revocation, side channel or power-loss commit and is not a product security certification.

Glossary

Certificate
Issuer-signed data binding a public key to a subject or attributes.
MAC and digital signature
A MAC uses shared secret material for generation and verification. A digital signature separates private-key signing from public-key verification.
KEK
A key that protects other keys; here derived for a purpose from PUF root material.
Replay and live relay
Replay reuses an old response. Live relay forwards a new request to a genuine responder elsewhere.
Rollback resistance
Rejecting an earlier valid state when it is stale relative to trusted progress.

Learning check

1. After receiving a valid certificate, which evidence is still needed?
2. What does the PUF-derived KEK do in this example?
3. Version 5 passes AEAD, but the trusted floor is 8. What follows?
4. Why can impersonation remain possible with a fresh challenge and valid signature?
5. When applying the design to a smart battery, what still needs separate work?

Where to continue

Primary sources

Sources checked 2026-10-17. The standards support the corresponding mechanisms, not the entire cartridge architecture drawn here. Configuration, versions and threat scenarios are teaching models, not product measurements or certification.

  1. RFC 5280 — Internet X.509 PKI Certificate and CRL ProfileCertificate contents, usage constraints and path validation; not a cartridge protocol.
  2. NIST SP 800-57 Part 1 Rev. 5 — Key ManagementKey roles, protection and lifecycle. The device configuration here is a teaching architecture.
  3. NIST SP 800-38F — Methods for Key WrappingConfidentiality and integrity goals for key wrapping. The plate does not specify an implementation format.
  4. RFC 5869 — HKDFExtraction, expansion and context separation; derivation does not invent missing entropy.
  5. NIST SP 800-63B-4 — Authentication and Authenticator ManagementReplay-resistance and challenge-freshness background. The publication concerns digital identity, not a cartridge protocol or a relay-resistance guarantee.
  6. NIST SP 800-38D — GCM and GMACData confidentiality and authentication. Rollback resistance needs additional trusted state; a valid tag does not establish freshness.
  7. NIST SP 800-193 — Platform Firmware Resiliency GuidelinesSystem protection, detection and recovery concepts; not a cartridge-counter implementation standard.
  8. Holcomb, Burleson & Fu — Power-up SRAM State as an Identifying Fingerprint and Source of True Random NumbersAuthor-hosted original research on physical variation and SRAM startup behavior. Historical numerical results are not generalized here.
  9. Dodis et al. — Fuzzy Extractors: How to Generate Strong Keys from Biometrics and Other Noisy DataFormal background for reconstruction and extraction from noisy material; not a requirement that all PUFs use the same processing.

#PUF #KeyManagement #PKI #AntiRollback #HardwareSecurity