简体   繁体   English

Visa2密钥多元化和JCOP工具

[英]Visa2 Key Diversification and JCOP Tools

I have a bunch of Java Cards for with the supplier claims SCP is 01 and key diversification algorithm is Visa2. 我有一堆Java卡,供应商声称SCP为01,密钥多样化算法为Visa2。 I have been trying to authenticate with them using JCOP Tools for the better part of last two days, to no avail. 在过去两天的大部分时间里,我一直在尝试使用JCOP工具向他们进行身份验证,但无济于事。

From what I understand, after selecting AID, the response of init-update command is KEYDATA, which should be used to generate ENC, DEC, and MAC keys using KMC. 据我了解,选择AID后, init-update命令的响应为KEYDATA,该数据应用于使用KMC生成ENC,DEC和MAC密钥。 But the funny thing is, although I get SW12 = 0x9000 and 28 bytes of data in response to init-update , JCOP tools says: 但是有趣的是,尽管我响应init-update得到了SW12 = 0x9000和28字节的数据,但SW12 = 0x9000工具说:

jcshell: Error code: -5 (Authentication failed) jcshell:错误代码:-5(认证失败)

jcshell: Wrong response APDU jcshell:错误的APDU响应

My question is, does JCOP tools have build in support for Visa2 key diversification algorithm? 我的问题是,JCOP工具是否内置了对Visa2密钥多样化算法的支持? And, if not, what is the proper sequence of events to generate ENC, DEC and MAC keys using Visa2 algorithm? 如果不是,使用Visa2算法生成ENC,DEC和MAC密钥的正确事件顺序是什么?

JCOP tools is returning an error because after checking the init-update response, the card cryptogram returned by the card did not pass the checks - the key used by the card to generate this cryptogram is not the one expected by JCOP tools. JCOP工具返回错误,因为在检查了init-update响应之后,卡返回的卡密码未通过检查-卡用于生成此密码的密钥不是JCOP工具所期望的。

I don't know whether JCOP Tools supports Visa2 diversification, but here is a workaround you can use: 我不知道JCOP Tools是否支持Visa2多样化,但是您可以使用以下解决方法:

GPShell ( http://sourceforge.net/p/globalplatform/wiki/GPShell/ ) implements the Visa2 algorithm. GPShell( http://sourceforge.net/p/globalplatform/wiki/GPShell/ )实现了Visa2算法。 It is Open Source, so you can see the entire algorithm sequence in its source code and also use it to verify your own results. 它是开源的,因此您可以在其源代码中看到整个算法序列,也可以使用它来验证自己的结果。 Or just use it to work with your cards... 或者只是使用它来处理您的卡片...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM