简体   繁体   English

如何与同一物理智能卡上的多个 javacard 应用程序交互(如 yubikey)

[英]How to interact with multiple javacard applications on the same physical smartcard (like yubikey)

I have installed the popular IsoApplet ( https://github.com/philipWendland/IsoApplet ) on my 2.2.2 javacard and have been able to use the pkcs11-tool and pkcs15-tool from the OpenSC project to generate private keys on the card and use them to authenticate to servers over SSH.我已经在我的 2.2.2 javacard 上安装了流行的 IsoApplet ( https://github.com/philipWendland/IsoApplet ),并且能够使用 OpenSC 项目中的pkcs11-toolpkcs15-tool在卡上生成私钥并使用它们通过 SSH 对服务器进行身份验证。

Separately, I was able to successfully use the challenge-response of my Yubikey 5 ( https://www.yubico.com/products/services-software/personalization-tools/challenge-response/ ) in order to add security to unencrypting a KeepassXC database.另外,我能够成功地使用我的 Yubikey 5 ( https://www.yubico.com/products/services-software/personalization-tools/challenge-response/ ) 的质询-响应,以增加解密 a KeepassXC 数据库。

Now, I'd like to add https://github.com/arekinath/YkOtpApplet to the same javacard that has the IsoApplet.现在,我想将https://github.com/arekinath/YkOtpApplet添加到具有 IsoApplet 的同一个 javacard 中。 How do external applications interact with separate applications on the javacard?外部应用程序如何与 javacard 上的单独应用程序交互? Can I have both of these apps on the same javacard?我可以将这两个应用程序放在同一个 javacard 上吗? Are the limits just the storage on the card?限制只是卡上的存储空间吗?

I have two cards available:我有两张卡可用:

  • NXP JCOP3 J3H145 Java Card 3.0.4恩智浦 JCOP3 J3H145 Java 卡 3.0.4
  • JavaCOS A22 155K Java Card 2.2.2 JavaCOS A22 155K Java卡2.2.2

Yes, you can have both apps in the same card and the only limit is the permanent storage on the card (unless one of the apps is not compatible with your card, for example if it requires some crypto functions not provided by the card OS).是的,您可以将两个应用程序放在同一张卡中,唯一的限制是卡上的永久存储(除非其中一个应用程序与您的卡不兼容,例如,如果它需要卡操作系统未提供的某些加密功能) .

Each application has an identifier imaginatively named AID, "Application ID", assigned when the application is installed on the card.每个应用程序都有一个标识符,想象地命名为 AID,“应用程序 ID”,当应用程序安装在卡上时分配。 When an external system wants to interact with a card, the first command (called SELECT ) selects the application it wants to talk to, using the AID as a parameter.当外部系统想要与卡交互时,第一个命令(称为SELECT )使用 AID 作为参数选择它想要与之交谈的应用程序。 Any subsequent command then is routed to that app, until the card is reset or a SELECT to a different app is received.然后任何后续命令都会路由到该应用程序,直到卡被重置或收到SELECT到另一个应用程序。

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

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