ISO 25186:2026
(Main)Financial services — Methods for the generation and verification of card security codes
- Abstract
This document defines a method for generating and verifying card security codes (CSCs) using cipher-based message authentication code (CMAC) or keyed-hash message authentication code (HMAC). Key management mechanisms associated with these processes are beyond the scope of this document.
- Status
- Published
- Publication Date
- 02-Aug-2026
- Technical Committee
- ISO/TC 68/SC 2 - Financial Services, security
- Drafting Committee
- ISO/TC 68/SC 2/WG 13 - Security in retail banking
- Current Stage
- 6060 - International Standard published - 60 Publication
- Start Date
- 03-Aug-2026
- Due Date
- 01-Jul-2027
- Completion Date
- 01-Jul-2027
ISO 25186:2026 is an International Standard from ISO for financial services. It specifies methods for generating and verifying card security codes (CSCs) using cipher-based message authentication code (CMAC) or keyed-hash message authentication code (HMAC), for use by card issuers, their agents, and other implementers of CSC systems.
What does ISO 25186:2026 specify?
ISO 25186:2026 defines how to generate and verify CSCs and how to choose the MAC algorithm used for that purpose. It focuses on the CSC calculation method, the inputs to that calculation, and the checks needed for generation and verification.
The document is organized into:
- Clause 1, Scope
- Clause 2, Normative references
- Clause 3, Terms and definitions
- Clause 4, Generation and verification
- Clause 5, MAC algorithm
- Annex A, Worked examples
- Bibliography
Annex A is informative and gives practical examples of the calculation process.
What are the key requirements of ISO 25186:2026?
ISO 25186:2026 requires CSCs to be calculated from defined payment-card data using a MAC algorithm and a dedicated CSC key. That matters because the same method must be used by the generator and the verifier if the code is to match.
CSC calculation inputs and format
Clause 4.1 requires the MAC algorithm to be applied to the data listed in Table 1, including the PAN or PAN token, PSN, expiry date, optional service code, and optional diversification data. Decimal fields are encoded as four-bit nibbles, and conditional padding may be added to reach a byte boundary. In practice, implementers have to map the card data into the prescribed input string exactly.
Clause 4.1 also uses an output-length parameter, l, for the CSC length. The standard recommends making CSC length an input parameter so the code output is tied to the intended length. In practice, systems need to agree on the CSC length or carry it explicitly.
How the CSC is formed
Clause 4.1 states a three-step extraction process: first take decimal nibbles from the MAC result, then, if needed, convert hexadecimal nibbles A to F into decimal digits by subtracting 10, and finally select the leftmost l digits. This means the verifier must follow the same nibble selection logic, not just compute a MAC and truncate it arbitrarily.
Generation and anti-replay
Clause 4.2 says generation shall use the CSC algorithm and the output shall be the CSC. It also says each freshly generated CSC shall be unique to help prevent replay attacks. If the PAN, PSN, expiry date, and service code do not already make each generation unique, diversification data shall be used. For single-use CSCs, the verifier should include replay detection. In practice, this means issuers need a uniqueness strategy, such as a timestamp, counter, or random number.
Verification and multiple CSCs
Clause 4.3 says verification recalculates the expected CSC and compares it with the received value. Clause 4.4 allows a single account to have more than one CSC for different purposes, using either a unique CSC key per purpose or a purpose identifier in the diversification data. That gives implementers two ways to separate different uses without changing the basic algorithm.
Approved MAC algorithms and key strength
Clause 5 limits the MAC algorithm to CMAC as defined in ISO/IEC 9797-1 algorithm 5 or HMAC as defined in ISO/IEC 9797-2 algorithm 2. CMAC shall only be used with a 16-byte block cipher from ISO/IEC 18033-3, and HMAC shall only be used with a hashing algorithm from ISO/IEC 10118-3. CSC keys shall have at least 128 bits of cryptographic strength. In practice, this constrains both the algorithm family and the underlying cryptographic primitive.
What terms does ISO 25186:2026 define?
- CMAC - a cipher-based message authentication code based on a symmetric block cipher.
- CSC - a cryptographic checksum generated by a card issuer or agent to authenticate a primary account number and its service code with expiry date.
- CSC key - the key used with a MAC algorithm to calculate the CSC.
- HMAC - a keyed-hash message authentication code based on a cryptographic hash function.
- MAC - the bit string output of a MAC algorithm.
- PAN - the primary account number that identifies the card issuer and cardholder.
- PSN - the PAN sequence number used to distinguish cards with the same PAN.
- PAN token - a surrogate value used instead of the original PAN.
Who uses ISO 25186:2026?
ISO 25186:2026 is used in financial services, especially for payment cards and remote commerce transactions. It is relevant to card issuers, their agents, and teams that design, implement, test, or verify CSC generation and validation.
It also matters for systems that use smart cards, phones, or other devices with cryptographic computation capabilities. For a buyer or quality manager, the document helps identify whether a CSC implementation follows the same generation and verification method on both sides.
Which standards are used with ISO 25186:2026?
ISO 25186:2026 cites four normative references:
- ISO/IEC 9797-1 - defines MAC mechanisms using a block cipher and supplies CMAC algorithm 5.
- ISO/IEC 9797-2 - defines MAC mechanisms using a dedicated hash function and supplies HMAC algorithm 2.
- ISO/IEC 18033-3 - supplies the block ciphers that may be used with CMAC.
- ISO/IEC 10118-3 - supplies the hash functions that may be used with HMAC.
The bibliography also cites ISO/IEC 7812-1 for the numbering system used in PANs and ISO 9564-1 for PAN-related terminology.
What does the ISO 25186:2026 document contain?
ISO 25186:2026 contains the CSC calculation procedure, the verification method, and the rule set for choosing CMAC or HMAC. It also includes the required input fields for CSC calculation and explains how decimal digits are encoded as nibbles.
Annex A provides five worked examples, including cases using AES CMAC and HMAC-SHA256, with and without diversification data, different PAN lengths, and an edge case where insufficient decimal nibbles require the hexadecimal-to-decimal conversion step. These examples help implementers test encoding, padding, output-length handling, and verification behavior against a known process.
Get Certified
Connect with accredited certification bodies for this standard

BSI Group
BSI (British Standards Institution) is the business standards company that helps organizations make excellence a habit.

Great Wall Tianjin Quality Assurance Center
Established 1993, first batch to receive national accreditation with IAF recognition.
Hong Kong Quality Assurance Agency (HKQAA)
Hong Kong's leading certification body.
Sponsored listings
Frequently Asked Questions
ISO 25186:2026 is a standard published by the International Organization for Standardization (ISO). Its full title is "Financial services — Methods for the generation and verification of card security codes". This standard covers: This document defines a method for generating and verifying card security codes (CSCs) using cipher-based message authentication code (CMAC) or keyed-hash message authentication code (HMAC). Key management mechanisms associated with these processes are beyond the scope of this document.
This document defines a method for generating and verifying card security codes (CSCs) using cipher-based message authentication code (CMAC) or keyed-hash message authentication code (HMAC). Key management mechanisms associated with these processes are beyond the scope of this document.
ISO 25186:2026 is classified under the following ICS (International Classification for Standards) categories: 03.060 - Finances. Banking. Monetary systems. Insurance; 35.240.15 - Identification cards. Chip cards. Biometrics. The ICS classification helps identify the subject area and facilitates finding related standards.
ISO 25186:2026 is available in PDF format for immediate download after purchase. The document can be added to your cart and obtained through the secure checkout process. Digital delivery ensures instant access to the complete standard document.
Standards Content (Sample)
Contents
- Introduction
- 1 Scope
- 2 Normative references
- 3 Terms and definitions
- 3.1 CMAC
- 3.2 card security code
- 3.3 CSC key
- 3.4 HMAC
- 3.5 MAC
- 3.6 MAC algorithm
- 3.7 PAN
- 3.8 PAN sequence number
- 3.9 PAN token
- 4 Generation and verification
- 4.1 CSC algorithm
- 4.2 Generation
- 4.3 Verification
- 4.4 Multiple CSCs
- 5 MAC algorithm
- Annex A
- Bibliography
Introduction
Payment cards commonly carry a static three-digit or four-digit card security code (CSC) used for authenticating remote commerce transactions. Card security codes can also be dynamically generated on devices with cryptographic computation capabilities such as smart cards and phones or retrieved from another system.
This document provides requirements and guidance for methods for generation and verification of CSCs. Requirements and guidance are designed to support secure and interoperable implementations. This document identifies ciphers and algorithms that are specifically approved for use with CSCs.
International Standard ISO 25186:2026(en) Financial services — Methods for the generation and verification of card security codes
1 Scope
This document defines a method for generating and verifying card security codes (CSCs) using cipher-based message authentication code (CMAC) or keyed-hash message authentication code (HMAC). Key management mechanisms associated with these processes are beyond the scope of this document.
2 Normative references
The following documents are referred to in the text in such a way that some or all of their content constitutes requirements of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ISO/IEC 9797-1, Information technology — Security techniques — Message Authentication Codes (MACs) — Part 1: Mechanisms using a block cipher ISO/IEC 9797-2, Information security — Message authentication codes (MACs) — Part 2: Mechanisms using a dedicated hash-function ISO/IEC 18033-3, Information technology — Security techniques — Encryption algorithms — Part 3: Block ciphers ISO/IEC 10118-3, IT Security techniques — Hash-functions — Part 3: Dedicated hash-functions
3 Terms and definitions
For the purposes of this document, the following terms and definitions apply. ISO and IEC maintain terminology databases for use in standardization at the following addresses:
- ISO online browsing platform: available at https:// www .iso .org/ obp
- IEC Electropedia: available at https:// www .electropedia .org/
3.1 CMAC
cipher-based message authentication code message authentication code (3.5) based on a symmetric block cipher, as defined in ISO/IEC 9797-1 (MAC algorithm 5)
3.2 card security code
CSC cryptographic checksum generated by a card issuer or its agent for the purpose of providing authentication of a primary account number (3.7) and its service code with expiry date
3.3 CSC key
cryptographic key used with a message authentication code algorithm (3.6) to calculate the card security code (3.2)
ISO 25186:2026(en)
3.4 HMAC
keyed-hash message authentication code message authentication code (3.5) based on a cryptographic hash function, as defined in ISO/IEC 9797-2 (MAC algorithm 2)
3.5 MAC
message authentication code string of bits which is the output of a MAC algorithm [SOURCE: ISO/IEC 9797-1:2011, 3.9]
3.6 MAC algorithm
algorithm for computing a function which maps strings of bits and a secret key to fixed-length strings of bits, satisfying the following two properties:
- for any key and any input string, the function can be computed efficiently;
- for any fixed key, and given no prior knowledge of the key, it is computationally infeasible to compute the function value on any new input string, even given knowledge of a set of input strings and corresponding function values, where the value of the ith input string can be chosen after observing the value of the first i-1 function values (for integers i > 1) [SOURCE: ISO/IEC 9797-1:2011, 3.10, modified — Note 1 to entry and Note 2 to entry have been deleted.]
3.7 PAN
primary account number assigned number, composed of an issuer identification number, an individual account identification number and an accompanying check digit as specified in ISO/IEC 7812-1, which identifies the card issuer and cardholder [SOURCE: ISO 9564-1:2017, 3.22, modified — The term "number" was added to make "an issuer identification number".]
3.8 PAN sequence number
PSN number which identifies and differentiates cards with the same primary account number (3.7)
...



