Our Online Store have the new products: RFID antenna board. Currently it can work with JC10M24R and JCOP4 card chips.
Compared with normal cards, the antenna board module has a smaller size and fixed holes, which is easy to integrate in the IOT(Internet Of Things) project.

javacardx.crypto package / jcdk 2.1.1

JavaCard Applet Development Related Questions and Answers.
flytoUS2016
Posts: 1
Joined: Thu Sep 22, 2016 4:25 am
Points :54
Contact:

javacardx.crypto package / jcdk 2.1.1

Post by flytoUS2016 » Tue Jan 03, 2017 10:02 am

hi:
I'm devolping a java card applet with the jcdk 2.1.1. I can install some applets on the card and now I try to use the Cipher class and the KeyEncryption interface in package javacardx.crypto. But in the documentation I found that its in an optional package and not in the jcdk included. Where can I find crypto packages?and how to use it?

Thanks in advance!!!!

User avatar
UNKNwYSHSA
Posts: 630
Joined: Thu May 21, 2015 4:05 am
Points :3053
Contact:

Re: javacardx.crypto package / jcdk 2.1.1

Post by UNKNwYSHSA » Wed Jan 04, 2017 1:31 am

It is only one interface.
You need to check if the class Key implements this interface.
Here's one piece of source code for its usage:

Code: Select all

// The last parameter of method KeyBuilder.buildKey is true, means the built key implements the Encryption interface;
// If key encryption interface is not supported, this method throws exception: CryptoException.NO_SUCH_ALGORITHM;
aesKeyEncryption = (AESKey) KeyBuilder.buildKey(keyType, KeyBuilder.LENGTH_AES_128, true);
if (!(aesKeyEncryption instanceof KeyEncryption)) {
    // Throw exception;
    // return;
}
// aesKeyEncryption.setKeyCipher(...);
// aesKeyEncryption.getKeyCipher();
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 49 guests

JavaCard OS : Disclaimer