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.

AES encryption

JavaCard Applet Development Related Questions and Answers.
irvinmags
Posts: 11
Joined: Mon Apr 11, 2016 9:01 pm
Points :149
Contact:

Re: AES encryption

Post by irvinmags » Sun Apr 24, 2016 8:52 pm

Hello there UNKNwYSHSA. As of now I really do not know where to start. My professor gave us an input, key and IV = 0. He also gave us the output so that we'll know what should our output be. As of now I am trying to learn CMAC and maybe from there on my professor will tell us what applet to make. Probably a purse card is the applet that we'll be developing.

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

Re: AES encryption

Post by UNKNwYSHSA » Sun Apr 24, 2016 11:00 pm

The CMAC you mentioned is not same as i told you before. (I told you CMAC is command MAC, but CMAC is Cipher-based Message Authentication Code).

Here's the usage:
1 Signature.getInstance();
Create one Signature instance.
The argument algorithm is Signature.ALG_AES_CMAC_128 for your needs;
2 signatureInstance.init();
Initialize the signature instance.
You need to build one AESKey using KeyBuilder for the argument theKey;
The argument theMode shall be Signature.MODE_SIGN when you generate the MAC or Sigature.MODE_VERRIFY when you verify the MAC;
3 signatureInstance.update();
Update input data using this method;
4 signatureInstance.sign();
Input last data block and generate the MAC;
4 signatureInstance.verify();
Input last data block and verify the MAC;

Here's links for MAC calculation:
https://en.wikipedia.org/wiki/ISO/IEC_9797-1
https://en.wikipedia.org/wiki/CMAC

You need to code yourself.
sense and simplicity

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 36 guests

JavaCard OS : Disclaimer