Financial services — Personal identification number (PIN) management and security — Part 5: Methods for the generation, change, and verification of PINs

This document specifies cryptographic methods for: — PIN generation; — reference PIN change; — transaction PIN verification. These PIN management functions can be implemented using: — encryption using an approved algorithm (see REF Table_tab_1 \r \h Table 1 08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000C0000005400610062006C0065005F007400610062005F0031000000 ); — CMAC using an approved block cipher (see REF Table_tab_1 \r \h Table 1 08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000C0000005400610062006C0065005F007400610062005F0031000000 ); — HMAC using an approved hash algorithm (see REF Table_tab_1 \r \h Table 1 08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000C0000005400610062006C0065005F007400610062005F0031000000 ). Refer to ISO 9564-1 for basic principles & requirements regarding PIN establishment.

Services financiers — Gestion et sécurité du numéro personnel d'identification (PIN) — Partie 5: Méthodes pour la génération, la modification et la vérification des PIN

General Information

Status
Published
Publication Date
23-Oct-2025
Current Stage
6060 - International Standard published
Start Date
24-Oct-2025
Due Date
22-Feb-2026
Completion Date
24-Oct-2025
Ref Project
Standard
ISO 9564-5:2025 - Financial services — Personal identification number (PIN) management and security — Part 5: Methods for the generation, change, and verification of PINs Released:24. 10. 2025
English language
21 pages
sale 15% off
Preview
sale 15% off
Preview

Standards Content (Sample)


International
Standard
ISO 9564-5
First edition
Financial services — Personal
2025-10
identification number (PIN)
management and security —
Part 5:
Methods for the generation, change,
and verification of PINs
Services financiers — Gestion et sécurité du numéro personnel
d'identification (PIN) —
Partie 5: Méthodes pour la génération, la modification et la
vérification des PIN
Reference number
© ISO 2025
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 Symbols and reference terms . 3
5 Basic principles . 3
5.1 General .3
5.2 PIN management methods .4
5.2.1 PIN offset method .4
5.2.2 PVV method .4
5.2.3 Stored encrypted reference PIN .5
5.2.4 Approved cryptographic algorithms.5
6 PIN generation . 5
6.1 General .5
6.2 Random PIN generation method .5
6.3 Deterministic PIN generation method with PIN offset .6
6.3.1 Introduction .6
6.3.2 Method A . . .6
6.3.3 Method B . .7
6.4 PIN offset calculation method .7
7 PIN change . 8
7.1 Authentication .8
7.2 Forgotten PIN .8
8 Transaction PIN verification . 8
8.1 General .8
8.2 PVV method .9
8.2.1 General .9
8.2.2 Forming the input data .9
8.2.3 Calculating the PIN check value (PVV) . .11
8.3 Offset method .11
Annex A (informative) Worked examples .12
Annex B (informative) Mathematical support for calculations .15
Annex C (normative) Base conversion decimalization method . 17
Annex D (normative) Scanning decimalization method . 19
Bibliography .21

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 document 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.
A list of all parts in the ISO 9564 series can be found on the ISO website.
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
This document specifies requirements and recommendations for cryptographic methods for the generation,
change and verification of PINs.
This document has been prepared so that institutions involved in financial services activities wishing to
implement PIN management functions can do so in a manner that is secure and facilitates interoperability
between separate implementations.
This document identifies ciphers and algorithms from ISO/IEC 18033-3 and ISO/IEC 9797 that are
specifically approved for secure banking purposes.

v
International Standard ISO 9564-5:2025(en)
Financial services — Personal identification number (PIN)
management and security —
Part 5:
Methods for the generation, change, and verification of PINs
1 Scope
This document specifies cryptographic methods for:
— PIN generation;
— reference PIN change;
— transaction PIN verification.
These PIN management functions can be implemented using:
— encryption using an approved algorithm (see Table 1);
— CMAC using an approved block cipher (see Table 1);
— HMAC using an approved hash algorithm (see Table 1).
Refer to ISO 9564-1 for basic principles & requirements regarding PIN establishment.
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 9564-1, Financial services — Personal Identification Number (PIN) management and security — Part 1:
Basic principles and requirements for PINs in card-based systems
ISO/IEC 9797-1:2011, Information technology — Security techniques — Message Authentication Codes (MACs)
— Part 1: Mechanisms using a block cipher
ISO/IEC 9797-2:2021, Information security — Message authentication codes (MACs) — Part 2: Mechanisms
using a dedicated hash-function
ISO 11568, Financial services — Key management (retail)
ISO/IEC 18031, Information technology — Security techniques — Random bit generation
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
advanced encryption standard
AES
16-byte block cipher
Note 1 to entry: AES is defined in ISO/IEC 18033-3.
3.2
binary coded decimal
BCD
binary coding of a sequence of integers using 4 bits for each integer (where the bit weights are 8421) and
encoding two integers per byte, and where a 0 digit is appended to the left of an integer sequence containing
an uneven number of digits before encoding
[SOURCE: ISO/IEC 18013-2:2020(en), 3.1.2, modified — Note 1 to entry, Note 2 to entry and Example have
been removed.]
3.3
cipher-based message authentication code
CMAC
block cipher-based message authentication code algorithm
Note 1 to entry: CMAC is defined as algorithm 5 in ISO/IEC 9797-1:2011.
3.4
hash-based message authentication code
HMAC
message authentication code that uses a cryptographic key in conjunction with a hash function
Note 1 to entry: HMAC is defined as algorithm 2 in ISO/IEC 9797-2.
3.5
natural personal identification number
natural PIN
PIN (3.4) related to the customer selected PIN by an offset and generated either by encrypting the primary
account number (3.9) and other account data using a key generated specifically for this purpose, decimalized
to the desired length, or generated randomly
3.6
personal identification number
PIN
string of numeric digits established as a shared secret between the cardholder and the issuer, for subsequent
use to validate authorized card usage
[SOURCE: ISO 9564-1:2017, 3.19]
3.7
personal identification number offset
PIN offset
difference between two PINs (3.6)
Note 1 to entry: For example, a PIN offset may be the difference between a PIN that is chosen by the customer and one
that is assigned by an institution.

3.8
personal identification number verification value
PIN verification value
PVV
cryptographic value calculated over account data and the reference PIN (3.10) used to verify a transaction
PIN (3.11)
Note 1 to entry: The PVV in this document is a 16-byte block cipher calculated value, distinct from the TDEA-based
PVV method widely used in industry.
3.9
primary account number
PAN
assigned number, composed of an issuer identification number, an individual account identification and an
accompanying check digit, which identifies the card issuer and cardholder
Note 1 to entry: PAN is detailed in ISO/IEC 7812-1.
[SOURCE: ISO 9564-1:2017, 3.22, modified — Note 1 to entry replaced the reference to ISO/IEC 7812-1 in the
definition.]
3.10
reference personal identification number
reference PIN
value of the PIN (3.6) used to verify the transaction PIN (3.11)
[SOURCE: ISO 9564-1: 2017, 3.25]
3.11
transaction personal identification number
transaction PIN
PIN (3.6) as entered by the customer at the time of the transaction and subsequently transmitted to an issuer
system or submitted to the customer’s card for verification
Note 1 to entry: Verification means comparison to the reference PIN (3.10) or its PIN verification value (3.8).
[SOURCE: ISO 9564-1:2017, 3.30, modified — “customer’s card” replaced “IC card” in the definition.; “its PIN
verification value” added to Note 1 to entry.]
4 Symbols and reference terms
|| symbol indicating concatenation of objects
enc () term indicating single-block encryption of the objects in parenthesis using a key named xxx
xxx
MAC ()term indicating MAC’ing of the object in parenthesis using a key named xxx
xxx
Hash() term indicating hashing of the object in the parenthesis, using a hash function specified in ISO/
IEC 18033-3
PGKe PIN generation key used for encryption
PGKm PIN generation key used for MAC’ing
5 Basic principles
5.1 General
Basic principles of PIN management are defined in ISO 9564-1.

Cryptographic keys shall be managed in accordance with ISO 11568. Issuers should determine the rotation
policy of the keys used to generate PIN verification values (PVVs) with allowance for the life of the existing
PINs and card reissuance. Without knowledge of the existing PIN, it is not possible to create a PVV for the
existing PIN using a new key (e.g. for a replacement card).
HSMs shall provide an atomic PIN change function for managing the updates to the reference PIN, PVV or offset
The techniques defined in this document are usable in several PIN management methods. The common
methods are described in 4.2, with reference to the following terms placed in context:
— natural PIN:
— this term is only used with PIN offset methods;
— the natural PIN is mathematically related to the reference PIN by the PIN offset;
— reference PIN:
— the reference PIN is the PIN used in validation of the transaction PIN for all PIN management methods;
— the reference PIN is selected by the customer or assigned by the issuer;
— transaction PIN:
— the transaction PIN is entered by the customer and either:
— directly compared to the reference PIN; or
— validated via a PVV calculated separately over the transaction PIN and the reference PIN;
— PIN generation key (PGK):
— the PGK is used in deterministic PIN generation methods to calculate the natural PIN or reference
PIN (depending on the method) from the primary account number (PAN) and other account data;
— PIN verification value key (PVVK):
— the PVVK is used to calculate the PVV from the reference PIN or transaction PIN concatenated with
other account data (content and format depend on the PVV method);
— PIN storage key (PSK):
— the PSK is used to encrypt the reference PIN for the stored reference PIN method.
5.2 PIN management methods
5.2.1 PIN offset method
The PIN offset method is only used for customer-selected PINs. The customer-selected PIN becomes the
reference PIN.
The PIN offset method is defined by first generating a natural PIN, then calculating a PIN offset which is the
mathematical difference between the natural PIN and the reference PIN.
The natural PIN is either randomly generated or deterministically generated. When the natural PIN is
deterministically generated from the cardholder account data, a card-issuing entity need only store the PIN
offset for each account.
5.2.2 PVV method
The PVV method calculates a PVV over the reference PIN and stores this value.

The PVV method then validates the transaction PIN by comparing the stored PVV to a PVV calculated over
the transaction PIN.
The reference PIN is either randomly generated or deterministically generated or customer selected.
5.2.3 Stored encrypted reference PIN
This method does not use offsets or PVVs.
This method is the simplest: the reference PIN is generated and encrypted with a PIN storage key.
For verification, the stored reference PIN and the encrypted transaction PIN are both passed to a hardware
security module (HSM) along with the respective keys. The PINs are decrypted and compared.
The reference PIN is either randomly generated or deterministically generated or customer selected.
5.2.4 Approved cryptographic algorithms
This document uses encryption, hashing and MAC’ing for PIN derivation and PVV generation:
— encryption, MAC’ing shall use an approved algorithm according to Table 1;
— hashing shall use a hash algorithm identified in ISO/IEC 10118-3 with at least 32-byte hash output.
Table 1 — Approved MAC, encryption algorithms
Mode of operation Approved algo- key length (bits) MAC strength (bits)
rithms
encryption AES, 128, 256 n/a
SM4 128
CMAC AES, SM4 128 128
(algorithm 5 of ISO/
AES 256 256
IEC 9797-1)
HMAC SHA-256, SHA3-256, 128 128
SM3
(algorithm 2 of ISO/
IEC 9797-2)
SHA-512, SHA3-512 256 256
6 PIN generation
6.1 General
PINs may be generated randomly (see 6.2) or according to other methods given in 6.3 to 6.5.
Refer to ISO 9564-1 for PIN block format options specific to encrypted PIN storage and transmission.
PIN generation shall take place within a secure cryptographic device (ISO 13491-1) as defined in ISO 9564-1
and PINs shall only be output from the device in accordance with ISO 9564-1.
In cases where customer selected PINs are supported these may either be stored (possibly over-writing a
randomly generated PIN), use the PVV method or use the offset method.
6.2 Random PIN generation method
This subclause provides a method for random PIN generation in accordance with ISO 9564-1.
An n-digit (4 ≤ n ≤ 12) PIN may be generated randomly as follows:
a) generate a random bit string X of length at least 128 bits using a random bit generator in accordance
with ISO/IEC 18031 and decimalise using one of the low-bias methods defined in Annexes C and D;

b) optionally, reject certain PIN values (e.g. “0000”, “1234”) according to the issuer policy. The set of
rejected PIN values should be kept as small as possible to avoid restricting PIN entropy.
If the offset method is used, then the offset is initially zero and the natural PIN and reference PIN are equal
to the generated random PIN. The customer can subsequently change their PIN and the offset is adjusted
accordingly.
Typically, the issuer host stores encrypted reference PINs or encrypted natural PINs and offsets or PVVs, to
enable PIN verification. There are other options such as storing the PVV on the customer card.
6.3 Deterministic PIN generation method with PIN offset
6.3.1 Introduction
This clause describes two methods for deterministic PIN generation.
6.3.2 Method A
Deterministic methods that derive the PIN cryptographically from only the PAN and employ decimalization
always produce the same PIN. However, if the PAN is reused with another customer in the future the natural
PIN will be the same. The deterministic PIN generation method defined in this document addresses this
problem by including additional items in the derivation data.
— First, the method requires the card expiry date to be included in the derivation data. This feature ensures
that a new reference PIN is generated when a PAN is reused for a new customer.
— Second, the method defines a PIN change counter that shall be stored with the PIN offset (if used). Use of
the PIN change counter helps ensure that every PIN change results in a different PIN.
The 8-bit length of the PIN change counter allows the PIN to be changed up to 255 times. Security of customer
PIN change relies on proper management and retention of the PIN change counter. This feature requires the
input data to change when the PIN is changed for a customer. The PIN change counter shall be used and shall
be maintained such that the PIN change count increments when the PIN is changed.
There exist situations where the issuer needs to change the cardholder PAN but ke
...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.

Loading comments...