Reputation: 3067
Setup: NXP SmartCard with JavaCard 2.2.2
I want to store a wrapped keypart and a pem File on a smartcard in a secret manner. But I am wondering if it's possible to store this kind of files or at least their binary Data as bytestreams. I found the FileSystem Class in an old document but that seems to be gone in JavaCard 2.2.2. Is there any possibility to store data in a safe manner?
Upvotes: 0
Views: 564
Reputation: 2647
Keys and other sensitive data should always be stored in either Java Card Key
objects or PIN
objects. The operating system ensures the best integrity of this kind of secret data. Keys should never be stored in plain byte arrays.
PEM is just a format. If it represents a key store it in a Key
object; if it represents a certificate, you can store it in a plain byte array. Certificate data is not sensitive.
There is no filesystem implementation in the Java Card runtime; you have to build your own.
Upvotes: 3