<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ddol on Corebaseit — Design System Engineering · POS · Payments · Security</title><link>https://corebaseit.com/tags/ddol/</link><description>Recent content in Ddol on Corebaseit — Design System Engineering · POS · Payments · Security</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><managingEditor>contact@corebaseit.com (Vincent Bevia)</managingEditor><webMaster>contact@corebaseit.com (Vincent Bevia)</webMaster><lastBuildDate>Tue, 28 Jul 2026 16:30:00 +0200</lastBuildDate><atom:link href="https://corebaseit.com/tags/ddol/index.xml" rel="self" type="application/rss+xml"/><item><title>Debugging EMV Offline Data Authentication: DDA, CDA, DDOL and CAPKs</title><link>https://corebaseit.com/corebaseit_posts/debugging-emv-offline-data-authentication-dda-cda-capk/</link><pubDate>Tue, 28 Jul 2026 16:30:00 +0200</pubDate><author>contact@corebaseit.com (Vincent Bevia)</author><guid>https://corebaseit.com/corebaseit_posts/debugging-emv-offline-data-authentication-dda-cda-capk/</guid><description>&lt;img src="https://corebaseit.com/diagrams/EMV-ODA-Troubleshooting.png" alt="Featured image of post Debugging EMV Offline Data Authentication: DDA, CDA, DDOL and CAPKs" />&lt;p>When Offline Data Authentication (ODA) fails, replacing Certification Authority Public Keys (CAPKs) at random is rarely productive. Most field failures sit earlier in the chain: the wrong method was selected, &lt;code>INTERNAL AUTHENTICATE&lt;/code> never ran, the DDOL was incomplete, or certificate recovery broke at a specific step.&lt;/p>
&lt;p>This post is a contact-chip ODA troubleshooting path. It starts from capability negotiation, then covers missing &lt;code>INTERNAL AUTHENTICATE&lt;/code>, DDA failures after a successful APDU, CAPK selection and lifecycle, and what to log. The cryptographic model is the same one in &lt;a class="link" href="https://corebaseit.com/my-books/" target="_blank" rel="noopener"
>&lt;em>POINT OF SALE ARCHITECTURE&lt;/em>&lt;/a> (&lt;em>the book&lt;/em>), Chapter 3: CAPKs as terminal trust anchors, and ODA as local card authenticity before &lt;code>GENERATE AC&lt;/code>. For CAPK hierarchy and fleet management in more depth, see &lt;a class="link" href="https://corebaseit.com/corebaseit_posts/capk-certification-authority-public-keys/" >CAPKs: The Cryptographic Trust Anchors Behind Every EMV Transaction&lt;/a>.&lt;/p>
&lt;p>ODA failure also does not mean “must decline.” It sets Terminal Verification Results (TVR) bits; Terminal Action Analysis then chooses AAC, ARQC, or TC. That path is covered in &lt;a class="link" href="https://corebaseit.com/corebaseit_posts/emv-contact-transaction-declined-aac-troubleshooting/" >Why an EMV Contact Transaction Was Declined&lt;/a>.&lt;/p>
&lt;h2 id="first-establish-which-authentication-method-should-run">First establish which authentication method should run
&lt;/h2>&lt;p>The Application Interchange Profile (AIP, tag &lt;code>82&lt;/code>) declares the card application’s offline authentication capabilities. Terminal Capabilities (tag &lt;code>9F33&lt;/code>) declares what the terminal supports. The Application File Locator (AFL, tag &lt;code>94&lt;/code>) tells the terminal which records to read and include in the authentication input.&lt;/p>
&lt;p>EMV defines three ODA methods, in increasing strength:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Method&lt;/th>
&lt;th>Mechanism&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>SDA&lt;/td>
&lt;td>Terminal verifies a static issuer signature over card data&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>DDA&lt;/td>
&lt;td>Challenge-response: card signs terminal dynamic data; terminal verifies with the ICC public key&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>CDA&lt;/td>
&lt;td>Dynamic signature combined with Application Cryptogram generation&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Do not infer support from the card or terminal alone. ODA runs only when the transaction profile, AIP, terminal capabilities, and kernel configuration agree on a method. If that intersection is empty, the kernel will not perform ODA, and the TVR will typically record that offline data authentication was not performed.&lt;/p>
&lt;h2 id="when-internal-authenticate-is-not-sent">When INTERNAL AUTHENTICATE is not sent
&lt;/h2>&lt;p>For DDA, the terminal sends &lt;code>INTERNAL AUTHENTICATE&lt;/code> with data assembled from the Dynamic Data Authentication Data Object List (DDOL). EMV Book 2 requires that list to include the terminal Unpredictable Number (tag &lt;code>9F37&lt;/code>). If the card does not supply a DDOL, the terminal must use its default DDOL. If neither side provides a usable DDOL that includes &lt;code>9F37&lt;/code>, DDA fails.&lt;/p>
&lt;p>CDA is different: the dynamic signature is produced during &lt;code>GENERATE AC&lt;/code>, not via a separate &lt;code>INTERNAL AUTHENTICATE&lt;/code>. Absence of &lt;code>INTERNAL AUTHENTICATE&lt;/code> is therefore expected when CDA is selected.&lt;/p>
&lt;p>If DDA was expected and the command is absent:&lt;/p>
&lt;ol>
&lt;li>Confirm that both card and terminal support DDA, or determine whether the kernel selected CDA instead.&lt;/li>
&lt;li>Check the kernel configuration that enables the relevant ODA method.&lt;/li>
&lt;li>Confirm that a usable DDOL was read from the card (tag &lt;code>9F49&lt;/code> when present).&lt;/li>
&lt;li>If the card does not provide a DDOL, confirm that the terminal has the required default DDOL and that it includes &lt;code>9F37&lt;/code>.&lt;/li>
&lt;li>Verify that the required CAPK is available before authentication begins.&lt;/li>
&lt;/ol>
&lt;p>The absence of &lt;code>INTERNAL AUTHENTICATE&lt;/code> is not itself proof of a DDA defect. The kernel may have selected CDA, may have found no mutually supported ODA method, or may have stopped because required data was unavailable.&lt;/p>
&lt;p>Open the image below for the full diagnostic path (or click to view full size).&lt;/p>
&lt;p style="text-align: center;">
&lt;a href="https://corebaseit.com/diagrams/OfflineDataAuthenticationFailed.png" target="_blank" rel="noopener">
&lt;img src="https://corebaseit.com/diagrams/OfflineDataAuthenticationFailed.png" alt="EMV offline diagnostic path" style="max-width: 720px; width: 100%; height: auto;" />
&lt;/a>
&lt;/p>
&lt;h2 id="if-internal-authenticate-is-sent-but-dda-fails">If INTERNAL AUTHENTICATE is sent but DDA fails
&lt;/h2>&lt;p>Inspect the APDU response first. A status other than &lt;code>90 00&lt;/code> means the command did not complete successfully. Preserve the command data, response data, status words, selected AID, AIP, DDOL, and unpredictable number in the trace.&lt;/p>
&lt;p>If the APDU succeeds, continue through the public-key recovery chain described in EMV Book 2:&lt;/p>
&lt;ol>
&lt;li>Select the CAPK by the card application’s Registered Application Provider Identifier (RID)—the first five bytes of the selected AID—and the Certification Authority Public Key Index (tag &lt;code>8F&lt;/code>).&lt;/li>
&lt;li>Recover and validate the Issuer Public Key Certificate.&lt;/li>
&lt;li>Recover and validate the ICC Public Key Certificate.&lt;/li>
&lt;li>Verify Signed Dynamic Application Data against the DDOL concatenation and related recovered fields.&lt;/li>
&lt;/ol>
&lt;p>A failure at any link should be reported as a specific recovery or verification error, not only as the generic label “ODA failed.” Chapter 3 makes the same architectural point: &lt;code>(RID + Key Index)&lt;/code> selects the terminal-resident trust anchor; missing or wrong CAPKs break certificate recovery before signature verification ever runs.&lt;/p>
&lt;h2 id="capk-selection-and-lifecycle">CAPK selection and lifecycle
&lt;/h2>&lt;p>A CAPK record is identified by at least:&lt;/p>
&lt;ul>
&lt;li>RID&lt;/li>
&lt;li>CAPK index&lt;/li>
&lt;li>Modulus&lt;/li>
&lt;li>Exponent&lt;/li>
&lt;/ul>
&lt;p>The integrity hash (commonly SHA-1 over the key material under scheme distribution rules) and the expiration date are operational metadata. Expiration is not a substitute for checksum validation, and changing an expiration date in production to silence errors is not a valid fix.&lt;/p>
&lt;p>Treat CAPKs as managed production configuration:&lt;/p>
&lt;ul>
&lt;li>Obtain keys from the relevant payment scheme or approved distribution channel.&lt;/li>
&lt;li>Validate integrity before deployment.&lt;/li>
&lt;li>Track effective and expiration dates outside the transaction hot path.&lt;/li>
&lt;li>Load only keys authorized for the deployed markets and applications.&lt;/li>
&lt;/ul>
&lt;p>Interpretation note: some vendor kernels accept a CAPK when it is loaded and may not enforce expiration during every transaction. That behavior, where it occurs, does not remove the application owner’s responsibility to maintain a current, scheme-approved key set. Certification and scheme operating rules still assume the terminal estate carries valid keys.&lt;/p>
&lt;h2 id="a-safer-way-to-isolate-certificate-date-problems">A safer way to isolate certificate-date problems
&lt;/h2>&lt;p>Changing a production terminal’s clock to an old date is not a safe diagnostic method. The terminal date feeds multiple EMV checks, so a clock skew can create secondary failures that look like ODA defects.&lt;/p>
&lt;p>Reproduce the transaction in a controlled certification or development environment, inspect certificate expiration data, and test with a known-good clock and scheme-approved test keys. Keep production time synchronized and auditable.&lt;/p>
&lt;h2 id="what-to-log">What to log
&lt;/h2>&lt;p>For an actionable ODA investigation, collect:&lt;/p>
&lt;ul>
&lt;li>Selected AID and RID&lt;/li>
&lt;li>AIP (&lt;code>82&lt;/code>) and Terminal Capabilities (&lt;code>9F33&lt;/code>)&lt;/li>
&lt;li>CAPK Index (&lt;code>8F&lt;/code>)&lt;/li>
&lt;li>DDOL, if present, and the terminal default DDOL&lt;/li>
&lt;li>&lt;code>INTERNAL AUTHENTICATE&lt;/code> command and response (when DDA is in use)&lt;/li>
&lt;li>AFL and the application records used for authentication&lt;/li>
&lt;li>TVR (&lt;code>95&lt;/code>) before and after ODA&lt;/li>
&lt;li>Kernel-specific ODA debug code, when available&lt;/li>
&lt;li>Kernel version and configuration identifier&lt;/li>
&lt;/ul>
&lt;p>Vendor debug APIs can return a more specific reason, but their codes must be interpreted with the guide for the exact certified kernel build.&lt;/p>
&lt;h2 id="practical-diagnosis-flow">Practical diagnosis flow
&lt;/h2>&lt;p style="text-align: center;">
&lt;img src="https://corebaseit.com/diagrams/EMV-Offline.png" alt="EMV-Offline: EMV" style="max-width: 900px; width: 100%;" />
&lt;/p>
&lt;h2 id="references">References
&lt;/h2>&lt;ul>
&lt;li>&lt;a class="link" href="https://corebaseit.com/my-books/" target="_blank" rel="noopener"
>&lt;em>POINT OF SALE ARCHITECTURE: A Practical Guide to Secure, Certifiable POS Systems&lt;/em>&lt;/a> — Chapter 3: EMV Principles (CAPKs, certificate chain, SDA/DDA/CDA, AIP/AFL, and ODA placement before &lt;code>GENERATE AC&lt;/code>).&lt;/li>
&lt;li>&lt;a class="link" href="https://corebaseit.com/corebaseit_posts/capk-certification-authority-public-keys/" >CAPKs: The Cryptographic Trust Anchors Behind Every EMV Transaction&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://corebaseit.com/corebaseit_posts/emv-contact-transaction-declined-aac-troubleshooting/" >Why an EMV Contact Transaction Was Declined&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://www.emvco.com/emv-technologies/contact-chip/" target="_blank" rel="noopener"
>EMVCo — EMV Contact Chip&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://www.emvco.com/processes/contact-kernel-approval-process/" target="_blank" rel="noopener"
>EMVCo — Contact Kernel Approval Process&lt;/a>&lt;/li>
&lt;li>&lt;a class="link" href="https://www.emvco.com/specifications/" target="_blank" rel="noopener"
>EMVCo — Specifications and Associated Bulletins&lt;/a>&lt;/li>
&lt;li>&lt;strong>EMV Integrated Circuit Card Specifications for Payment Systems, Book 2: Security and Key Management&lt;/strong> — SDA, DDA, CDA, certificate recovery, CAPKs, DDOL requirements.&lt;/li>
&lt;li>&lt;strong>EMV Integrated Circuit Card Specifications for Payment Systems, Book 3: Application Specification&lt;/strong> — AIP, AFL, terminal data objects, and transaction flow.&lt;/li>
&lt;li>&lt;a class="link" href="https://www.openscdp.org/scripts/tutorial/emv/dda.html" target="_blank" rel="noopener"
>CardContact OpenSCDP — DDA&lt;/a> — worked walkthrough of CAPK → issuer → ICC recovery and &lt;code>INTERNAL AUTHENTICATE&lt;/code>.&lt;/li>
&lt;/ul></description></item></channel></rss>