是否可以使用 Java 以外的任何其他语言对启用 "Java Card" 的智能卡进行编程?

Is it possible to program a "Java Card" - enabled smart card in any other language than Java?

我有一张 Java 支持卡片的智能卡和一张 reader 是我的实验室讲师给的。我应该使用 Java Card 2.1.1 API.

做一个项目

我不喜欢 Java 卡 API。

是否可以使用任何其他语言(如 C)对我的智能卡进行编程?

一般答案:

很遗憾,目前没有其他方法,只能使用 Java 卡 API 对 Java 卡兼容卡进行编程。

详细答案:

有些卡片有一个名为“安全盒”的机制。如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.

and here你可以看到一些关于Secure Box的信息。据我所知,您可以使用 CAssembly 语言编写应用程序并将它们上传到 Secure Box。但这真的很棘手,我想你最终会改变对 Java 卡 API 的看法,你会做出决定,不仅要喜欢吧,也爱吧! ;)

请注意,与Java卡相比,还有一些其他类型的卡名为“Native Cards”。此卡中的操作系统不是 Java Card Runtime Environment/Virtual Machine。这些卡有 proprietary/manufacturer-specific 方式和语言(通常是 C 或汇编)来开发应用程序。但是不像Java卡片小程序开发那么容易。你会做出决定尝试......再次爱上它:D

更新:(感谢亲爱的 Vojta)

对不起,我忘记了。正如 Vojta 在他的评论中提到的,最著名的本地卡类型之一是 MULTOS。您可以用 C、Java、汇编 和其他一些语言为这些卡编写程序,然后必须将它们转换为 MELL (MULTOS 卡的语言)使用 SwiftCard 工具(由 SwiftC 和 SwiftJ 以及...组成)。一些不错的文档 here and here.