Independent Submission L. P. de Melo Internet-Draft D. M. Amaral Intended status: Informational R. O. Albuquerque Expires: 19 May 2027 J. J. C. Gondim F. L. L. de Mendonca R. T. de Sousa Junior UnB 15 November 2026 Dynamic Authorization Protocol (DAP): Out-of-Band Visual Transaction Authorization for Untrusted Terminals draft-melo-dap-visual-oob-auth-00 Abstract This document specifies the Dynamic Authorization Protocol (DAP), an Out-of-Band (OOB) visual transaction authorization protocol, used as a second factor, for electronic financial transactions initiated on untrusted terminals. The terminal displays a cryptographically protected challenge as a Quick Response (QR) code. A trusted mobile device of the user, which needs no network connection, scans the code, verifies it with HMAC-SHA-256, shows the transaction details for confirmation ("What You See Is What You Sign"), and then reveals a one-time authorizer code protected with AES-256. Each challenge is bound to one transaction and expires within 120 seconds. The document also describes the provisioning of the shared key through a dual-channel XOR split-key exchange, its activation, and the templates used to display transactions. DAP targets Man-in-the- Middle (MITM) and Man-in-the-Browser (MITB) adversaries that control the terminal and alter transaction parameters. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on 19 May 2027. de Melo, et al. Expires 19 May 2027 [Page 1] Internet-Draft DAP Visual OOB Transaction Auth November 2026 Copyright Notice Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.2. Terminology and Notation . . . . . . . . . . . . . . . . 4 2. Related Work . . . . . . . . . . . . . . . . . . . . . . . . 6 3. System Architecture and Functional Premises . . . . . . . . . 7 3.1. Architectural Overview . . . . . . . . . . . . . . . . . 7 3.2. Functional and Operational Requirements . . . . . . . . . 9 3.3. Foundational Design Hypotheses . . . . . . . . . . . . . 10 4. Cryptographic Primitives and Message Format . . . . . . . . . 11 4.1. Primary Root Key and Ephemeral Server-Side Key Recovery . . . . . . . . . . . . . . . . . . . . . . . . 11 4.2. Customer Key Partitioning . . . . . . . . . . . . . . . . 12 4.3. Transaction Challenge Message Layout . . . . . . . . . . 13 4.3.1. Transaction Data Encoding . . . . . . . . . . . . . . 13 4.3.2. Template File Format . . . . . . . . . . . . . . . . 16 5. Key Provisioning . . . . . . . . . . . . . . . . . . . . . . 17 5.1. Provisioning and Activation Procedure . . . . . . . . . . 18 5.2. Key Exchange QR Code Format (Code 001) . . . . . . . . . 21 6. Dynamic Authorization Protocol (DAP) Transaction Flow . . . . 22 6.1. Detailed Protocol Processing Steps . . . . . . . . . . . 23 6.1.1. Server Challenge Generation . . . . . . . . . . . . . 24 6.1.2. Out-of-Band Visual Capture and Mobile Verification . 25 6.1.3. Authorizer Code Recovery and Transaction Execution . 26 7. Key Lifecycle and Device Management . . . . . . . . . . . . . 26 7.1. Loss, Replacement, and Revocation . . . . . . . . . . . . 27 7.2. Root Key Rotation . . . . . . . . . . . . . . . . . . . . 27 8. Operational Considerations . . . . . . . . . . . . . . . . . 28 9. Security Considerations . . . . . . . . . . . . . . . . . . . 28 9.1. Formal Adversary Model . . . . . . . . . . . . . . . . . 28 9.2. Resistance to Customer Impersonation Attacks . . . . . . 30 9.3. Resistance to Man-in-the-Browser (MITB) Attacks . . . . . 30 9.4. Replay Protection and Challenge Expiration . . . . . . . 31 9.5. Limits on Authorizer Code Attempts . . . . . . . . . . . 32 9.6. Key Exchange QR Codes . . . . . . . . . . . . . . . . . . 32 9.7. Protection of Key Material at e-Bank . . . . . . . . . . 33 de Melo, et al. Expires 19 May 2027 [Page 2] Internet-Draft DAP Visual OOB Transaction Auth November 2026 9.8. Denial of Service . . . . . . . . . . . . . . . . . . . . 33 9.9. Transaction Templates . . . . . . . . . . . . . . . . . . 34 9.10. Formal Verification . . . . . . . . . . . . . . . . . . . 34 9.11. Residual Risks and Human Factors . . . . . . . . . . . . 34 10. Privacy Considerations . . . . . . . . . . . . . . . . . . . 35 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 35 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 12.1. Normative References . . . . . . . . . . . . . . . . . . 36 12.2. Informative References . . . . . . . . . . . . . . . . . 37 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 39 1. Introduction Internet banking and electronic transaction systems have evolved to provide ubiquitous financial services, but security models relying solely on session-level authentication have not kept pace with modern adversarial capabilities. Requiring access exclusively from pre- registered devices restricts user mobility, whereas relying on conventional challenge-response mechanisms over a single channel exposes users to session hijacking, credential harvesting, and real- time transaction manipulation. When a customer initiates a financial transaction from a personal computer connected to the Internet, that terminal has to be treated as potentially untrusted. Malware, trojans, and Man-in-the-Browser (MITB) agents can silently modify destination accounts or transaction amounts while displaying legitimate-looking confirmation screens to the user. Conventional second factors such as TANs, hardware OTP tokens, or Short Message Service (SMS) codes (which are additionally exposed to cellular network and Signaling System No. 7 (SS7) vulnerabilities) do not cryptographically bind the authorization code to the actual transaction content verified by the user on an independent trusted display. The Dynamic Authorization Protocol (DAP) [Melo2012] [Melo2024] addresses this gap by establishing an Out-of-Band (OOB) visual channel between the service provider (such as the e-Bank server) and the user's trusted mobile device. DAP applies the "What You See Is What You Sign" (WYSIWYS) principle [Starnberger2009]: every transaction initiated on an untrusted computer generates a cryptographically protected challenge rendered as a two-dimensional visual code (QR code). The user captures this QR code using the camera of a mobile device that needs no network connection, which verifies the integrity and authenticity of the transaction parameters, displays the transaction details on the trusted mobile screen, and, upon explicit user confirmation, decrypts and reveals a 6-digit transaction-specific authorizer code that the user enters back into the untrusted terminal to complete the operation. de Melo, et al. Expires 19 May 2027 [Page 3] Internet-Draft DAP Visual OOB Transaction Auth November 2026 Because only the holder of the key can produce a valid authentication tag, a counterfeit site or a malicious terminal cannot create a challenge that the mobile device accepts, which makes DAP resistant to phishing. This document assumes a deployment in which the customer obtains the key through an Automated Teller Machine (ATM) of the financial institution, which has a screen capable of showing QR codes and reads the bank smartcard of the customer. Other channels for provisioning the key are out of the scope of this document. 1.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. 1.2. Terminology and Notation The following actors and architectural entities are defined in this specification: User (Customer): The legitimate human account holder initiating a transaction on an Untrusted Computer (UC) and authorizing it via a Trusted Mobile Device (MD). Untrusted Computer (UC): Any personal computer or Internet-connected terminal used to access the e-Bank web interface. Under the DAP threat model, UC is assumed to be potentially compromised by malware or controlled by an adversary. Trusted Mobile Device (MD): A portable device (such as a smartphone) equipped with an embedded camera and running the mobile application of the financial institution, which includes the DAP function (the "DAP application"). MD operates out-of-band without requiring network connectivity during transaction verification. Automated Teller Machine (ATM): A physical terminal operated by the financial institution and connected to its dedicated network, used as a secondary trusted channel during split-key provisioning. Financial Institution Server (e-Bank): The remote application server responsible for authenticating sessions, generating transaction challenges, and validating transaction authorizer codes. Hardware Security Module (HSM): A tamper-resistant cryptographic de Melo, et al. Expires 19 May 2027 [Page 4] Internet-Draft DAP Visual OOB Transaction Auth November 2026 processor within the financial institution ("HSM Bank") that stores primary root keys and computes, on demand, the key share k_2 of each customer, so that no complete customer key is kept in persistent storage. The cryptographic notation used throughout this document is summarized below: MK: A Primary Root Key held inside the HSM, where MK is a 512-bit key in {0,1}^512, generated inside the HSM with a cryptographically secure random number generator. k: A 512-bit customer secret key (k in {0,1}^512), computed as k = k_1 XOR k_2, shared between the HSM/e-Bank and the customer's MD. F: A pseudorandom function implemented inside the HSM, instantiated as HMAC-SHA-512 keyed with MK, used to generate the key share k_2. k'_1, k'_2: The two 256-bit subkeys partitioned from k, where k'_1 in {0,1}^256 (the first 32 octets of k) is the HMAC-SHA-256 authentication key and k'_2 in {0,1}^256 (the last 32 octets of k) is the AES-256-CBC encryption key. k_1, k_2: Two 512-bit key shares used for symmetric key distribution over separated channels, such that k = k_1 XOR k_2. The share k_1 is a random 512-bit string with uniform distribution that e-Bank stores for the customer. The share k_2 is generated by the HSM from MK and customer data, and is recomputed whenever it is needed. m: The transaction message containing the transaction details (trans_data) requested by the user. r: A 6-digit pseudorandom authorizer code uniformly distributed in the range 000000 <= r <= 999999 (encoded for encryption as six ASCII decimal digits, including leading zeros). r': The protected authorizer code, r' = IV | C, where IV is a 128-bit (16-octet) initialization vector and C is the single 128-bit (16-octet) AES-256-CBC ciphertext block of r, computed as C = CBC-Enc_{k'_2}(IV, r) (see Section 4.3). The total length of r' is 32 octets (256 bits). Nonce: The unique identifier that e-Bank assigns to each transaction, a random text of 20 characters. It is carried inside trans_data. y: The 256-bit HMAC-SHA-256 authentication tag of the challenge, y = de Melo, et al. Expires 19 May 2027 [Page 5] Internet-Draft DAP Visual OOB Transaction Auth November 2026 HMAC-SHA-256_{k'_1}(trans_data | r'). XOR: Bitwise exclusive-OR operation. CONCAT (|): Bitstring or octet-string concatenation. 2. Related Work This section compares DAP with mechanisms that are commonly used to authorize electronic transactions. The comparison is limited to the property that matters for an untrusted terminal: whether the authorization code or credential depends on the transaction content that the user has seen on an independent trusted display. +====================+=========================+====================+ | Mechanism | Code bound to | Trusted display of | | | transaction content | the transaction | +====================+=========================+====================+ | HOTP [RFC4226] and | No | No | | TOTP [RFC6238] | | | +--------------------+-------------------------+--------------------+ | SMS one-time | No, unless the | Only the text of | | password | message repeats the | the message | | | transaction | | +--------------------+-------------------------+--------------------+ | QR-TAN | Yes | Yes, on a mobile | | [Starnberger2009] | | device | +--------------------+-------------------------+--------------------+ | FIDO2 / WebAuthn | No, by the core | Not defined by the | | [WebAuthn2] | specification | core specification | +--------------------+-------------------------+--------------------+ | DAP (this | Yes | Yes, on a mobile | | document) | | device that does | | | | not need a network | +--------------------+-------------------------+--------------------+ Table 1: Comparison of DAP with Existing Mechanisms HOTP and TOTP derive a password from a shared secret and a counter or the time. The password does not depend on the transaction, so malware on UC that changes the transaction after the user has authenticated can still use a valid password. SMS one-time passwords have the same property, and they are additionally exposed to weaknesses of the cellular network. QR-TAN [Starnberger2009] is the closest approach: the mobile device scans a code from the terminal and shows the transaction before producing the authorization. DAP differs in the following aspects: de Melo, et al. Expires 19 May 2027 [Page 6] Internet-Draft DAP Visual OOB Transaction Auth November 2026 the shared key is provisioned by a split-key exchange over two separate channels (Section 5); the transaction is shown through templates selected by a transaction code; the challenge is authenticated with HMAC-SHA-256 over the transaction data and the protected code; the challenge is valid for 120 seconds, and the mobile device checks the generation timestamp; and the user returns a 6-digit code through UC. FIDO2 / WebAuthn [WebAuthn2] authenticates the user to a relying party with public-key credentials and resists phishing. The core specification does not define a display of the transaction on a separate trusted device. It addresses a different problem from DAP, and both can be used together. The Regulatory Technical Standards under the European Payment Services Directive [PSD2RTS] require, for remote electronic payments, that the authentication code be dynamically linked to the amount and the payee (Article 5). DAP addresses the same concern by binding the authorizer code to a single transaction. This document makes no claim of compliance with any regulation. 3. System Architecture and Functional Premises 3.1. Architectural Overview In the DAP model, a session authenticated via static or conventional credentials is never trusted to authorize financial transactions implicitly. Instead, every transaction message exchanged on the Internet banking channel is treated as an independent operation that MUST be explicitly authorized by the customer via an Out-of-Band channel strictly bound to that transaction's data. The system architecture comprises the remote financial institution (e-Bank backed by HSM) and the customer interacting across three distinct environments and communication channels, as illustrated in Figure 1: de Melo, et al. Expires 19 May 2027 [Page 7] Internet-Draft DAP Visual OOB Transaction Auth November 2026 +---------------------------------------------------------------+ | Financial Institution Domain | | | | +------------------+ +----------------------+ | | | HSM Bank |<=============>| e-Bank Server | | | | (Root Keys MK_i, | Internal Bus | (Session & Challenge | | | | Key Derivation) | | Management) | | | +------------------+ +----------------------+ | +-----------|--------------------------------------|------------+ | | Channel 1: | Dedicated Bank Net Channel 2: | Untrusted Net Trusted | (Key Share k_2) (HTTPS) | (k_1, QR, ATM Link | | r_hat) v [Channel Boundary] v +--------------------+ +----------------------+ | ATM Terminal | | Untrusted Computer | | (Smartcard + PIN, | | (UC) | | Visual QR Screen) | | (Web Browser / UI) | +--------------------+ +----------------------+ | | | Channel 3a: QR | Channel 3b: QR | (Camera: k_2) | (Camera: k_1/Tx) +------------------+-------------------+ | v +--------------------+ | Trusted Mobile | | Device (MD) | | (DAP App, | | Camera, Key k) | +--------------------+ | | Visual Confirmation (WYSIWYS) | & Display of 6-digit Code (r_hat) v [ Legitimate Customer ] | | Entry of r_hat into UC (Channel 2) Figure 1: DAP Multi-Channel Architecture This channel separation provides five core security properties: 1. _Channel Segmentation:_ Transaction initiation occurs over the primary Internet channel (UC), whereas transaction verification and authorizer code recovery occur on a physically separate device (MD) via an optical channel. de Melo, et al. Expires 19 May 2027 [Page 8] Internet-Draft DAP Visual OOB Transaction Auth November 2026 2. _Visual Verification (WYSIWYS):_ By decoding and displaying transaction parameters on MD after cryptographic integrity verification, the user confirms the exact recipient, account, date, and value that the server will execute. 3. _Integrity of the Transaction Against a Compromised Terminal:_ An adversary that controls UC, including On-Path (MITM) and Man-in- the-Browser (MITB) attackers, cannot alter the transaction payload inside the challenge without invalidating the HMAC tag verified by MD. This property does not protect against a legitimate user who confirms a fraudulent transaction (see Section 9.11). 4. _No Network Dependency:_ MD does not need cellular, Wi-Fi, or Bluetooth connectivity to verify a transaction and to display the authorizer code. The network is therefore not an attack path in the protocol, and the protocol remains available in unstable connectivity environments. The protocol does not require MD to be disconnected, and it does not address malware running on MD itself, which is outside the adversary model of Section 9.1. 5. _Isolation of Cryptographic Secrets:_ The cryptographic key k is stored inside MD and is never known or viewable by the human user, preventing inadvertent disclosure of the secret key under social engineering. 3.2. Functional and Operational Requirements Compliant implementations of the Dynamic Authorization Protocol MUST satisfy the following nine functional premises: 1. _Message Lifespan:_ Every generated challenge message, including encrypted payloads, MUST have a maximum lifespan (Time-To-Live) of 120 seconds, counted from the instant at which e-Bank generated it. This instant is carried in the message as a timestamp, so that both e-Bank and MD can verify the lifespan. 2. _Mandatory Authentication:_ Every challenge message MUST be authenticated with the HMAC tag y, and every transaction MUST be authorized with the authorizer code r that is bound to it. 3. _Timeout Cancellation:_ Failure to receive a valid authorization response within 120 seconds MUST result in the automatic cancellation of the ongoing transaction by the server. 4. _Response Time:_ Under normal operating conditions, the cryptographic processing and response time for transaction authentication and authorization SHOULD be less than 2 seconds. de Melo, et al. Expires 19 May 2027 [Page 9] Internet-Draft DAP Visual OOB Transaction Auth November 2026 5. _Offline Mobile Execution:_ No active network connection to or from the Trusted Mobile Device (MD) SHALL be needed during transaction authorization. 6. _Attack Countermeasures:_ The protocol implementation MUST include the mechanisms specified in this document to counter brute-force attempts on the authorizer code (Section 9.5), customer impersonation and phishing (Section 9.2), On-Path (MITM) and Man-in-the-Browser (MITB) alteration of the transaction (Section 9.3), and replay (Section 9.4). 7. _Key Protection:_ All cryptographic keys MUST be protected against unauthorized extraction at rest and in use; the keys that e-Bank handles in memory are protected as described in Section 9.7. The key k on MD MUST be stored in the protected storage of the mobile application of the financial institution, and MUST NOT be exported, copied, or included in backups. The mobile application MUST be protected by a local password that the user enters to open it, so that the key k cannot be used by someone who only has physical access to an MD that is switched on. 8. _Cryptographic Strength:_ Implementations MUST utilize symmetric encryption with keys of at least 256 bits (AES-256) [FIPS197] and message authentication based on HMAC-SHA-256 [RFC2104] [RFC6234]. 9. _Modular Architecture:_ The system SHOULD be built with a modular cryptographic architecture so that security updates and algorithm migrations can be applied without interrupting service availability. 3.3. Foundational Design Hypotheses The DAP security model is built upon three foundational hypotheses regarding real-world Internet banking environments: Hypothesis 1: The personal computer (UC) where the transaction is initiated and executed can be fully compromised by malicious code. Hypothesis 2: It is infeasible to guarantee the integrity of the client application (e.g., web browser or plugins) running on UC. Hypothesis 3: It is difficult to protect the human customer from social engineering; therefore, security mechanisms need to minimize reliance on user-memorized secrets and require explicit per-transaction visual confirmation on an uncompromised device. de Melo, et al. Expires 19 May 2027 [Page 10] Internet-Draft DAP Visual OOB Transaction Auth November 2026 4. Cryptographic Primitives and Message Format 4.1. Primary Root Key and Ephemeral Server-Side Key Recovery Storing millions of complete static per-user symmetric keys in a standard application database introduces significant operational risk. In the DAP architecture, the financial institution's HSM holds a set of high-entropy primary root keys MK_1 through MK_n, where each MK is generated inside the HSM with a cryptographically secure random number generator. For each customer, e-Bank stores only the random key share k_1; the complete key k is never stored by e-Bank. For each enrolled customer, the HSM generates the 512-bit key share k_2 in {0,1}^512 deterministically as: k_2 <- F_MK(ID | key_timestamp) where F is HMAC-SHA-512 [RFC2104] [RFC6234] implemented inside the HSM and keyed with the 512-bit root key MK (the key MK_i identified by key_id), so that the output has 512 bits. In other words, k_2 is a 512-bit keyed hash of the data that identify the customer and of the instant at which k_2 is generated; the HSM applies the HMAC directly to these data, and there is no separate encryption step. The instant is stored as key_timestamp in the internal database of the financial institution. The function input x is the following octet string, in which all integers are unsigned and in network byte order (big-endian): x = label | key_id | key_version | len(ID) | ID | key_timestamp * label: the 9 ASCII octets "DAP-k2-v1", which provide domain separation for this derivation. It is not the DAP protocol version carried in the Version field of a challenge. * key_id: a 4-octet identifier of the root key MK_i held in the HSM that is used for this customer. It enables root key rotation. * key_version: a 4-octet key version counter, starting at 1 and incremented each time the customer key is provisioned again (for example, after a suspected compromise of a provisioning session). * len(ID): a 2-octet length, in octets, of ID. * ID: the unique identifier of the customer, not of an account, for example the national taxpayer registry number or an internal unique customer identifier, encoded in UTF-8 [RFC3629]. A customer with several accounts has a single ID and a single key k. The ID is kept on the server and is never carried in a challenge. de Melo, et al. Expires 19 May 2027 [Page 11] Internet-Draft DAP Visual OOB Transaction Auth November 2026 * key_timestamp: an 8-octet value with the server-assigned enrollment time (not to be confused with the generation timestamp of a transaction challenge), in seconds since 1970-01-01T00:00:00Z. The values key_id, key_version, ID, and key_timestamp are kept in the customer record together with k_1. In the remainder of this document, F_MK(ID | key_timestamp) denotes the computation of F over the complete input x. The customer key is then k = k_1 XOR k_2. Because k_2 can be recalculated on demand inside the HSM from the customer data and key_timestamp, the HSM is used only to compute k_2. For each challenge, e-Bank requests k_2 from the HSM, combines it with the stored share k_1 to obtain k = k_1 XOR k_2, partitions k into k'_1 and k'_2, performs the other cryptographic operations of the protocol itself, and immediately discards k_2 and k from working memory. e-Bank MUST NOT permanently store k or k_2 in cleartext. The root key MK never leaves the HSM, and the HSM never receives k_1. The stored share k_1 alone reveals nothing useful about k. Because k_2 and k are handled in the working memory of e-Bank, the HSM protects MK but not the key k of a customer whose challenge is being processed: a compromise of the e-Bank process at that moment exposes that key. The only persistent copy of k is in the protected storage of the mobile application of the customer (Section 3.2). The share k_2 is the output of a keyed function whose key MK never leaves the HSM, and e-Bank keeps only k_1 and the data needed to request k_2. An adversary who obtains the customer database, its backups, or its logs therefore cannot compute k: it also needs the HSM to compute k_2 for that customer. This does not hold against an adversary who can send requests to the HSM, for example by controlling the e-Bank process. For this reason e-Bank SHOULD restrict, rate-limit, and audit the requests for k_2 (see Section 9.7). 4.2. Customer Key Partitioning The 512-bit key k in {0,1}^512 is partitioned into two independent 256-bit (32-octet) subkeys, k'_1 and k'_2, as follows: * k'_1 in {0,1}^256 (32 octets): Used exclusively with HMAC-SHA-256 to guarantee message integrity and authenticity. * k'_2 in {0,1}^256 (32 octets): Used exclusively with AES-256 in Cipher Block Chaining (CBC) mode [FIPS197] [SP800-38A] to protect the confidentiality of the authorizer code r. The integrity of r' is provided by the HMAC tag y. de Melo, et al. Expires 19 May 2027 [Page 12] Internet-Draft DAP Visual OOB Transaction Auth November 2026 4.3. Transaction Challenge Message Layout A DAP challenge is the octet string trans_data | r' | y, laid out as shown in Figure 2. The field trans_data carries the transaction in cleartext, as described in Section 4.3.1. The fields r' and y have fixed lengths of 32 octets each, so trans_data comprises all octets of the challenge except the last 64. The challenge is encoded in Base64 [RFC4648], using the standard alphabet with padding, and the resulting text is the content of the QR code [ISO18004]. +---------------------------------------------------------------+ | | + Transaction Data (trans_data), variable length + | (Nonce; Version; Code; Field_1; ...; Field_n) | | | +---------------------------------------------------------------+ | Protected Authorizer Code (r'), 32 octets | + IV (128 bits) | C (128 bits, one AES-256-CBC block) + +---------------------------------------------------------------+ | | + Authentication Tag (y), 256 bits / 32 octets + | y = HMAC-SHA-256_{k'_1}(trans_data | r') | | | +---------------------------------------------------------------+ Fields are concatenated in the order shown, and the resulting octet string is Base64-encoded before QR code generation. The fields are not aligned to 32-bit words. Figure 2: Challenge Payload Encoded in Visual QR Code 4.3.1. Transaction Data Encoding The field trans_data is a text string made of fields separated by the character ";" (0x3B). It uses only printable US-ASCII characters (0x20 to 0x7E), which are a subset of UTF-8 [RFC3629]. Accented letters and other non-ASCII characters are not accepted: trans_data = Nonce ; Version ; Code ; Field_1 ; ... ; Field_n * Nonce: the unique transaction identifier assigned by e-Bank, a random text of 20 characters taken from the uppercase letters "A" to "Z" and the digits "0" to "9". It is generated with a cryptographically secure random number generator [RFC4086], and e-Bank MUST ensure that it is unique (Section 6.1.1). de Melo, et al. Expires 19 May 2027 [Page 13] Internet-Draft DAP Visual OOB Transaction Auth November 2026 * Version: the version of DAP used to build the challenge, 3 octets long. The current version is "099". MD MUST reject a challenge whose version it does not support. * Code: the transaction code, 3 octets long (for example, "818"), which selects the template. The code "001" is reserved for the key exchange (Section 5.2). The code "000" is reserved for the activation challenge (Section 5.1). * Field_1 to Field_n: the field values, in the order defined by the template. Their lengths are not fixed, but each template defines a type (numeric or alphanumeric) and a maximum length for each field. Numeric fields contain only digits. Alphanumeric fields contain only uppercase letters "A" to "Z", digits, the space, and the punctuation characters that the template permits. The timestamp has 12 digits, in the format YYMMDDHHMMSS (two-digit year, month, day, hour, minute, and second), expressed in Coordinated Universal Time (UTC). The monetary amount is expressed as digits only, without decimal separator; the template defines the currency (for example, BRL) and the number of decimal places. The data type of each field in the template (Section 4.3.2) defines the formatting shown to the user. The character ";" MUST NOT appear inside any field value. e-Bank MUST convert names to uppercase ASCII before building trans_data. MD MUST reject a challenge that contains a character outside the permitted set (including control characters and non-ASCII octets) or a field that does not match the type and the maximum length defined by the template. A template defines, for one transaction code, the ordered list of fields and the mask that the DAP application on MD uses to present them. A template lists only the fields that the user needs to see to confirm the operation; other data of the transaction stay in e-Bank. Credentials such as account passwords or PINs MUST NOT be part of any template or of trans_data. Table 2 shows two examples, inspired by the transaction layouts used by Brazilian banks. The set of codes, the set of operations that require DAP, and the complete list of templates are defined by each financial institution. de Melo, et al. Expires 19 May 2027 [Page 14] Internet-Draft DAP Visual OOB Transaction Auth November 2026 +======+============+=======================================+ | Code | Operation | Fields, in order | +======+============+=======================================+ | 818 | Transfer | Destination branch (5 digits), | | | between | destination account (12 digits), | | | current | check digit (1), beneficiary name (up | | | accounts | to 30 characters), amount (13 digits, | | | | 2 decimal places, BRL), timestamp | +------+------------+---------------------------------------+ | 867 | Payment of | Beneficiary bank (3 digits), bar code | | | a bank | (48 digits), document value, | | | collection | discount, rebate, increase, fine, and | | | slip | amount charged (13 digits each, 2 | | | | decimal places, BRL), timestamp | +------+------------+---------------------------------------+ Table 2: Examples of Transaction Templates In both templates the date and the time shown to the user are derived from the timestamp. Illustrative trans_data values for the code "818", which transfers 1,500.00 to the account 000000123456-7 of branch 01234, are: 7QK2M9XW4HD1R8TZ5PB3;099;818;01234;000000123456;7;MARIA SILVA; 0000000150000;261102133000 (The value is split over two lines in this document for presentation only; in a real challenge it is a single string.) The timestamp field carries the exact instant at which e-Bank generated the transaction challenge. Every template of a code that is carried in a challenge (all codes except "001") MUST include this field and identify it as the generation timestamp, because MD uses it to check the validity of the challenge (see Section 6.1.2). The templates are embedded in the DAP application as an XML file [XML] (Section 4.3.2) and are selected by the transaction code and by the Version. The application updates this file each time it is opened and the user is authenticated. The XML file is digitally signed by the financial institution as a Cryptographic Message Syntax (CMS) SignedData structure [RFC5652] (the successor of PKCS #7), using its private key. The application verifies the signature before using the file, using the corresponding X.509 public certificate [RFC5280] embedded in the application. de Melo, et al. Expires 19 May 2027 [Page 15] Internet-Draft DAP Visual OOB Transaction Auth November 2026 4.3.2. Template File Format The template file is an XML document [XML] whose root element is templates. It contains one template element for each transaction code. A template element has the attributes code (the transaction code) and version (the DAP version to which the template belongs, with the same value and the same 3-octet format as the Version field of trans_data; MD MUST use the template whose version equals the Version of the challenge), and the following child elements: * name: the name of the operation. * field, one or more: a field of trans_data. The order of the field elements is the order of the fields in trans_data after Code. The attributes are id (identifier used by the mask), label (the text shown to the user), type ("N" for numeric or "A" for alphanumeric), max (the maximum length), and datatype, which defines how MD formats the value for display: "text" (shown as received; the default for type "A"), "digits" (shown as received; the default for type "N"), "amount" (the last decimals digits are the decimal places, the leading zeros of the integer part are removed, the thousands and decimal separators follow the language of the user, and the code in currency is shown; a field of this data type has the attributes currency and decimals), "datetime" (twelve digits in the format YYMMDDHHMMSS, in UTC, shown as a date and a time in the format of the language of the user and in the time zone of the device), and "barcode" (digits shown in groups of the size given by the attribute group, 12 by default). In a template of a code that is carried in a challenge, exactly one field has the attribute role="timestamp", which identifies the generation timestamp and has the data type "datetime". * mask: the text that MD shows to the user, where {id} is replaced by the value of the field with that identifier, formatted according to its data type. All transaction codes have a template in the file, including "000" and "001". The template of "000" has the generation timestamp and the activation message. The template of "001" has only the name and the mask text that MD shows while it captures a key share; it has no field elements and no timestamp, because the QR codes of Section 5.2 are not challenges. The labels and the mask are used only for display and can be written in the language of the user; the file is encoded in UTF-8. The values in trans_data are always restricted to US-ASCII (Section 4.3.1). A template contains only the data needed for the display and the validation of the fields. Fields that e-Bank needs de Melo, et al. Expires 19 May 2027 [Page 16] Internet-Draft DAP Visual OOB Transaction Auth November 2026 only for its own processing, and credentials such as passwords, MUST NOT be part of a template. As an example, the template of the code "818" of Table 2 is: 5. Key Provisioning DAP establishes the shared security context between e-Bank and MD through a dual-channel split-key exchange based on XOR-based two- share splitting of the key, followed by an activation challenge. The perfect secrecy of a single share follows from the one-time pad argument [Shannon1949]. The core challenge is provisioning the 512-bit key k to the customer's MD when the primary Internet channel (UC) is assumed to be monitored or controlled by an adversary. DAP solves this by defining k as the XOR of two 512-bit shares, k_1 and k_2, transmitted over two separated channels so that k is never transmitted in full over any communication channel: 1. The server generates a random 512-bit string k_1 with uniform distribution in {0,1}^512 and stores it for the customer. 2. The HSM computes the share k_2 <- F_MK(ID | key_timestamp), whenever it is needed, in {0,1}^512. de Melo, et al. Expires 19 May 2027 [Page 17] Internet-Draft DAP Visual OOB Transaction Auth November 2026 3. The customer key is k = k_1 XOR k_2, where |k_2| = |k_1| = |k| = 512 bits. The value k is not stored. Because k_1 is uniformly distributed in {0,1}^512, an adversary who observes k_2 alone (for example, on the ATM screen) gains no information about k, as in a one-time pad: for every value x in {0,1}^512, Pr[k = x | k_2 = s] = Pr[k_1 = x XOR s] = 1 / (2^512) An adversary who observes k_1 alone (for example, on the untrusted computer UC) gains no computational advantage in learning k, because k_2 is the output of a pseudorandom function keyed with MK inside the HSM. The secrecy of k therefore holds as long as the adversary obtains at most one of the two shares. This argument rests on two assumptions. First, F is a pseudorandom function: without knowledge of MK, its outputs on distinct inputs x are computationally indistinguishable from independent uniform 512-bit strings. Second, MK never leaves the HSM. If either assumption fails, an adversary who learns k_1 alone may be able to learn information about k. 5.1. Provisioning and Activation Procedure The provisioning procedure consists of five operational steps across three phases: Step 1 (Service Request and App Installation): The customer authenticates to e-Bank over the Internet channel using UC, requests enrollment of their mobile device as a second-factor authorizer, and installs the DAP application on MD. Step 2 (Generation and Delivery of k_1): The e-Bank server generates and stores the random share k_1, and assigns key_id, key_version, and key_timestamp to the enrollment. The share k_2 is not computed yet: the HSM computes it when it is needed (Step 4). The e-Bank server returns k_1 to UC, which displays k_1 as a visual QR code on the computer screen (format in Section 5.2). Step 3 (Mobile Capture of k_1): Using the DAP application on MD, the customer captures the visual QR code containing k_1 from UC and stores k_1 temporarily in MD. The customer is then instructed to complete the provisioning at an ATM terminal. Step 4 (Out-of-Band Capture of k_2 and Key Reconstruction): The de Melo, et al. Expires 19 May 2027 [Page 18] Internet-Draft DAP Visual OOB Transaction Auth November 2026 customer authenticates physically at a bank ATM using their bank smartcard and Personal Identification Number (PIN). Upon verification, e-Bank requests k_2 from the HSM and the ATM displays the second key share k_2 as a visual QR code on the ATM screen. The customer captures k_2 using MD. The MD application computes k = k_1 XOR k_2, partitions k into k'_1 and k'_2, securely stores k in the protected storage of the mobile application of the financial institution, and immediately zeroizes (deletes) both k_1 and k_2. Step 5 (Activation): Right after MD receives k_2 and computes k, e-Bank generates an activation challenge with the transaction code "000" and shows it as a QR code on the ATM screen. This challenge has the format of Section 4.3 and is verified by MD as in Section 6.1.2. Its template has no financial fields: it has only the generation timestamp and an activation message. The user confirms the activation on MD, which displays the authorizer code r_hat, and the user enters r_hat at the ATM. If r_hat is correct and is received within the 120-second window (with at most three attempts), e-Bank marks MD as enabled. DAP is activated for the customer only after this verification: before it, e-Bank MUST NOT treat MD as a valid authorizer. If the code is not correct, or the window expires, the activation fails and the customer repeats the procedure. e-Bank SHOULD discard enrollments that are not activated after a period defined by the financial institution. A successful activation shows that e-Bank and MD hold the same key k, so a share that was altered during the provisioning is detected. Figure 3 illustrates the end-to-end interaction between the Customer, UC, ATM, e-Bank, and HSM during symmetric key generation, provisioning, and activation. de Melo, et al. Expires 19 May 2027 [Page 19] Internet-Draft DAP Visual OOB Transaction Auth November 2026 Customer/MD UC e-Bank/HSM ATM | | | | --- Phase 1: Internet channel (Steps 1 to 3 of Section 5.1) --- |-- 1. Enroll ---->| | | | |-- 2. Enroll ------->| | | | | | [3. e-Bank: random k_1, stored; key_id, key_version, key_timestamp] | | | | | |<- 4. QR k_1/001 ----| | |<= 5. Scan =======| | | [6. MD: store k_1] | | | | --- Phase 2: ATM channel (Step 4 of Section 5.1) --- |-- 7. Smartcard + PIN ------------------------------------->| | | |<- 8. Get k_2 -----| [HSM: k_2 = F_MK(ID | key_timestamp)] | | |-- 9. QR k_2/001 ->| |<= 10. Scan (optical, no network) ==========================| | | | | [11. MD: k = k_1 XOR k_2; (k'_1, k'_2) = k; store k; zeroize k_1 and k_2] | | | | --- Phase 3: Activation (Step 5 of Section 5.1) --- [12. e-Bank: activation challenge, code 000] | | |-- 13. QR(000) --->| |<= 14. Scan (optical) ======================================| [15. MD: verify y, Version, Code 000, timestamp; user confirms; MD shows r_hat] |-- 16. Enter r_hat at ATM --------------------------------->| | | |<- 17. r_hat ------| [18. e-Bank: within 120 s? r_hat = r? (at most 3 attempts); if yes, MD is enabled] | | |-- 19. Enabled --->| |<- 20. Activated -------------------------------------------| Figure 3: Symmetric Key Generation and Dual-Channel Exchange (k_1 and k_2) de Melo, et al. Expires 19 May 2027 [Page 20] Internet-Draft DAP Visual OOB Transaction Auth November 2026 5.2. Key Exchange QR Code Format (Code 001) The QR codes that carry k_1 (Step 2) and k_2 (Step 4) use the transaction code "001". They are not challenges in the sense of Section 4.3: MD does not yet hold a key, so the QR codes carry no tag y and no encrypted authorizer code. The content of each QR code is a US-ASCII text string, used directly without Base64 encoding of the whole string, with fields separated by ";" (0x3B): key_share = Version ; Code ; Share ; Enroll ; Value ; Check * Version: 3 octets, as in Section 4.3.1 (currently "099"). * Code: 3 octets, the value "001". * Share: 1 octet, "1" for k_1 (displayed on UC) or "2" for k_2 (displayed on the ATM). * Enroll: an enrollment identifier of 20 characters, generated by e-Bank in the same way as the Nonce (Section 4.3.1). Both shares of one enrollment carry the same value. It is not secret and is not derived from ID. * Value: the 512-bit share (64 octets) encoded in Base64 [RFC4648] with padding (88 characters). * Check: 8 uppercase hexadecimal digits, the first four octets of the SHA-256 hash of the text that precedes the last ";" (from Version to Value, inclusive). It detects reading and transcription errors only and gives no protection against an adversary. For example (with an invented value, split over two lines for presentation only): 099;001;1;7QK2M9XW4HD1R8TZ5PB3;<88 Base64 characters>;<8 hex digits> MD accepts the two QR codes in any order. For each one, MD MUST check that the text has exactly the six fields above, that Version is supported, that Code is "001", that Value decodes to exactly 64 octets, and that Check is correct. MD MUST compute k = k_1 XOR k_2 only when it holds one QR code with Share "1" and one with Share "2" that have the same Enroll; otherwise it MUST reject the second QR code. The stored share SHOULD be discarded if the second share is not captured within a period defined by the financial institution. de Melo, et al. Expires 19 May 2027 [Page 21] Internet-Draft DAP Visual OOB Transaction Auth November 2026 Since the QR codes are not authenticated, a share that is substituted or altered on the way is not detected by MD at this point. It is detected by the activation (Step 5), because MD and e-Bank would hold different keys and the activation challenge would fail. e-Bank MUST make each share QR code valid for a single display, SHOULD expire it after a short period defined by the financial institution, and MUST NOT display k_2 for an enrollment that was not started by the customer through the Internet channel. 6. Dynamic Authorization Protocol (DAP) Transaction Flow Once the customer's Trusted Mobile Device (MD) has been provisioned with key k = (k'_1, k'_2) and activated (Section 5.1), every financial transaction initiated on an Untrusted Computer (UC) MUST execute the DAP challenge-response authorization flow shown in Figure 4. In the figure, challenge denotes the message (trans_data, r', y) encoded in the QR code (Figure 2). Steps 1 to 3 are the usual authentication of the customer at e-Bank. Steps 4 to 7 are described in Section 6.1.1, steps 8 to 12 in Section 6.1.2, and steps 13 to 20 in Section 6.1.3. The optical channel, shown with "=", needs no network connection. de Melo, et al. Expires 19 May 2027 [Page 22] Internet-Draft DAP Visual OOB Transaction Auth November 2026 MD Customer UC e-Bank | | | | | |-- 1. Login ----->| | | | |-- 2. Auth --------->| | | |<- 3. Auth OK -------| | |-- 4. Issue Tx -->| | | | |-- 5. Tx request --->| | | | | [6. e-Bank: build trans_data (Nonce, Version, timestamp); k_2 from HSM, then k = k_1 XOR k_2; new r; r' = IV | CBC-Enc_k'2(r); y = HMAC_k'1(trans_data | r'); start the 120 s timer] | | | | | | |<- 7. QR(challenge) -| | |<- 8. Display QR -| | |<- 9. Open+pwd --| | | |<= 10. Scan QR (optical) ===========| | | | | | [11. MD: y' = HMAC_k'1(trans_data | r'); reject if y' != y; check Version, Code, template; discard if now - timestamp > 120 s or timestamp > now + 60 s; else show Tx] | | | | |-- 12. Show Tx ->| | | |<- 13. Confirm --| | | [14. MD: r_hat = CBC-Dec_k'2(r')] |-- 15. r_hat --->| | | | |-- 16. r_hat ---->| | | | |-- 17. r_hat ------->| | | | | [18. e-Bank: within 120 s? r_hat = r? (at most 3 attempts); if yes, execute the Tx and invalidate r] | | | | | | |<- 19. Tx OK --------| | |<- 20. Receipt ---| | Figure 4: End-to-End Transaction Authorization Sequence 6.1. Detailed Protocol Processing Steps de Melo, et al. Expires 19 May 2027 [Page 23] Internet-Draft DAP Visual OOB Transaction Auth November 2026 6.1.1. Server Challenge Generation When an authenticated customer submits a transaction request from UC, the e-Bank server builds the message m (trans_data) from the fields of the request that the template of the transaction code requires. The Nonce, the Version, and the generation timestamp are always assigned by e-Bank; a value for any of them that is sent by UC MUST be ignored. The server then proceeds as follows: 1. The e-Bank server requests the share k_2 from the HSM, computes the customer's 512-bit key k = k_1 XOR k_2, partitions it into k'_1 and k'_2, records the current time as the generation timestamp of the challenge, and starts a strict 120-second transaction validity timer. The generation timestamp MUST be the value carried in the timestamp field of trans_data. 2. The server assigns a unique transaction identifier Nonce (20 random characters, see Section 4.3.1), checks that it differs from the Nonce of every pending or recent challenge (generating a new one in the event of a collision), and sets the Version field (3 octets) to the DAP version in use. Both are carried inside trans_data. The server generates a pseudorandom authorizer code r uniformly distributed in the integer sample space 0 <= r <= 999999 using a cryptographically secure random number generator [RFC4086] and rejection sampling (to avoid modulo bias), encoded as six ASCII decimal digits with leading zeros (6 octets). The server keeps r for the pending challenge until the challenge is accepted, invalidated, or expired (at most 120 seconds), and then deletes it. 3. The server generates a fresh 128-bit IV from a cryptographically secure random number generator, pads r (six ASCII digits) to one 16-octet block using the PKCS#7 padding scheme [RFC5652], and encrypts the block using AES-256 in CBC mode [SP800-38A] with subkey k'_2: C = CBC-Enc_{k'_2}(IV, r). The server then sets r' = IV | C. The server MUST NOT reuse an IV with the same key k'_2. 4. The server computes the message authentication tag y over the concatenation of the transaction details trans_data (which include the Nonce) and the encrypted authorizer code r' using HMAC-SHA-256 with subkey k'_1: y = HMAC-SHA- 256_{k'_1}(trans_data | r'). 5. The server forms the challenge trans_data | r' | y, encodes it in Base64 [RFC4648], renders the text as a two-dimensional QR code image [ISO18004], and transmits it to UC for display on the customer's screen. de Melo, et al. Expires 19 May 2027 [Page 24] Internet-Draft DAP Visual OOB Transaction Auth November 2026 6.1.2. Out-of-Band Visual Capture and Mobile Verification Upon seeing the QR code challenge on UC, the customer activates the DAP application on MD and captures the visual code using the device's camera: 1. MD decodes the QR code and the Base64 text, and splits the resulting octet string into y (the last 32 octets), r' (the preceding 32 octets), and trans_data (all remaining octets). If the text is not valid Base64, or the decoded string has fewer than 64 octets plus the minimum trans_data (Nonce, Version, Code, and their separators), MD MUST reject the challenge before computing the tag. 2. Using its locally stored authentication subkey k'_1, MD independently computes: y' = HMAC-SHA-256_{k'_1}(trans_data | r'). 3. MD compares y' with the received tag y in constant time. If y' != y, MD MUST immediately reject the challenge, display an integrity/authenticity error alert to the user, and terminate without decrypting r'. 4. If y' equals y, the challenge is proven to be authentic and unmodified since leaving e-Bank. MD parses trans_data into its fields, checks that the Version is supported, looks up the template selected by the transaction code and by the Version, and checks that the code is known, that the number of fields matches the template, and that every field has the type, the maximum length, and the character set defined by the template. If any check fails, MD MUST reject the challenge. 5. MD reads the generation timestamp from the timestamp field of trans_data and compares it, in UTC, with the current time of its own clock. If more than 120 seconds have elapsed since the generation timestamp, MD MUST discard the challenge, MUST NOT display the transaction or decrypt r', and MUST inform the user that the challenge has expired and that a new transaction must be initiated. If the generation timestamp is later than the current time of MD by more than 60 seconds (the tolerance for the variation of the clocks of mobile phones, which are not always synchronized with a reliable time source), MD MUST also discard the challenge and ask the user to check the date and time of the device. This check is complementary: e-Bank remains the authority on the lifespan of the challenge and enforces the 120-second limit independently (see Section 6.1.3 and Section 9.4). de Melo, et al. Expires 19 May 2027 [Page 25] Internet-Draft DAP Visual OOB Transaction Auth November 2026 6. If the challenge is still valid, MD applies the template mask to display the transaction on its trusted screen (for example, source and destination accounts and names, amount, and date) and prompts the user with explicit Confirm and Cancel controls. 6.1.3. Authorizer Code Recovery and Transaction Execution 1. The user visually compares the transaction details displayed on MD against the intended operation (WYSIWYS). If the details do not match what the user intended, the user selects Cancel, and MD discards the challenge. Because MD does not communicate with e-Bank, the pending transaction expires at e-Bank after at most 120 seconds, unless the user cancels it on UC. 2. If the user selects Confirm, MD decrypts the authorizer code by parsing r' = IV | C and decrypting it with AES-256 in CBC mode and subkey k'_2: r_hat = CBC-Dec_{k'_2}(IV, C). If the padding is invalid or the result is not six ASCII decimal digits, MD MUST reject the challenge and MUST NOT display any code. Otherwise, MD displays the 6-digit authorizer code r_hat (e.g., 431287) on the mobile screen. 3. The user types the 6-digit code r_hat into the web interface on UC, which transmits r_hat to e-Bank. 4. e-Bank checks whether the 120-second validity window has expired. If the timer has expired, the transaction MUST be cancelled. Otherwise, e-Bank verifies whether r_hat equals r for that specific pending transaction m, using a constant-time comparison. If and only if they match, e-Bank commits and executes the transaction and invalidates r immediately so it cannot be reused. If they do not match, e-Bank counts a failed attempt and SHOULD allow at most three attempts for the same challenge within the 120-second window. After the third failed attempt, e-Bank SHOULD invalidate the challenge and cancel the transaction (see Section 9.5). 7. Key Lifecycle and Device Management This section describes how e-Bank handles the loss or replacement of MD, the revocation of the DAP enrollment of a customer, and the rotation of root keys. de Melo, et al. Expires 19 May 2027 [Page 26] Internet-Draft DAP Visual OOB Transaction Auth November 2026 7.1. Loss, Replacement, and Revocation If the customer loses MD, has it stolen, or stops using the DAP application, the customer revokes the enrollment at an ATM, authenticating with the bank smartcard and the PIN, or at a branch of the financial institution. After the revocation, e-Bank: * MUST delete the stored share k_1 of the customer, which makes k unrecoverable on the server; * MUST stop generating DAP challenges for the customer, and MUST reject any authorizer code related to a pending challenge of the customer; and * SHOULD record the revocation and notify the customer through a channel registered by the customer. There is no alternative way to authorize a transaction when MD is lost: the recovery of the service is possible only at an ATM or at a branch. A recovery procedure MUST NOT weaken DAP; in particular, e-Bank MUST NOT offer a fallback authentication channel (such as SMS or a static code) for an operation that requires DAP, because it would allow an attacker to downgrade the protocol. A customer who replaces MD enrolls the new device with the provisioning and activation procedure of Section 5. The new enrollment MUST generate a new k_1 and a new key_timestamp, and MUST increment the key_version counter of the key, so that the key of the previous device is no longer valid. The key k is stored in the protected storage of the mobile application of the financial institution and is not exportable (see the Key Protection premise in Section 3.2), so it cannot be moved to another device: a new device always needs a new enrollment and a new activation. 7.2. Root Key Rotation The root key MK_i is identified by key_id. Because k_2 is derived from MK_i, a change of the root key of a customer changes k, and the customer has to be re-provisioned. For this reason, e-Bank SHOULD keep each MK_i in the HSM while at least one active customer record refers to its key_id, and SHOULD use a new key_id for new enrollments after a rotation. If an MK_i is suspected to be compromised, e-Bank MUST revoke all enrollments that use it and re-provision the affected customers. de Melo, et al. Expires 19 May 2027 [Page 27] Internet-Draft DAP Visual OOB Transaction Auth November 2026 8. Operational Considerations The following points concern the deployment of DAP: * _QR code size._ The size of the QR code grows with the length of trans_data and with the Base64 encoding [RFC4648] of the challenge. Templates SHOULD limit the number and the length of the fields, so that the code stays readable on common screens and cameras [ISO18004]. * _Clock of MD._ The check of the generation timestamp (Section 6.1.2) depends on the clock of MD. The clocks of mobile phones vary (for example, manual settings or drift), so MD tolerates a generation timestamp that is ahead of its own clock by up to 60 seconds. The DAP application SHOULD tell the user to check the date and time of the device when it discards a challenge for this reason. * _Availability of the HSM._ The HSM recomputes k_2 for each challenge (including the activation challenge), so its capacity and availability limit the number of transactions that e-Bank can authorize. * _Templates._ The signed template file is updated when the application is opened and the user is authenticated (Section 4.3.2). A challenge whose transaction code is not in the installed file is rejected, so a new transaction code needs to be distributed before e-Bank starts to use it. The codes "000" (activation) and "001" (key exchange) are reserved and are present in every installed file. * _Operations that require DAP._ The financial institution defines which operations require DAP, for example transfers, payment of bank collection slips, and changes to registration data. Operations of low risk can be left out. * _Monitoring._ e-Bank SHOULD monitor expired challenges, failed attempts, and revocations per customer (Section 9.5), because an unusual number of them may indicate an attack in progress. 9. Security Considerations 9.1. Formal Adversary Model The security of DAP is evaluated against an active adversary, in the spirit of [Bellare1994], capable of interacting with the three system environments under the following assumptions. DAP has not been analyzed in the model of that reference. de Melo, et al. Expires 19 May 2027 [Page 28] Internet-Draft DAP Visual OOB Transaction Auth November 2026 * _Full Control of Untrusted Computer (UC):_ The adversary has complete control over the customer's personal computer via malware or trojans. The adversary can read, modify, inject, suppress, or delay any message exchanged over the Internet channel between UC and e-Bank, and can capture all keystrokes and screen contents on UC. * _Limited Observation of ATM Terminal:_ The adversary can observe information entered via the ATM keypad (e.g., via cameras or skimmers) during physical interactions, but is assumed not to have internal logical control over the ATM hardware or its dedicated bank network link, nor physical possession of the customer's smartcard. The adversary is also assumed not to observe the ATM screen while the key share k_2 is displayed; see the key share independence assumption below. * _Isolation of Trusted Mobile Device (MD):_ The adversary does not control the customer's MD and cannot extract or modify the cryptographic key k = (k'_1, k'_2) stored in the mobile application's protected storage. Note that if an adversary compromises the ATM itself while also capturing the customer's smartcard and PIN, the adversary could already execute arbitrary transactions directly at the ATM independently of Internet banking. Similarly, if the adversary gains full root control over MD and extracts k, the second-factor assumption is violated. A compromise of the e-Bank servers is outside this adversary model; Section 9.7 describes the exposure and the controls that reduce it. _Key share independence assumption:_ The secrecy of k in the key provisioning procedure (Section 5) holds only if the adversary obtains at most one of the two shares k_1 and k_2. Because an adversary controlling UC learns k_1 by definition, an adversary that also captures the ATM screen at the time k_2 is displayed (for example, with a hidden camera) can compute k = k_1 XOR k_2 and would defeat the scheme. Deployments therefore need to treat the ATM display of k_2 as sensitive: * The ATM SHOULD display the QR code of k_2 only after successful smartcard and PIN verification, only once per provisioning session, and for a short time, and it SHOULD use a privacy- shielded display. * If a provisioning session is suspected of having been observed, the financial institution SHOULD invalidate the key k and repeat provisioning. de Melo, et al. Expires 19 May 2027 [Page 29] Internet-Draft DAP Visual OOB Transaction Auth November 2026 9.2. Resistance to Customer Impersonation Attacks In a classic Customer Impersonation Attack (via phishing, pharming, or credential-stealing trojans), the adversary captures the static credentials of the customer (account identifiers, static authentication secrets, and a device or hardware fingerprint). Even when an adversary successfully harvests these credentials and clones the device fingerprint to establish a fraudulent session with e-Bank, the adversary is not able to authorize any transaction under the adversary model of Section 9.1, because: 1. Every transaction generates a fresh challenge encrypted under k'_2 and authenticated under k'_1. 2. The key k is never stored on UC and is unknown to the customer (preventing phishing of k). 3. Without k'_2, the authorizer code r cannot be recovered from r', so the adversary can only guess it. The probability of a correct guess is 10^-6 per attempt and, when e-Bank applies the limit of three attempts per challenge within the 120-second window, at most 3 x 10^-6 per challenge (see Section 9.5). 4. Only the holder of k'_1 can produce a valid tag y, so a phishing site cannot create a challenge that MD accepts. 9.3. Resistance to Man-in-the-Browser (MITB) Attacks In a Man-in-the-Browser (MITB) attack, malware residing on UC waits for the legitimate customer to log in and either (a) silently initiates background transactions using the customer's active session or (b) substitutes the beneficiary account and amount of a customer- initiated transaction while displaying the original legitimate details on the UC browser screen (an "unverified signature" attack). Under the adversary model of Section 9.1, DAP is designed to prevent both attack variants: * If the malware attempts to modify trans_data inside the QR code on UC so that the mobile screen shows the legitimate beneficiary while e-Bank executes the fraudulent transaction, the HMAC-SHA-256 verification y' = HMAC_{k'_1}(trans_data | r') on MD will fail because the adversary does not possess k'_1. * If the malware passes the unmodified fraudulent challenge QR code from e-Bank to the screen of UC, MD will verify the HMAC and display the _actual_ (fraudulent) beneficiary account and amount on the trusted mobile screen. By inspecting MD's screen de Melo, et al. Expires 19 May 2027 [Page 30] Internet-Draft DAP Visual OOB Transaction Auth November 2026 (WYSIWYS), the customer immediately detects that the transaction parameters do not match their intent and cancels the authorization. * Even if the adversary intercepts the 6-digit response r_hat entered by the customer on UC for a legitimate transaction m_1, the adversary cannot reuse r_hat to authorize a different transaction m_2, because r is generated for a single challenge and is bound on the server to m_1 and to its Nonce. 9.4. Replay Protection and Challenge Expiration Each challenge incorporates a fresh Nonce (inside trans_data), transaction parameters trans_data, and a single-use random code r with a strict server-enforced lifespan of at most 120 seconds. Once an authorizer code r is verified or its 120-second timer expires or the attempt limit is reached, the server immediately invalidates the challenge context, preventing replay attacks. The generation timestamp is inside trans_data and is therefore covered by the HMAC under k'_1: an attacker cannot refresh an old challenge by changing its timestamp without knowing k'_1. A QR code that was photographed, captured, or retained and presented to MD more than 120 seconds after its generation is discarded by MD before the transaction is shown and before the authorizer code is revealed. This reduces the opportunity for social-engineering attacks that persuade the user to scan an old QR code. The check on MD depends on the device clock, which is not trusted by the protocol, and it does not include the time the user needs to review the data and type the code. For these reasons it is complementary, and the server-side 120-second limit remains mandatory. A device with a wrong clock may reject valid challenges, in which case MD asks the user to check the date and time of the device. MD does not communicate with e-Bank, so it cannot know whether a challenge has already been used. Within the 120-second lifespan, the same QR code can therefore be scanned and its authorizer code displayed more than once. This does not weaken the protocol, because e-Bank accepts the code of a challenge only once and invalidates it afterwards (Section 6.1.3). To make a repeated presentation visible to the user, MD SHOULD keep the Nonce of each challenge whose authorizer code it has displayed for at least 120 seconds, and SHOULD warn the user when it receives a challenge with the same Nonce again. de Melo, et al. Expires 19 May 2027 [Page 31] Internet-Draft DAP Visual OOB Transaction Auth November 2026 9.5. Limits on Authorizer Code Attempts The authorizer code r has only 10^6 possible values (000000 to 999999). An adversary that controls UC can submit candidate codes automatically, and can do so for a transaction that the adversary itself initiated in a fraudulent session, without any action of the customer. With N attempts for one challenge, the probability of success is N / 10^6, so the number of attempts needs to be bounded. To keep this probability low, e-Bank SHOULD: * accept at most three attempts to submit the code for a challenge within its 120-second lifespan, and invalidate the challenge and cancel the transaction after the third failed attempt; * limit the number of pending transactions per customer, and limit the number of failed or cancelled challenges per customer in a time window, taking a further action (such as a temporary block of financial transactions, a new customer authentication, or an alert to the customer) when the limit is reached; and * compare the submitted code with r in constant time. The cumulative limit per customer is a recommendation of this document and no value is specified; a deployment may also choose not to block the customer after failed or cancelled challenges, and to rely on monitoring instead. The specific limits are a policy of the financial institution. A lower limit reduces the probability of a successful guess but cancels more transactions because of typing mistakes by the customer. 9.6. Key Exchange QR Codes The QR codes of the code "001" (Section 5.2) carry the shares k_1 and k_2 without a tag or a signature, because MD does not yet hold a key. An adversary that controls UC can therefore replace the QR code of k_1 by one of its own choice. MD does not detect the substitution when it captures the share, nor when it computes k, but the key of MD then differs from the key of e-Bank. The activation (Step 5 of Section 5.1) fails, because MD either cannot verify the tag of the activation challenge or, when only the second half of k differs, cannot decrypt r' into six decimal digits, and e-Bank does not mark MD as enabled. The same holds for a modified k_2. The check value of the QR code detects only reading errors and does not protect against an adversary. The enrollment identifier prevents the combination of shares of different enrollments but is not secret. For these reasons, e-Bank MUST NOT treat MD as a valid authorizer before a successful activation, and the user needs to be told to repeat the enrollment if the activation fails. de Melo, et al. Expires 19 May 2027 [Page 32] Internet-Draft DAP Visual OOB Transaction Auth November 2026 9.7. Protection of Key Material at e-Bank The HSM computes only k_2 (Section 4.1). The key k and the subkeys k'_1 and k'_2 exist in the working memory of e-Bank while a challenge is built. The data stored by e-Bank do not allow the computation of k without the HSM, but an adversary who controls the e-Bank process, or the service that sends requests to the HSM, can obtain k_2 for any customer. With k and the credentials of the customer, that adversary can start a transaction, recover r from r', and authorize the transaction without MD, for as long as it holds the keys. To reduce this exposure, e-Bank: * SHOULD run the code that requests k_2 and handles k in a service isolated from the components that face UC, with no direct access from the Internet; * SHOULD allow requests for k_2 only on behalf of a pending challenge or activation, limit their rate per customer and in total, and audit them, raising an alert for requests that have no corresponding transaction; * SHOULD erase k_2, k, k'_1, and k'_2 from memory immediately after use, prevent them from reaching swap space and memory dumps, and MUST NOT write them, or r, to logs; * SHOULD keep the database of the shares k_1 under an access control that is distinct from that of the service that requests k_2, so that the compromise of one of them does not give k; and * MAY perform the operations that use k inside the HSM (the e-Bank sends k_1, r, the IV, and trans_data to the HSM, which returns r' and y), so that k never leaves it. 9.8. Denial of Service An adversary that controls UC, or that has the static credentials of a customer, can start transactions and exhaust the three attempts, which cancels legitimate transactions of the customer. The adversary can also create many pending transactions, which consumes resources of e-Bank, including the HSM, that recomputes k_2 for each challenge. e-Bank SHOULD limit the number of pending transactions and the rate of challenges per customer and per source, and SHOULD dimension the HSM for the expected load. de Melo, et al. Expires 19 May 2027 [Page 33] Internet-Draft DAP Visual OOB Transaction Auth November 2026 9.9. Transaction Templates The templates embedded in the DAP application determine how MD presents the authenticated trans_data to the user, so they are part of the trusted base of MD. A modified template could display values in the wrong positions even when the HMAC verification succeeds. The template file is digitally signed by the financial institution as a CMS SignedData structure [RFC5652]. The DAP application MUST verify this signature, using the public certificate of the financial institution embedded in the application, before installing or using the file, and MUST reject a file whose signature is missing or invalid. Because ";" is the field delimiter, e-Bank MUST NOT include ";" in any field value, and MD MUST reject challenges whose transaction code is unknown or whose number of fields does not match the template. 9.10. Formal Verification An earlier version of the DAP protocol was formally verified with respect to smartphone, agent, and server operations using Paulson's inductive method [Paulson1998] in Isabelle/HOL [Oliveira2019] [DAPRepo2024]. That verification does not cover the elements specified in this document that were added or refined afterwards, namely the transaction templates, the generation timestamp and its check on MD, the Nonce, and the signed template file. Those elements have not been formally verified. 9.11. Residual Risks and Human Factors Because, under the adversary model of Section 9.1, DAP does not allow automated technical forgery of transaction authorizations on UC, adversaries are forced to resort to active social engineering, persuading the human customer to scan a challenge QR code, ignore the fraudulent transaction details displayed on MD, and read back the resulting 6-digit code r_hat. While this requires continuous, real- time human cooperation for every single transaction (making large- scale automated fraud considerably harder), financial institutions SHOULD combine DAP with clear User Interface (UI) warnings on MD emphasizing that the user needs to verify the beneficiary and amount before pressing Confirm. de Melo, et al. Expires 19 May 2027 [Page 34] Internet-Draft DAP Visual OOB Transaction Auth November 2026 Malware on MD itself is outside the adversary model of Section 9.1 and remains a residual risk. Such malware could cover the screen of the DAP application with an overlay, use the accessibility services of the operating system to read or press controls, or share the screen with the adversary, which would expose the transaction details and the authorizer code. The DAP application SHOULD use the protections of the operating system against overlays and screen capture, and the user needs to keep the device free of untrusted applications. 10. Privacy Considerations This section follows the guidance of [RFC6973]. * _Data in the QR code._ The field trans_data is sent in cleartext and can contain account numbers, names, and amounts. Anyone who can see or photograph the screen of UC when the code is displayed can read them. The transaction details are already known to UC, but they are also exposed to observers. The confidentiality of the transaction data on the visual channel is not a goal of DAP, which protects the integrity of trans_data and the confidentiality of the authorizer code r. Templates SHOULD include only the fields that the user needs to verify the transaction. * _Data stored on MD._ MD stores the key k and the signed template file. The DAP application SHOULD NOT keep the contents of trans_data after the transaction ends, and SHOULD NOT write them in logs. * _Data stored on e-Bank._ For each customer, e-Bank keeps k_1, key_id, key_version, ID, and key_timestamp. These values are identifiers and key material, and e-Bank SHOULD protect them and limit their retention to the period in which the enrollment is active, subject to the legal requirements that apply to the financial institution. * _Customer identifier._ The ID of the customer is personal data. It is kept on the server and is never carried in a challenge or shown in a QR code. * _Applicable law._ The processing of personal data by the financial institution is subject to the data protection law that applies to it. This document does not define legal requirements. 11. IANA Considerations This document has no IANA actions. de Melo, et al. Expires 19 May 2027 [Page 35] Internet-Draft DAP Visual OOB Transaction Auth November 2026 12. References 12.1. Normative References [FIPS197] National Institute of Standards and Technology (NIST), "Advanced Encryption Standard (AES)", FIPS 197, May 2023, . [ISO18004] International Organization for Standardization (ISO), "Information technology - Automatic identification and data capture techniques - QR Code bar code symbology specification", ISO/IEC 18004:2024, August 2024. This specification is available for purchase from ISO. [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003, . [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, . [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., Housley, R., and W. Polk, "Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, . [RFC5652] Housley, R., "Cryptographic Message Syntax (CMS)", STD 70, RFC 5652, DOI 10.17487/RFC5652, September 2009, . [RFC6234] Eastlake 3rd, D. and T. Hansen, "US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)", RFC 6234, DOI 10.17487/RFC6234, May 2011, . de Melo, et al. Expires 19 May 2027 [Page 36] Internet-Draft DAP Visual OOB Transaction Auth November 2026 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [SP800-38A] National Institute of Standards and Technology (NIST), "Recommendation for Block Cipher Modes of Operation: Methods and Techniques", NIST Special Publication 800-38A, DOI 10.6028/NIST.SP.800-38A, December 2001, . [XML] World Wide Web Consortium, "Extensible Markup Language (XML) 1.0 (Fifth Edition)", W3C Recommendation, November 2008, . 12.2. Informative References [Bellare1994] Bellare, M. and P. Rogaway, "Entity Authentication and Key Distribution", Advances in Cryptology - CRYPTO '93 pp. 232-249, 1994, . [DAPRepo2024] de Oliveira, F. R., "Formal Verification Repository for DAP", July 2024, . [Melo2012] de Melo, L. P., "DAP (Dynamic Authorization Protocol): Secure Approach Out-of-Band for E-Bank with a Two-Factor Visual Authentication", Ph.D. Thesis University of Brasilia, Brasilia, Brazil, 2012. [Melo2024] de Melo, L. P., Amaral, D. M., Albuquerque, R. O., de Sousa Junior, R. T., Sandoval Orozco, A. L., and L. J. Garcia Villalba, "A Secure Approach Out-of-Band for e-Bank with Visual Two-Factor Authorization Protocol", Cryptography Vol. 8, No. 4, 51, DOI 10.3390/cryptography8040051, November 2024, . [Oliveira2019] de Oliveira, F. R., "Verification of the Dynamic Authorization Protocol", M.Sc. Thesis University of Brasilia, Brasilia, Brazil, 2019. de Melo, et al. Expires 19 May 2027 [Page 37] Internet-Draft DAP Visual OOB Transaction Auth November 2026 [Paulson1998] Paulson, L. C., "The Inductive Approach to Verifying Cryptographic Protocols", Journal of Computer Security Vol. 6, pp. 85-128, 1998, . [PSD2RTS] European Commission, "Commission Delegated Regulation (EU) 2018/389 supplementing Directive (EU) 2015/2366 with regard to regulatory technical standards for strong customer authentication and common and secure open standards of communication", November 2017, . [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10.17487/RFC4086, June 2005, . [RFC4226] M'Raihi, D., Bellare, M., Hoornaert, F., Naccache, D., and O. Ranen, "HOTP: An HMAC-Based One-Time Password Algorithm", RFC 4226, DOI 10.17487/RFC4226, December 2005, . [RFC6238] M'Raihi, D., Machani, S., Pei, M., and J. Rydell, "TOTP: Time-Based One-Time Password Algorithm", RFC 6238, DOI 10.17487/RFC6238, May 2011, . [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., Morris, J., Hansen, M., and R. Smith, "Privacy Considerations for Internet Protocols", RFC 6973, DOI 10.17487/RFC6973, July 2013, . [Shannon1949] Shannon, C. E., "Communication Theory of Secrecy Systems", Bell System Technical Journal Vol. 28, No. 4, pp. 656-715, October 1949, . [Starnberger2009] Starnberger, G., Froihofer, L., and K. M. Goeschka, "QR- TAN: Secure Mobile Transaction Authentication", Proceedings of ARES 2009 pp. 578-583, March 2009, . de Melo, et al. Expires 19 May 2027 [Page 38] Internet-Draft DAP Visual OOB Transaction Auth November 2026 [WebAuthn2] World Wide Web Consortium, "Web Authentication: An API for accessing Public Key Credentials Level 2", W3C Recommendation, April 2021, . Authors' Addresses Laerte Peotta de Melo University of Brasilia Department of Electrical Engineering Campus Universitario Darcy Ribeiro, Asa Norte Brasilia-DF 70910-900 Brazil Email: laerte.melo@unb.br URI: https://orcid.org/0000-0002-2075-6601 Dino Macedo Amaral University of Brasilia Department of Electrical Engineering Campus Universitario Darcy Ribeiro, Asa Norte Brasilia-DF 70910-900 Brazil Email: dino.macedo@gmail.com URI: https://orcid.org/0000-0002-8023-1057 Robson de Oliveira Albuquerque University of Brasilia Department of Electrical Engineering Campus Universitario Darcy Ribeiro, Asa Norte Brasilia-DF 70910-900 Brazil Email: robson@redes.unb.br URI: https://orcid.org/0000-0002-6717-3374 Joao Jose Costa Gondim University of Brasilia Department of Electrical Engineering Campus Universitario Darcy Ribeiro, Asa Norte Brasilia-DF 70910-900 Brazil de Melo, et al. Expires 19 May 2027 [Page 39] Internet-Draft DAP Visual OOB Transaction Auth November 2026 Email: gondim@unb.br URI: https://orcid.org/0000-0002-5873-7502 Fabio Lucio Lopes de Mendonca University of Brasilia Department of Electrical Engineering Campus Universitario Darcy Ribeiro, Asa Norte Brasilia-DF 70910-900 Brazil Email: fabio.mendonca@unb.br URI: https://orcid.org/0000-0001-7100-7304 Rafael Timoteo de Sousa Junior University of Brasilia Department of Electrical Engineering Campus Universitario Darcy Ribeiro, Asa Norte Brasilia-DF 70910-900 Brazil Email: desousa@unb.br URI: https://orcid.org/0000-0003-1101-3029 de Melo, et al. Expires 19 May 2027 [Page 40]