1

I am trying to install an applet which uses security classes (Cipher, RandomData and MessageDigest), but always get an 6F50 error when trying to install it. The package is loaded correctly but the applet cannot be instantiated. I am allocating all objects in the constructor and the algorithms are supported by the card (at least according to the datasheet). If I comment out all security classes references, the applet loads and installs properly. I've tried allocating byte[] and Object's and it works, so this is not a space related problem (64K card with nothing else on it). I am using the SIM Alliance Loader v2 to load the applet. 'Regular' (non-crypto and STK) applets work fine.

The card supports Java Card 2.1.1 and a subset of Global Platform 2.1.1. Specs are here: http://shop.shadytel.com/sim_datasheet.pdf

Any ideas as to what the problem might be?

4

1 回答 1

2

很难判断问题出在哪里,因为卡返回了通常不应返回的专有状态字。6Fxx错误代码用于 ISO/IEC 7816-4 标准中的未知错误。因此,该值50是智能卡实现专有的。联系供应商。

数据表向我们展示了一个非常有限的 Java Card 平台,它只显示了对以下加密算法的支持:

  • DES 和 TDEA(三重 DES)
  • 安全和伪随机
  • SHA-1

因此,如果您超出这些规范,您应该期待一个表示错误的状态字。但是,通常您会期望6A80,表明命令数据中有问题。实例化小程序时出现错误的事实表明代码已被接受,但实例化或初始化其中一种加密算法失败。

如果您有一个良好的调试环境(Java Card 开发的必备条件),那么您应该能够逐步完成 Java Cardstatic install方法和 applet 构造函数。

于 2013-09-14T15:46:14.380 回答