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
Current Stage
6060 - International Standard published
Start Date
03-Aug-2026
Due Date
01-Jul-2027
Completion Date
03-Aug-2026

Buy Documents

Standard

ISO 25186:2026 - Financial services — Methods for the generation and verification of card security codes

Release Date:03-Aug-2026
English language (8 pages)
sale 15% off
Preview
sale 15% off
Preview

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.

Buy Documents

Standard

ISO 25186:2026 - Financial services — Methods for the generation and verification of card security codes

Release Date:03-Aug-2026
English language (8 pages)
sale 15% off
Preview
sale 15% off
Preview

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.

UKAS United Kingdom Verified

Great Wall Tianjin Quality Assurance Center

Established 1993, first batch to receive national accreditation with IAF recognition.

CNAS China Verified

Hong Kong Quality Assurance Agency (HKQAA)

Hong Kong's leading certification body.

HKAS Hong Kong Verified

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)


International
Standard
ISO 25186
First edition
Financial services — Methods for
2026-08
the generation and verification of
card security codes
Reference number
© ISO 2026
All rights reserved. Unless otherwise specified, or required in the context of its implementation, no part of this publication may
be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on
the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below
or ISO’s member body in the country of the requester.
ISO copyright office
CP 401 • Ch. de Blandonnet 8
CH-1214 Vernier, Geneva
Phone: +41 22 749 01 11
Email: copyright@iso.org
Website: www.iso.org
Published in Switzerland
ii
Contents Page
Foreword .iv
Introduction .v
1 Scope . 1
2 Normative references . 1
3 Terms and definitions . 1
4 Generation and verification . 2
4.1 CSC algorithm .2
4.2 Generation .3
4.3 Verification . .4
4.4 Multiple CSCs .4
5 MAC algorithm . 4
Annex A (informative) Worked examples . 5
Bibliography . 8

iii
Foreword
ISO (the International Organization for Standardization) is a worldwide federation of national standards
bodies (ISO member bodies). The work of preparing International Standards is normally carried out through
ISO technical committees. Each member body interested in a subject for which a technical committee
has been established has the right to be represented on that committee. International organizations,
governmental and non-governmental, in liaison with ISO, also take part in the work. ISO collaborates closely
with the International Electrotechnical Commission (IEC) on all matters of electrotechnical standardization.
The procedures used to develop this document and those intended for its further maintenance are described
in the ISO/IEC Directives, Part 1. In particular, the different approval criteria needed for the different types
of ISO documents should be noted. This document was drafted in accordance with the editorial rules of the
ISO/IEC Directives, Part 2 (see www.iso.org/directives).
ISO draws attention to the possibility that the implementation of this document may involve the use of (a)
patent(s). ISO takes no position concerning the evidence, validity or applicability of any claimed patent
rights in respect thereof. As of the date of publication of this document, ISO had not received notice of (a)
patent(s) which may be required to implement this document. However, implementers are cautioned that
this may not represent the latest information, which may be obtained from the patent database available at
www.iso.org/patents. ISO shall not be held responsible for identifying any or all such patent rights.
Any trade name used in this document is information given for the convenience of users and does not
constitute an endorsement.
For an explanation of the voluntary nature of standards, the meaning of ISO specific terms and expressions
related to conformity assessment, as well as information about ISO's adherence to the World Trade
Organization (WTO) principles in the Technical Barriers to Trade (TBT), see www.iso.org/iso/foreword.html.
This document was prepared by Technical Committee ISO/TC 68, Financial services, Subcommittee SC 2
Financial services, security.
Any feedback or questions on this document should be directed to the user’s national standards body. A
complete listing of these bodies can be found at www.iso.org/members.html.

iv
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.

v
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)
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 efficien
...