如何修改Javacard J2A040的ATR

发布于 2025-01-27 08:08:44 字数 209 浏览 2 评论 0原文

我正在尝试更改Java SmartCard(JCOP)J2A040的ATR。我通过手册进行了研究,找不到明确的答案。像Pyresman这样的程序可以成功更改它,但是,我无法找到一种通过Python更改它的方法。

我正在研究SmartCard集成,需要了解如何更改ATR。我知道这与Apdu有关,但是,我无法弄清楚。

如果有人有任何答案,请告诉我。

I am trying to change the ATR of a Java Smartcard (JCOP) J2A040. I researched through the manuals and cannot find a definite answer. There are programs like PyResMan that successfully change it, however, I cannot figure out a way to change it through python.

I am researching smartcard integration and need to understand how one can go about changing the ATR. I know that is has something to do with APDU, however, I cannot figure it out.

If anyone has any answers, please let me know.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别把无礼当个性 2025-02-03 08:08:44

可以从芯片的供应商初始化过程中将其从applet本身或可能将其更改。全局平台规范允许您通过GPSystem在GP on Card API中进行静态调用:

 公共静态布尔套件(Byte []缓冲区,短boffset,byte blength)
 

此方法设置了ATR中包含的历史字节(重置答案)。将设置字节序列
在随后的电源或重置中。只有“默认选择”应用程序可以调用此方法。卡
经理在GlobalPlatform注册表中找到所选应用程序的援助,并确定是否是否
申请具有所需的特权。

如您所见,这只会更改属于ATR的一部分的历史字节。其他设置是特定于芯片的,因此通常只能在(Java卡)操作系统实现的初始化期间设置。

对于JCOP,可以通过编写特定的字节值来持续记忆(如果仍然相同的话,则为冷和温暖重置的单独位置)。请联系您的代表以获取必要的文档和身份验证材料。

It is possible to change it from an Applet itself or possibly from the vendor initialization process of the chip. The Global Platform specifications allow you to set it through a static call to GPSystem within the GP on-card API:

public static boolean setATRHistBytes (byte[] buffer, short bOffset, byte bLength)

This method sets the historical bytes contained in the ATR (Answer To Reset). The sequence of bytes will be set
on a subsequent power-up or reset. Only the “default selected” Application may invoke this method. The Card
Manager locates the AID of the selected Application in the GlobalPlatform Registry and determines if the
Application has the required privilege.

As you can see this only changes the historical bytes which are part of the ATR. The other settings are chip-specific and can therefore normally only be set during initialization of the (Java Card) operating system implementation.

For JCOP that can be by writing specific byte values to persistent memory (separate locations for cold and warm reset if that's still the same). Please contact your representative to get the necessary documentation and authentication material.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文