applet - `Signature.init()` 是否重写持久内存?

标签 applet smartcard javacard eeprom

Java Card API 2.2.1 中的一些引用:
Signature类(class)说明:

A tear or card reset event resets an initialized Signature object to the state it was in when previously initialized via a call to init(). For algorithms which support keys with transient key data sets, such as DES, triple DES, AES, and Korean SEED the Signature object key becomes uninitialized on clear events associated with the Key object used to initialize the Signature object.


Signature.init(...)描述:

For optimal performance, when the theKey parameter is a transient key, the implementation should, whenever possible, use transient space for internal storage.



是不是说有算法每次都需要重写持久内存Signature.init(...)叫做?如果是,这种令人不快的行为是否有任何原因?

我问这个问题,因为我在我的小程序中遇到了一个奇怪的行为。它计算 ECDSA 签名。在大约 100 000 个签名后,卡片(NXP 的 J2E145)似乎坏了(我不能再选择小程序了)。持久性内存损坏可能是原因,因为我调用 Signature.init(...)每次我收到输入数据。可否Signature.init(...)是这种行为的原因?

最佳答案

是的,Signature.init()将 key 对象的引用存储在持久内存中。但是,我认为 API 必须实现“磨损均衡”功能,在这种情况下应该保持 EEPROM 的耐用性。

建议您查看Cipher.init()的行为后再下结论。 , 卡是否继续其类似行为。

关于applet - `Signature.init()` 是否重写持久内存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48740913/

相关文章:

java卡从 ".cap file"反编译操作

smartcard - Java 智能卡 IO 上出现奇怪的无效 CLA 命令 (6E 00)

java - 运行 java 应用程序/小程序时出错

java - .Jar 无法在 Blogger 上运行

java - 如何使用java卡apdu从智能卡写入和读取数据

smartcard - 智能卡如何在 T0 中区分 Case 2 和 Case 3 APDU header ?

java - Java 3.0 智能卡 Servlet 可以与 Web 服务器交互吗?

Java 小程序在调用 javascript 函数时使 ubuntu 上的 chrome java 崩溃

JAVA:找不到符号:方法绘制

java - 编写java卡小程序的有效方法是什么?