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/