Search found 18 matches
- Tue Jun 23, 2015 1:37 am
- Forum: Algorithm School
- Topic: Generate HMAC_SHA256 Signature in JavaCard Applet
- Replies: 4
- Views: 12208
Re: Generate HMAC_SHA256 Signature in JavaCard Applet
Before calling getInstance() method, it would be better to check CryptoException first . try { Signature.getInstance(Signature.ALG_HMAC_SHA_256, false); } catch (CryptoException e) { if (e.getReason() == CryptoException.NO_SUCH_ALGORITHM) { // Do something to treat algorithm absebce } } Thank you f...
- Mon Jun 22, 2015 11:36 pm
- Forum: Algorithm School
- Topic: Generate HMAC_SHA256 Signature in JavaCard Applet
- Replies: 4
- Views: 12208
Re: Generate HMAC_SHA256 Signature in JavaCard Applet
Your card should support Signature.ALG_HMAC_SHA_256 first. In most cases, a javacard wouldn't support all the cryptographic algorithms. If your card support this algorithms,you can implement HMAC by the following way. K = HMAC key of length 32 ipad = the byte 0x36 repeated 32 times opad = the byte 0...
- Tue Jun 16, 2015 1:42 am
- Forum: Algorithm School
- Topic: Find a faster way to compute CMAC subkeys
- Replies: 2
- Views: 7904
Re: Find a faster way to compute CMAC subkeys
Maybe you can try hard coding by loop unrolling . Remember to creat RAM byte array. output[0] = (byte)((byte)(input[0] << 1) | (byte)((input[1] >> 7) & 1)); output[1] = (byte)((byte)(input[1] << 1) | (byte)((input[2] >> 7) & 1)); output[2] = (byte)((byte)(input[2] << 1) | (byte)((input[3] >>...
- Thu Jun 11, 2015 11:09 pm
- Forum: Questions & Answers
- Topic: How much memory does this java card really have? (EEPROM and ObjectDeletion game!)
- Replies: 1
- Views: 7884
How much memory does this java card really have? (EEPROM and ObjectDeletion game!)
I wrote a simple program to check requestObjectDeletion() method functionality and my card's available memory. My applet respond to five different kind of APDU commands as follow : ⋅ SELECT APDU command : Response : 0X9000 ⋅ Command : XX 00 XX XX XX [...] Response : Return availa...
- Wed Jun 10, 2015 10:28 pm
- Forum: Algorithm School
- Topic: How to compute values using ' log' and 'sqrt' on javacard ?
- Replies: 5
- Views: 11632
Re: How to compute values using ' log' on javacard ?
e.g. You can perform an RSA modulo exponentiation using 2 as public key and a large modulus to perform squares.
- Wed Jun 10, 2015 10:04 pm
- Forum: Algorithm School
- Topic: How to compute values using ' log' and 'sqrt' on javacard ?
- Replies: 5
- Views: 11632
Re: How to compute values using ' log' on javacard ?
I've not came across such a class yet. The only way to meet your request is to use some limited tricks with the crypto API.
- Tue May 26, 2015 11:46 pm
- Forum: Communication
- Topic: ISO7816 - Odd INS codes?
- Replies: 4
- Views: 11678
Re: ISO7816 - Odd INS codes?
You can see the following description in the page 11 of ISO7816 spec. In the interindustry class, bit 1 of INS indicates a data field format as follows. * If bit 1 is set to 0 (even INS code), then no indication is provided. * If bit 1 is set to 1 (odd INS code), then BER - TLV encoding (see 5.2.2) ...
- Tue May 26, 2015 11:37 pm
- Forum: Communication
- Topic: What's the relationship between Java Card and GP?
- Replies: 2
- Views: 7637
Re: What's the relationship between Java Card and GP?
You can see the 'Runtime Environment' section in the chapter ' Card Atchitecture ' of GP spec. The image 'GlobalPlatform Card Architecture' has showed you the relationship between Java and GP.