更改javacard'
我正在研究使用JavaCards和SmartCard的用途 不同的ATR。我想通过Python更改这些卡的ATR 与这些卡上的OEM ATR不同,默认情况下。我 想出了一种更改卡ATR的方法,但是它正在利用 在线脚本 - 这确实无济于事。
以下是我发现使用Pyresman更改ATR的脚本 但是,脚本模式仅设置为一个ATR,即银行,我 没有用。
我在网上找到的脚本:{ (开始数字显示行号)
00a4040010 ***********************************************************************************
00f00000
C0D6029A02F807
C0D601240108
C0D601470108
C0D601260403600000
C0D601490403600000
C0D6012201FE
C0D601360ED80318065B0893501F183009000
C0D601590E0E0D80318065B0893501F183009000
C0D603010101
C0D60303040414244444444449494B4B4C4D4EE4F
C0D6031D0101
C0D6032110404142424444444448494A4B4B4C4D4E4F
C0D603390101
C0D6033D10404142424444444448494A4B4B4C4D4E4F
}
这个脚本的问题是我只知道第一个2 行会这样做,而第9行是实际包含的行 ATR更改过程的数据。我需要知道如何改变 ATR使用正则表达式的ATR。
如果有人知道一种解码此脚本并能够编辑的方法, 或知道一种更简单的方法来改变未连接或非的ATR 预先陈述的Javacard,请让我知道!我一直在研究 那些现在一个多月,找不到真正的答案 作品。
I am researching uses for Javacards and smartcards utilizing
different ATRs. I want to change these card's ATRs via python to be
different from the OEM ATR that comes on these cards as default. I
figured out a way to change the card's atr, however, it is utilizing a
script online - which really doesn't help.
Below is the script I found to change the ATR using PyResMan
script mode, however, it is only set to one atr, which is a bank and I
have no use for it.
The Script I found Online: {
(Beginning numbers show line numbers)
00A4040010********************************
00F00000
C0D6029A02F807
C0D601240108
C0D601470108
C0D601260403600000
C0D601490403600000
C0D6012201FE
C0D601360E0D80318065B0893501F183009000
C0D601590E0D80318065B0893501F183009000
C0D603010101
C0D6030510404142434445464748494A4B4C4D4E4F
C0D6031d0101
C0D6032110404142434445464748494A4B4C4D4E4F
C0D603390101
C0D6033D10404142434445464748494A4B4C4D4E4F
}
The problem with this script is that I only know what the first 2
lines do, and that lines 9&10 are the lines that actually contain the
data for the ATR changing process. I need to know how I can change the
ATR using the ATR in regular expression form.
If anyone knows a way to decode this script, and be able to edit it,
or knows an easier way to change the ATR of an Unfused or non
pre-presonialized javacard, please let me know! I've been researching
those for over a month now, and cannot find an answer that actually
works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为SmartCard设置ATR并不是Javacard规范的域。如今,没有通用的规范或方法来为 All SmartCard设置ATR,因为没有通用的方法可以初始化或个性化SmartCard本身,这主要是供应商的。
您在网上发现的脚本属于NXP Javacard,此信息不是标准化的,也不是为了公众使用,因此可以删除一些明智的信息。请联系您的卡供应商,以获取有关如何更改ATR的信息(可能是不可能或容易的)。
Setting the ATR for a smartcard is not primarily the domain of Javacard specification. Today there is no generic specification or method to set the ATR for all smartcards, as there is no universal way to initialize or personalize the smartcard itself and this is mostly vendor specific.
The script that you found online belongs to an NXP Javacard, this information is not standardized and is also not intended for public use to my knowledge, therefore is removed some sensible information. Please contact your card vendor to get information on how to change the ATR(it might not be possible or easy).
我刚刚发现了这篇文章,因为不久前我遇到了同样的问题,所以我设法了解了脚本的作用。
注意:
更改卡的ATR可以使读者无法识别它,从而有效地进行砖头。更改ATR的历史字节应该是安全的,但在试图更改其其他任何部分时要谨慎。
正如保罗·巴斯蒂安(Paul Bastian)指出的那样,这不是标准程序,仅适用于特定的NXP Javacards。我为我的NXP J2A040 Javacard使用了类似的脚本。
在您的示例中了解
脚本的脚本是:
3B 6D 00 00 80 31 80 65 B0 89 35 01 F1 83 00 90 00
我不确定
设置新的ATR
在示例中
的 12 14 16。
60是T0字节。具体而言,6(二进制中的0110)告诉存在T0之后的四个字节中的哪一个。在这种情况下,TA1和TD1不存在(0),而TB1和TC1为(1)。
您应该这样构建命令。
同样,对于历史字节:
I just found out about this post, since I had the same problem a while ago I managed to understand what the script does.
Note:
Changing a card's ATR can make it unable to be recognized by readers, effectively bricking it. Changing the historical bytes of the ATR should be safe but be cautious when trying to change any other part of it.
As Paul Bastian pointed out this is NOT a standard procedure, and only works on specific NXP Javacards. I used a similar script for my NXP J2A040 Javacard.
Understanding the script
The card's ATR in your example is:
3B 6D 00 00 80 31 80 65 B0 89 35 01 F1 83 00 90 00
I'm not sure about the order of 12 14 16.
Setting a new ATR
In the example:
04 is the length of the provided data while 03 is the length of the bytes of the ATR in hex.
60 is the T0 byte. Specifically, 6 (0110 in binary) tells which of the four bytes after T0 are present. In this case, TA1 and TD1 are not present (0) while TB1 and TC1 are (1).
You should build your command like this.
Similarly for the historical bytes: