Search found 25 matches

by Tazmania09
Thu Sep 21, 2017 3:57 am
Forum: Questions & Answers
Topic: 6A80 exception during applet installation
Replies: 1
Views: 504

Re: 6A80 exception during applet installation

I tried to download your applet into my card and it succeed. What surprised me is that I have five load trace, but your log shows only two. > 80 E6 02 00 16 09 A0 00 00 00 62 03 01 0C 06 08 A0 00 00 00 03 00 00 00 00 00 00 00 < 00 90 00 ... > 80 E8 00 00 FA C4 82 01 2A 01 00 2E DE CA FF ED 02 02 04 ...
by Tazmania09
Wed Aug 02, 2017 4:44 am
Forum: Questions & Answers
Topic: Memory access
Replies: 1
Views: 552

Re: Memory access

by Tazmania09
Mon Jun 12, 2017 4:01 am
Forum: Questions & Answers
Topic: How to know the first bit of a data byte
Replies: 2
Views: 506

Re: How to know the first bit of a data byte

You may try to use AND operation to know the bit value.

For example,
Make your data do the AND operation with 0x80.
So,
- if it is 1 in the first bit, the operation result will be 0x80.
- and if it is 0 in the first bit,the operation result will be 0.
by Tazmania09
Wed May 10, 2017 10:31 pm
Forum: Questions & Answers
Topic: Get ILLEGAL_VALUE error when decrypting a message
Replies: 2
Views: 681

Re: Get ILLEGAL_VALUE error when decrypting a message

When you are Verifying or Encrypting, RSA public keys are used. When you are Signing or Decrypting, RSA private keys are used.

Please make sure your keys match your usage.
by Tazmania09
Wed May 10, 2017 10:30 pm
Forum: Questions & Answers
Topic: How does java card treat the cap file when sending APDU command
Replies: 1
Views: 446

Re: How does java card treat the cap file when sending APDU command

Just think of the cap file as a JAR file and it contains the byte code for your applets. When the CAP file is loaded and installed, the JCVM parses certain tokens out that enable it to execute.
by Tazmania09
Fri Apr 28, 2017 4:03 am
Forum: Questions & Answers
Topic: pre-personalization on a J2A040 card
Replies: 2
Views: 796

Re: pre-personalization on a J2A040 card

6A 81: Function not supported

Do you know the card transport key? Just use this key as the AID in the SELECT command.
by Tazmania09
Thu Mar 09, 2017 5:30 am
Forum: Questions & Answers
Topic: Get 0X6F00 with KeyPair(KeyPair.ALG_EC_FP,length)
Replies: 2
Views: 604

Re: Get 0X6F00 with KeyPair(KeyPair.ALG_EC_FP,length)

You can use try..catch statement to get reason codes.

Code: Select all

try{
  ....genKeyPair()
}
catch( CryptoException e ) {
        CryptoException.throwIt( e.getReason )
}
by Tazmania09
Thu Feb 02, 2017 8:23 pm
Forum: Algorithm School
Topic: How to generate DES key without setting it in advance
Replies: 3
Views: 1085

Re: How to generate DES key without setting it in advance

Here is a method to generate a random DES key. RandomData rand = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM); short lenBytes = (short) (KeyBuilder.LENGTH_DES3_3KEY/8); byte[] buffer = JCSystem.makeTransientByteArray(lenBytes, JCSystem.CLEAR_ON_DESELECT); DESKey key = (DESKey) KeyBuilder.bui...
by Tazmania09
Mon Nov 07, 2016 4:01 am
Forum: Questions & Answers
Topic: Response value 0006 in jCardSim
Replies: 4
Views: 1176

Re: Response value 0006 in jCardSim

Perhaps. You only need to regard response 0006 as response 9000.
JavaCard OS : Disclaimer