# 个人识别码

个人识别码（personal identification number，PIN）是一种秘密数字代码，通常为四到六位数字，持卡人在零售银行业务中输入以验证身份，最常见于自动取款机（ATM）和销售点（POS）终端。詹姆斯·古德费洛（James Goodfellow）于1966年为“卡片加PIN”方法申请了专利，他援引的数据显示，全球有超过300万台ATM建立在该机制之上，每天处理十亿笔交易<sup>[1](https://engineeringhalloffame.org/office/resources/inductees/jamesgoodfellowacceptance.pdf)</sup>；[欧洲中央银行](https://www.edgepedia.org/zh/european-central-bank)报告称，仅2019年一年，欧洲ATM上的取款与充值/卸载交易就超过110亿笔<sup>[2](https://www.usenix.org/system/files/sec22-cardaioli.pdf)</sup>。

| 关键事实 | 详情 |
|---|---|
| 验证路径 | 离线PIN在芯片卡内部校验；在线PIN在PIN键盘上加密后发送至发卡行进行实时验证<sup>[3](https://pure.royalholloway.ac.uk/ws/files/26543055/Enhancing_EMV_OPV.pdf)</sup><sup> • </sup><sup>[4](https://www.ukfinance.org.uk/system/files/2025-09/UK%20Finance%20response%20to%20FCA%20engagement%20paper%20on%20Contactless%20Limits%20%28May%202025%29.pdf)</sup> |
| 尝试次数限制 | ATM通常允许三次尝试后锁卡；对于离线PIN，EMV卡设有PIN尝试计数器，而ATM和支付分别使用独立计数器，可使窃贼最多获得6次猜测机会<sup>[2](https://www.usenix.org/system/files/sec22-cardaioli.pdf)</sup><sup> • </sup><sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup> |
| 熵 | 随机4位PIN的名义安全性为\( \log_{2} 10000 \approx 13.3 \)比特，但人类自选的4位PIN面对在线猜测仅提供约6.6比特的安全性；6位PIN在线为7.2比特，离线为13.2比特<sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup><sup> • </sup><sup>[6](https://dl.acm.org/doi/10.1145/3052973.3053031)</sup> |
| 猜测风险 | 客户自选的4位PIN中有5.06%可在3次尝试内被猜中（6次内为7.24%），而随机PIN分别为0.03%和0.06%<sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup> |
| 存储 | 在线PIN以ISO 9564格式的加密PIN块传输，Visa要求所有ATM和POS设备使用TDES；加密PIN块不得保留在交易日志中<sup>[7](https://listings.pcisecuritystandards.org/documents/PCI_PIN_Security_Requirements_v2.pdf)</sup><sup> • </sup><sup>[8](https://pcihispano.com/wp-content/uploads/2023/10/visa-pin-security-program-guide-public.pdf)</sup> |
| 英国非接触式限额 | 单笔不超过100英镑且累计不超过300英镑、或连续不超过5笔非接触式交易时，可豁免强客户认证；2025年提案将允许服务提供商提高或取消该上限<sup>[9](https://www.fca.org.uk/publication/call-for-input/contactless-limits-engagement-paper.pdf)</sup><sup> • </sup><sup>[10](https://www.bbc.co.uk/news/articles/czjv7jy2r9vo)</sup> |
| 起源 | 詹姆斯·古德费洛于1966年5月2日提交英国专利申请；1967年英国首批带PIN的取款机投入使用<sup>[11](https://engineeringhalloffame.org/profile/james-goodfellow)</sup><sup> • </sup><sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup> |

## PIN验证的工作原理：在线与离线

EMV芯片卡支持两种不同的PIN验证方法。在离线PIN验证中，输入的PIN以明文或加密形式发送至卡片本身，在芯片内部进行校验；在在线PIN验证中，PIN被传输至授权实体，如卡组织运营方或发卡银行<sup>[3](https://pure.royalholloway.ac.uk/ws/files/26543055/Enhancing_EMV_OPV.pdf)</sup>。英国销售点芯片密码（chip-and-PIN）目前使用离线PIN：卡片内部芯片直接在终端上验证PIN，PIN数据从不发送至发卡行。相比之下，在线PIN通过支付网络将输入的PIN发送至发卡行进行实时验证<sup>[4](https://www.ukfinance.org.uk/system/files/2025-09/UK%20Finance%20response%20to%20FCA%20engagement%20paper%20on%20Contactless%20Limits%20%28May%202025%29.pdf)</sup>。

**银行几乎看不到明文PIN。** 当适用的持卡人验证方法为在线PIN时，EMV接口设备不会向卡片发出VERIFY命令；取而代之的是，PIN键盘在输入时即对PIN加密，以便在授权请求中传输<sup>[12](https://ptacts.uspto.gov/ptacts/public-informations/petitions/1554468/download-documents?artifactId=m2BGC-wQFmsIw30yeCoP7ePorH26Kvt6iE1GnNdIGFNT1SIpvQd5xTM)</sup>。PCI设备规则要求在线PIN在输入完成后立即在设备内加密，交易完成或超时后清除内部缓冲区，且设备绝不显示输入的数字，仅显示星号等非有效符号<sup>[13](https://listings.pcisecuritystandards.org/documents/PCI_PTS_POI_SRs_v4_Final.pdf)</sup>。

**失败尝试后锁卡。** 对于离线PIN，终端通过GET DATA命令读取卡片的PIN尝试计数器；若计数器为零，终端不得允许离线PIN输入，并在终端验证结果中设置“PIN尝试次数超限”位<sup>[12](https://ptacts.uspto.gov/ptacts/public-informations/petitions/1554468/download-documents?artifactId=m2BGC-wQFmsIw30yeCoP7ePorH26Kvt6iE1GnNdIGFNT1SIpvQd5xTM)</sup>。卡片本身执行该限制：PIN正确时返回状态字9000，错误时返回63Cx（x为剩余尝试次数），一旦x = 0，对任何后续VERIFY必须返回PIN锁定消息6983<sup>[14](https://ethz.ch/content/dam/ethz/special-interest/infk/inst-infsec/information-security-group-dam/research/publications/pub2021/emv-sp21.pdf)</sup>。ATM通常允许三次尝试后锁卡<sup>[2](https://www.usenix.org/system/files/sec22-cardaioli.pdf)</sup>。次数由谁设定因情况而异：非接触式应用中的PIN/移动码尝试上限是由发卡行定义的参数，当计数器归零时，需要验证的交易将被拒绝，直至发卡行重置<sup>[15](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC020-08%20Book%204%20-%20Security%20-%20SCS%20Volume%20v7.5.pdf)</sup>。三次错误猜测后锁定支付卡是标准做法，但ATM和支付请求使用不同的计数器，因此持有CAP读取器并能使用ATM的窃贼通常可进行6次猜测<sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup>。

## 生成、存储与标准

ISO 9564-1:2017规定了零售银行系统中管理持卡人PIN的最低安全措施，包括创建、发行、使用和停用<sup>[16](https://www.iso.org/standard/68669.html)</sup>。PCI PIN要求在此基础上建立：在线PIN必须使用ISO 9564规定的算法和密钥长度加密，在线PIN转换仅允许通过DUKPT、固定密钥或主密钥/会话密钥密钥管理方法进行<sup>[7](https://listings.pcisecuritystandards.org/documents/PCI_PIN_Security_Requirements_v2.pdf)</sup>。Visa要求所有ATM和所有POS PIN受理设备使用TDES保护PIN，且参与方须部署PCI批准设备清单中的PCI PTS批准设备<sup>[8](https://pcihispano.com/wp-content/uploads/2023/10/visa-pin-security-program-guide-public.pdf)</sup>。欧洲支付委员会将ISO 9564（包括其AES修正案）视为使用ISO PIN块格式在线传输过程中保护PIN的既定基线<sup>[15](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC020-08%20Book%204%20-%20Security%20-%20SCS%20Volume%20v7.5.pdf)</sup>。

**加密PIN块。** PIN块是PIN传输时所使用的格式化加密封装。PIN生成系统生成PIN、PVV或PIN偏移量，并用PIN加密密钥（PEK）加密，创建加密PIN块用于传输；独立的PIN验证密钥（PVK）支持VISA PVV方法<sup>[17](https://docs.aws.amazon.com/payment-cryptography/latest/DataAPIReference/API_GeneratePinData.html)</sup>。即使已加密，PIN块也不得保留在交易流水或日志中；仅允许作为授权处理的系统恢复机制进行临时存储<sup>[7](https://listings.pcisecuritystandards.org/documents/PCI_PIN_Security_Requirements_v2.pdf)</sup>。

**HSM及其弱点。** 部分支付系统加密在硬件安全模块内进行，但对HSM的API级攻击可以仅用一两次API调用就破解每个暴露的PIN，滥用诸如每个交换系统都需要的translate功能以及在线客户PIN选择功能<sup>[18](https://link.springer.com/chapter/10.1007/978-3-540-77366-5_20)</sup>。趋势是远离未加密处理：EPC指出，明文PIN不再被视为终端应支持的足够安全的持卡人验证方法，目标是取消对其的支持<sup>[19](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC020-08%20Book%206%20-%20Implementation%20Guidelines%20-%20SCS%20Volume%20v7.5.pdf)</sup>。

## 数据一览

4位系统提供\( \log_{2} 10000 \approx 13.3 \)比特的名义安全性，但该数字假设均匀选择。人类自选的4位PIN面对在线猜测提供约6.6比特的安全性，面对离线猜测为8.4比特；6位PIN的对应数字为7.2和13.2比特<sup>[6](https://dl.acm.org/doi/10.1145/3052973.3053031)</sup>。名义安全性与实际安全性之间的差距很大：在一个回归模型下，客户自选的4位PIN中有5.06%可在3次尝试内被猜中，7.24%可在6次内被猜中，而随机4位PIN分别为0.03%和0.06%<sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup>。在每个研究数据集中，仅最热门的前5%至8%的PIN就占全部PIN的50%以上，且PIN分布似乎遵循[齐普夫定律](https://www.edgepedia.org/zh/zipfs-law)，英语和中文用户群体选择的PIN具有几乎相同的齐普夫分布<sup>[6](https://dl.acm.org/doi/10.1145/3052973.3053031)</sup>。

**更长并不一定更好。** 一项记忆性研究发现，系统生成的4位PIN在长期记忆性上优于6位、7位和8位PIN，而6位、7位和8位之间无统计学显著差异<sup>[20](https://www.usenix.org/system/files/conference/soups2015/soups15-paper-huh.pdf)</sup>。因此，6位PIN相对于4位提高了离线抗猜测能力（13.2比特对8.4比特），而记忆性代价很小，但在线猜测的增益有限，因为尝试次数限制封顶了猜测次数。

欺诈数据框定了残余风险。2023年英国非接触式欺诈消费总计4150万英镑，较2022年增长19%，为2014年该类别推出以来最高，但非接触式欺诈仅占整体卡欺诈损失的8%，而所有卡交易中有73%为非接触式<sup>[21](https://www.ukfinance.org.uk/system/files/2024-05/Annual%20Fraud%20Report%202024_0_0.pdf)</sup>。2023年英国[ATM卡](https://www.edgepedia.org/zh/atm-card)欺诈损失为2560万英镑，较2022年的2610万英镑下降2%<sup>[21](https://www.ukfinance.org.uk/system/files/2024-05/Annual%20Fraud%20Report%202024_0_0.pdf)</sup>。

## 与其他验证方法的比较

对于非接触式交易，持卡人验证方法包括由发卡行验证的在线PIN、签名或无CVM；通常只有高价值交易需要CVM，移动设备可使用CDCVM、设备端代码或随交易传输的生物识别验证<sup>[15](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC020-08%20Book%204%20-%20Security%20-%20SCS%20Volume%20v7.5.pdf)</sup>。面对面卡支付越来越多地通过数字钱包在设备本身上进行认证，如生物识别<sup>[9](https://www.fca.org.uk/publication/call-for-input/contactless-limits-engagement-paper.pdf)</sup>。

**PIN与生物识别暴力破解安全性对比。** 一家供应商的分析估计，典型的生物识别传感器在暴力破解安全性上优于随机4位PIN，但不如5位PIN；甚至苹果的Face ID在暴力破解安全性上也不如随机6位PIN；这些数字应视为指示性而非权威数据<sup>[22](https://www.nextauth.com/pin-or-biometrics-which-is-most-secure/)</sup>。同一分析指出，允许用户自选PIN会降低平均暴力破解安全性并增加PIN重用，且PIN或生物识别单独使用均不足以构成认证；两者都作为持有物之外的第二因素发挥作用<sup>[22](https://www.nextauth.com/pin-or-biometrics-which-is-most-secure/)</sup>。

## 历史

PIN起源于1966年5月2日詹姆斯·古德费洛提交的英国专利申请，他当时任职于史密斯工业公司（Smiths Industries），相应的美国专利3,905,461将古德费洛和已故的A.I.O.戴维斯列为发明人<sup>[11](https://engineeringhalloffame.org/profile/james-goodfellow)</sup><sup> • </sup><sup>[23](http://www.theguardian.com/money/2016/apr/29/who-invented-cash-machine-james-goodfellow-first-atm-pin)</sup>。其机制将存储在卡上的二进制编码数字与单独键入的十进制PIN进行比较，当二者的数学关系正确时确认身份<sup>[1](https://engineeringhalloffame.org/office/resources/inductees/jamesgoodfellowacceptance.pdf)</sup>。取款机读取一张打孔塑料卡，仅用30字节数据即识别客户、账号、分行和PIN，PIN经过加扰处理，无法从卡片推断<sup>[24](https://www.mondaq.com/uk/patent/1645956/glasgow-850-pioneers-of-the-atm-a-scottish-legacy-of-innovation)</sup>。古德费洛研究了指纹、语音识别、视网膜图案和磁条等替代方案，最终选定卡片加PIN<sup>[11](https://engineeringhalloffame.org/profile/james-goodfellow)</sup>；这些机器由查布有限公司（Chubb Ltd）营销，于20世纪60年代末至70年代初在英国全国安装<sup>[11](https://engineeringhalloffame.org/profile/james-goodfellow)</sup>。

**为何是四位。** 关于4位选择的两种说法流传至今，且无法调和。古德费洛本人的说法是，对于一百万客户，6位PIN是显而易见的长度，但银行的风险评估显示4位是安全性与客户接受度之间更好的折中<sup>[1](https://engineeringhalloffame.org/office/resources/inductees/jamesgoodfellowacceptance.pdf)</sup>。另一种说法记录在一项银行PIN安全研究中：约翰·谢泼德-巴伦（John Shepherd-Barron）在其妻子无法记住6位随机数字后将长度缩减为4位；同一研究指出，巴克莱-德拉鲁（Barclays-De La Rue）1967年的ATM使用6位PIN，而国民查布（National Chubb）系统使用4位PIN<sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup>。PIN最早出现在1967年部署的英国独立取款机中<sup>[5](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)</sup>。后来，基于智能卡的支付卡取代磁条卡以减少基于卡的欺诈，将敏感数据存储在防篡改芯片中<sup>[3](https://pure.royalholloway.ac.uk/ws/files/26543055/Enhancing_EMV_OPV.pdf)</sup>。

## 近期发展

**英国非接触式限额正在审查中。** 根据SCA RTS第11条，英国非接触式支付在单笔不超过100英镑且累计不超过300英镑、或连续不超过5笔非接触式交易时，可豁免强客户认证<sup>[9](https://www.fca.org.uk/publication/call-for-input/contactless-limits-engagement-paper.pdf)</sup>。由于2015年引入的免联机授权限额为零的规则，每笔英国非接触式交易都必须在线授权，但无需PIN<sup>[4](https://www.ukfinance.org.uk/system/files/2025-09/UK%20Finance%20response%20to%20FCA%20engagement%20paper%20on%20Contactless%20Limits%20%28May%202025%29.pdf)</sup>。2025年，FCA就允许银行和其他提供商设定非接触式限额的提案进行了咨询，可能超过100英镑并变为无上限<sup>[10](https://www.bbc.co.uk/news/articles/czjv7jy2r9vo)</sup>。具体机制因环境而异：超过100英镑在离线PIN环境中会导致技术性拒绝，而在线PIN环境则会促使发卡行要求PIN升级验证<sup>[4](https://www.ukfinance.org.uk/system/files/2025-09/UK%20Finance%20response%20to%20FCA%20engagement%20paper%20on%20Contactless%20Limits%20%28May%202025%29.pdf)</sup>。

**欺诈金额正在上升。** 2024年欧洲经济区报告的支付欺诈达42亿欧元<sup>[25](https://www.ecb.europa.eu/press/intro/publications/pdf/ecb.ebaecb202512.en.pdf)</sup>。2024年，贷记转账损失为22.00亿欧元，同比增长16%；欧盟/欧洲经济区发行的卡片的卡支付欺诈损失为13.29亿欧元，增长29%<sup>[26](https://www.ecb.europa.eu/press/pr/date/2025/html/ecb.pr251215~e133d9d683.en.html)</sup>。

## References

1. [James Goodfellow acceptance speech, Engineering Hall of Fame](https://engineeringhalloffame.org/office/resources/inductees/jamesgoodfellowacceptance.pdf)
2. [Cardaioli et al., Hand Me Your PIN! (USENIX Security 2022)](https://www.usenix.org/system/files/sec22-cardaioli.pdf)
3. [Enhancing EMV Online PIN Verification, Royal Holloway, University of London](https://pure.royalholloway.ac.uk/ws/files/26543055/Enhancing_EMV_OPV.pdf)
4. [UK Finance response to FCA engagement paper on Contactless Limits (May 2025)](https://www.ukfinance.org.uk/system/files/2025-09/UK%20Finance%20response%20to%20FCA%20engagement%20paper%20on%20Contactless%20Limits%20%28May%202025%29.pdf)
5. [Bonneau et al., The security of customer-chosen banking PINs (Financial Cryptography 2012)](https://jbonneau.com/doc/BPA12-FC-banking_pin_security.pdf)
6. [Understanding Human-Chosen PINs (ACM AsiaCCS 2017)](https://dl.acm.org/doi/10.1145/3052973.3053031)
7. [PCI PIN Security Requirements v2, PCI SSC](https://listings.pcisecuritystandards.org/documents/PCI_PIN_Security_Requirements_v2.pdf)
8. [Visa PIN Security Program Guide](https://pcihispano.com/wp-content/uploads/2023/10/visa-pin-security-program-guide-public.pdf)
9. [FCA Engagement Paper 2025: Contactless Payment Limits](https://www.fca.org.uk/publication/call-for-input/contactless-limits-engagement-paper.pdf)
10. [Contactless card payments could become unlimited under new plans, BBC News](https://www.bbc.co.uk/news/articles/czjv7jy2r9vo)
11. [James Goodfellow, Engineering Hall of Fame profile](https://engineeringhalloffame.org/profile/james-goodfellow)
12. [EMV Book 4, retrieved via USPTO PTACTS](https://ptacts.uspto.gov/ptacts/public-informations/petitions/1554468/download-documents?artifactId=m2BGC-wQFmsIw30yeCoP7ePorH26Kvt6iE1GnNdIGFNT1SIpvQd5xTM)
13. [PCI PTS POI Security Requirements v4, PCI SSC](https://listings.pcisecuritystandards.org/documents/PCI_PTS_POI_SRs_v4_Final.pdf)
14. [The EMV Standard: Break, Fix, Verify, ETH Zurich](https://ethz.ch/content/dam/ethz/special-interest/infk/inst-infsec/information-security-group-dam/research/publications/pub2021/emv-sp21.pdf)
15. [EPC SCS Volume v7.5, Book 4: Security](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC020-08%20Book%204%20-%20Security%20-%20SCS%20Volume%20v7.5.pdf)
16. [ISO 9564-1:2017, Financial services, PIN management and security, Part 1](https://www.iso.org/standard/68669.html)
17. [GeneratePinData, AWS Payment Cryptography API documentation](https://docs.aws.amazon.com/payment-cryptography/latest/DataAPIReference/API_GeneratePinData.html)
18. [The Unbearable Lightness of PIN Cracking (Financial Cryptography 2007)](https://link.springer.com/chapter/10.1007/978-3-540-77366-5_20)
19. [EPC SCS Volume v7.5, Book 6: Implementation Guidelines](https://www.europeanpaymentscouncil.eu/sites/default/files/KB/files/EPC020-08%20Book%206%20-%20Implementation%20Guidelines%20-%20SCS%20Volume%20v7.5.pdf)
20. [On the Memorability of System-generated PINs (SOUPS 2015)](https://www.usenix.org/system/files/conference/soups2015/soups15-paper-huh.pdf)
21. [UK Finance Annual Fraud Report 2024](https://www.ukfinance.org.uk/system/files/2024-05/Annual%20Fraud%20Report%202024_0_0.pdf)
22. [PIN or biometrics, which is most secure? (nextAuth, vendor blog)](https://www.nextauth.com/pin-or-biometrics-which-is-most-secure/)
23. [Who invented the cash machine? I did, and all I earned was £10, The Guardian](http://www.theguardian.com/money/2016/apr/29/who-invented-cash-machine-james-goodfellow-first-atm-pin)
24. [Glasgow 850: Pioneers Of The ATM, Mondaq](https://www.mondaq.com/uk/patent/1645956/glasgow-850-pioneers-of-the-atm-a-scottish-legacy-of-innovation)
25. [EBA/ECB 2025 report on payment fraud](https://www.ecb.europa.eu/press/intro/publications/pdf/ecb.ebaecb202512.en.pdf)
26. [Joint EBA-ECB press release on payment fraud, December 2025](https://www.ecb.europa.eu/press/pr/date/2025/html/ecb.pr251215~e133d9d683.en.html)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 10, 2026 · Edited: Oct 10, 2026; Oct 11, 2026; Oct 15, 2026 · Last review: Oct 10, 2026*

Topic: 社会与历史 › 经济与商业 › 金融 › Retail and commercial banking operations › Titles I to W

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/personal-identification-number

English original: https://www.edgepedia.org/personal-identification-number
