How to do decryption using java card
Posted: Tue Jan 12, 2016 1:40 am
I am going to do decryption using java card. I wonder if the following operation is correct. If I have made any mistake, please correct me!
Here are my operation.
STEP 1
(1) from an app on the pc, generate a RSA keypair
(2) call the getencoded() method on the privatekey object to get the bytes, and using an applet which
I have created on the card, write these bytes on the card
(3) call getencoded() on the publickkey object, and save the bytes in a database
STEP 2
(1) server - encrypt some data using the public key from the database
(2) send this encrypted data to the client
(3) client passes this data to the card applet, which then decrypts this data using the private key stored on it in step 1.
Here are my operation.
STEP 1
(1) from an app on the pc, generate a RSA keypair
(2) call the getencoded() method on the privatekey object to get the bytes, and using an applet which
I have created on the card, write these bytes on the card
(3) call getencoded() on the publickkey object, and save the bytes in a database
STEP 2
(1) server - encrypt some data using the public key from the database
(2) send this encrypted data to the client
(3) client passes this data to the card applet, which then decrypts this data using the private key stored on it in step 1.