A few quotes from the Java API API 2.2.1:
Signature class description:
A tear or map reset event resets the initialized Signature object to the state it was in when it was previously initialized with an init () call. For algorithms that support keys with temporary key datasets, such as DES, triple DES, AES, and Korean SEED, the Signature object key becomes uninitialized for clear events associated with the Key object and is used to initialize the Signature object.
Signature.init(...) description:
For optimal performance, when the Key parameter is a temporary key, the implementation should, whenever possible, use temporary space for internal storage.
Does this mean that there are algorithms that require rewriting of read-only memory each time Signature.init(...) called? If so, is there a reason for this unpleasant behavior?
I ask this question because I came across strange behavior in my applet. It computes the signature of ECDSA. After about 100,000 signatures, the card (J2E145 from NXP) seems broken (I can no longer select the applet). Gradual memory corruption can be the cause because I call Signature.init(...) every time I get input. Can Signature.init(...) cause this behavior?
source share