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.

3Des encript and decrypt

JavaCard Applet Development Related Questions and Answers.
naresh
Posts: 20
Joined: Fri May 11, 2018 11:29 am
Points :382
Contact:

3Des encript and decrypt

Post by naresh » Fri Jul 20, 2018 7:50 am

Hello Sir,
Can any one help me 3des encryption and after encryption what was the encrypted data length and how to decrypt it.
Thanks,
Thammineni Naresh

happy123654
Posts: 35
Joined: Wed Jun 20, 2018 4:06 am
Points :218
Contact:

Re: 3Des encript and decrypt

Post by happy123654 » Mon Jul 23, 2018 5:37 am

the input data for 3DES encryption is divided into many blocks and every block has the fixed length: 64bit = 8bytes.
If the last block does not match the length, we need to pad this block, which make the block to be 64bit.
the padding mode have the followed:

public static final byte PAD_ISO9796
public static final byte PAD_ISO9796_MR
public static final byte PAD_ISO9797_1_M1_ALG3
public static final byte PAD_ISO9797_1_M2_ALG3
public static final byte PAD_ISO9797_M1
public static final byte PAD_ISO9797_M2
public static final byte PAD_NOPAD

If the last block is not 64bit and the padding mode is PAD_NOPAD, this will result in fail.

The input data for 3DES decryption must have the length of the multiple of 64bit and the input data is the cipher text.
COS decrypt the cipher text and unpad the result.

If you want to find the theory of the 3DES encryption and decryption. you can search it on the net.

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 54 guests

JavaCard OS : Disclaimer