JavacardOS will not accept order any more, please contact our partner Feitian online Store:
https://ftsafe.en.alibaba.com/index.html
https://ftsafe.en.alibaba.com/index.html
AES encryption
Re: AES encryption
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.
- UNKNwYSHSA
- Posts: 630
- Joined: Thu May 21, 2015 4:05 am
- Points :3055
- Contact:
Re: AES encryption
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.
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
Who is online
Users browsing this forum: No registered users and 26 guests