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.

Javacard kit 3.0.4 & crypto algorithm

Applets Development Guide

Moderator: product

prichard
Posts: 1
Joined: Wed Feb 17, 2016 11:53 am
Points :76
Location: Caen - FRANCE
Contact:

Javacard kit 3.0.4 & crypto algorithm

Post by prichard » Tue Nov 28, 2017 10:12 am

Hi,
I wrote this little applet to see if your simulator (and later one of your cards) supports this style of crypto:
Signature. getInstance (MessageDigest. ALG_NULL, Signature. SIG_CIPHER_ECDSA, Cipher. PAD_NULL, false);

my applet this compiles in java card kit 3.0.4, but during the installation on the simulator I have a: 69 85 Conditions of use not satisfied with the INSTALL for install & make selectable command.

Is your simulator fully compatible with java card kit 3.0.4?
Do you have a card that is compatible with java card kit 3.0.4?

Thank you in advance for your help,
Pascal

code of the applet:

package com.fime.ecTest;

import javacard.framework.APDU;
import javacard.framework.Applet;
import javacard.framework.AppletEvent;
import javacard.framework.ISO7816;
import javacard.framework.ISOException;
import javacard.security.MessageDigest;
import javacard.security.Signature;
import javacardx.crypto.Cipher;

public class Application extends Applet implements AppletEvent {

/** SM2 cryptographic object */
private static Signature sm2Object;

Application()
{
sm2Object = Signature.getInstance(MessageDigest.ALG_NULL, Signature.SIG_CIPHER_ECDSA, Cipher.PAD_NULL, false);

}

public static void install(byte[] bArray, short bOffset, byte bLength) {
// GP-compliant JavaCard applet registration
new Application().register(bArray, (short) (bOffset + 1),
bArray[bOffset]);
}

public void process(APDU apdu) {
// Good practice: Return 9000 on SELECT
if (selectingApplet()) {
return;
}

byte[] buf = apdu.getBuffer();
switch (buf[ISO7816.OFFSET_INS]) {
case (byte) 0x00:
break;
default:
// good practice: If you don't know the INStruction, say so:
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
}
}

public void uninstall() {
sm2Object = null;
}
}

roundtable
Posts: 18
Joined: Mon Sep 18, 2017 9:52 pm
Points :240
Contact:

Re: Javacard kit 3.0.4 & crypto algorithm

Post by roundtable » Thu Dec 07, 2017 11:52 pm

For signature builder call Signature. getInstance (MessageDigest. ALG_NULL, Signature. SIG_CIPHER_ECDSA, Cipher. PAD_NULL, false);
infact , it is failed as expected, since ECDSA is signature standard specified In ANSI X9.62-1998, for this scheme, only message digest and Private key are needed without any padding method, so When you call . getInstance (MessageDigest. ALG_NULL, Signature. SIG_CIPHER_ECDSA, Cipher. PAD_NULL, false) , where algorithm for message Digest is NULL, which is not met requirement of ECDSA scheme. exception is thrown as expected.

Similarly, if padding method is not Cipher. PAD_NULL, exception mqy be thrown .

kuafu
Posts: 317
Joined: Thu Jun 25, 2015 2:09 am
Points :4551
Contact:

Re: Javacard kit 3.0.4 & crypto algorithm

Post by kuafu » Fri Dec 08, 2017 1:29 am

JavaCard JC30M48CRhttps://www.javacardos.com/store/javacard-jc30m48cr.php
JavaCard JC10M128Chttps://www.javacardos.com/store/javacard-jc10m128c.php
JavaCard JC10M24Rhttps://www.javacardos.com/store/smartcard_eJavaToken.php
JavaCard A40CRhttps://www.javacardos.com/store/javacard-a40cr.php
JavaCard A22CRhttps://www.javacardos.com/store/javacard-a22cr.php

They are all compatible with java card kit 3.0.4.

and our simulator is fully compatible with java card kit 3.0.4
well

Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 18 guests

JavaCard OS : Disclaimer