EMV 安全消息传递

EMV Secure Messaging

我正在开展一个项目,该项目需要 EMV 卡的安全消息传递来保护从 EMV 卡发送 to/received 的数据。

根据 EMV Book 3,第 6.3.2 节:

根据我的理解,我们可以在每个 command/response 对上使用 'Secure Messaging'。 例如,对于安全消息格式 1,我们可以使用 CLA='8C', INS='CA',对于安全消息格式 2

,我们可以使用 CLA='84', INS='CA'

但是,当我尝试使用我的两张卡时,出现错误 6E 00 -- Class 不支持。

我对 'Secure Messaging' 的理解有什么问题?

None 当前的 EMV 协议似乎支持安全消息传递。因此,您的 card/EMV 小程序也不支持安全消息传递。

此外,我不太确定您究竟希望将安全消息传递用于什么... Excahnged 信息已经过身份验证(假设您执行交易并且您确实执行 CDA/SDA/DDA) .因此,您的目标可能是加密终端和卡之间交换的信息(特别是收费金额、静态卡数据等)。但是,根据当前 EMV 基础设施的设计,我怀疑这是否有意义:

目前不假定终端是可信的(至少在终端和卡之间的 EMV 协议交换方面)。因此,您将无法在终端和卡之间实现任何形式的相互验证。只有终端可以验证卡,卡可以验证从发卡行收到的信息(例如发卡行脚本),但卡永远无法验证终端。结果,尽管加密,终端侧的冒充仍然是可能的。因此,中间的攻击者仍然能够读取和解密消息。


来自 Michal Gluchowski 的评论:

Maybe to extend what Michael has said, where next generation EMV is planning to go is to introduce channel confidentiality to eliminate passive eavesdropping. It will, however be possible to impersonate terminals (only card certificates will be authenticated). Current EMV uses secure messaging only for issuer scripts as it requires symmetric secret key that is known to issuer only. From the transaction perspective all the data terminal exchanges are plaintext (and issuer scripts are simply passed through without terminal analyzing or modifying them).

有关下一代 EMV 和通道安全的来源:Next Generation Kernel System Architecture Overview, EMV 2nd Generation, Version 1.0, Sept. 2014