Search found 24 matches
- Thu Jun 29, 2017 5:10 am
- Forum: Questions & Answers
- Topic: javax.crypto.BadPaddingException
- Replies: 4
- Views: 11287
Re: javax.crypto.BadPaddingException
I did as you said, but the error is still there.
- Wed Jun 28, 2017 11:40 pm
- Forum: Questions & Answers
- Topic: javax.crypto.BadPaddingException
- Replies: 4
- Views: 11287
javax.crypto.BadPaddingException
I have coded a part of an applet which sends the public key from the smart card to an offcard side. To check the public key is sent properly, I am trying to encode a text with the public key of the smart card in the offcard side and sent to the smart card which decode it with its private key and ret...
- Wed May 03, 2017 5:46 am
- Forum: Questions & Answers
- Topic: Find the method to diversify application key
- Replies: 1
- Views: 5323
Find the method to diversify application key
Is there any method to diversify the Application key? And I know that if I want to do diversify the key, diversification data is needed. How to achieve this data in Java Card Application? Thanks for any help.
- Fri Jan 20, 2017 6:10 am
- Forum: Algorithm School
- Topic: The different results with DES algorithm
- Replies: 6
- Views: 13561
Re: The different results with DES algorithm
Thanks for all the help. It's due to overlap problem, indeed.
- Fri Jan 20, 2017 5:34 am
- Forum: Algorithm School
- Topic: The different results with DES algorithm
- Replies: 6
- Views: 13561
Re: The different results with DES algorithm
mabel wrote:You don't need to check the data. The problem is that input and output used the same buffer.
You can create a temp buffer. input uses apdu buffer and output uses the temp buffer. Then have a try.
Oops, that's it. I did as you said, it works.
- Fri Jan 20, 2017 4:47 am
- Forum: Algorithm School
- Topic: The different results with DES algorithm
- Replies: 6
- Views: 13561
Re: The different results with DES algorithm
Danieken wrote:Could you provide the data?
Among the result data, some blocks' data are same, but the subsequent data is inconsistent.
I used jcop/A22CR and JC30M48CR to do the test.
- Thu Jan 19, 2017 11:07 pm
- Forum: Algorithm School
- Topic: The different results with DES algorithm
- Replies: 6
- Views: 13561
The different results with DES algorithm
I finished a test case. Using DES Cipher, I got different encrypted results with the same APDU. The length of the input data is random.But When I use javax.crypto to verify, the result is correct. Here is part of applet code: case (byte)0x03: short updateLen = apdu.setIncomingAndReceive(); if (updat...
- Wed Dec 28, 2016 4:36 am
- Forum: Reader
- Topic: Does feitian have landing contact card reader?
- Replies: 5
- Views: 11047
Re: Does feitian have landing contact card reader?
Whats landing contact card reader? Is there any card reader called this?
- Fri Nov 04, 2016 1:36 am
- Forum: Questions & Answers
- Topic: Problem of DER bytes
- Replies: 3
- Views: 7584
Re: Problem of DER bytes
chico0609 wrote:Your problem is just because bytes are signed. Any byte in the 0x80-0xFF range will be signed extended to int and printed as a negative integer in range -127...-1.
Thanks for your help. If the problem is due to sign extension, how can I modify my code?
- Thu Nov 03, 2016 1:12 am
- Forum: Questions & Answers
- Topic: Problem of DER bytes
- Replies: 3
- Views: 7584
Problem of DER bytes
I am implementing Fips 196 and I am caught in a problem recently. I encode the user certificate into encoded byte array and wrap the DER byte array into string object and when I tried to get these DER encoded bytes back again. I got the different bytes. Why this happened? Any help here? certData = r...