我有一个支持 Java Card 的智能卡和一个由我的实验室讲师提供的读卡器。我应该使用 Java Card 2.1.1 API 做一个项目。
我不喜欢 Java Card API。
是否可以使用任何其他语言(例如 C)对我给定的智能卡进行编程?
最佳答案
一般答案:
不幸的是,目前除了使用 Java Card API 来编程 Java Card 兼容卡之外,没有其他方法。
详细答案:
某些类型的卡具有名为“安全盒”的机制。正如 JCOP v2.4.2 r3 card Security target 中提到的:
The Secure Box is a construct which allows to run non certified third party native code and ensures that this code cannot harm, influence or manipulate the JCOP 2.4.2 R3 operating system or any of the applets executed by the operating system.The separation of the native code in the Secure Box from other code and/or data residing on the hardware is ensured by the Hardware MMU which has been certified in the hardware evaluation.
Here和 here你可以看到一些关于Secure Box的信息。据我所知,您可以用C或汇编语言编写应用程序并将其上传到安全盒上。但这确实非常棘手,我想最终您将改变您对 Java Card API 的看法,并且您将决定尝试不仅喜欢它,而且热爱它! ;)
请注意,与 Java 卡相比,还有一些名为“Native Cards”的其他类型的卡。该卡中的操作系统不是 Java Card 运行时环境/虚拟机。这些卡具有专有/制造商特定的方式和语言(通常是 C 或汇编)来开发应用程序。但它并不像Java Card applet 开发那么容易。你会决定尝试......再次爱上它:D
更新:(感谢亲爱的 Vojta)
抱歉,我忘记了。正如 Vojta 在评论中提到的,最著名的本地卡类型之一是 MULTOS。您可以使用C、Java、汇编和一些其他语言为这些卡编写程序,之后您必须使用SwiftCard 将它们转换为MELL(MULTOS 卡的语言) 工具(由 SwiftC 和 SwiftJ 等组成)。一些好文档here和 here .
关于c - 是否可以使用 Java 以外的任何其他语言对启用 "Java Card"的智能卡进行编程?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30146107/