简体   繁体   English

JavaCard存储(秘密)数据

[英]JavaCard store (Secret) Data

Setup: NXP SmartCard with JavaCard 2.2.2 设置:带有JavaCard 2.2.2的NXP SmartCard

I want to store a wrapped keypart and a pem File on a smartcard in a secret manner. 我想以秘密方式在智能卡上存储包装的关键部分和pem文件。 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. 我在一个旧文档中找到了FileSystem类,但是在JavaCard 2.2.2中似乎消失了。 Is there any possibility to store data in a safe manner? 是否有可能以安全的方式存储数据?

Keys and other sensitive data should always be stored in either Java Card Key objects or PIN objects. 密钥和其他敏感数据应始终存储在Java Card Key对象或PIN对象中。 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. PEM只是一种格式。 If it represents a key store it in a Key object; 如果它代表密钥,则将其存储在Key对象中; 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; Java Card运行时中没有文件系统实现。 you have to build your own. 你必须建立自己的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM