接收SW ="6999","6422","6444".和"6D00";在使用NetBeans,CREF和JCWDE的模拟过程中? [英] Receiving SW=`"6999", "6422", "6444" and "6D00" in the simulating procedure with NetBeans , CREF and JCWDE?

查看:139
本文介绍了接收SW ="6999","6422","6444".和"6D00";在使用NetBeans,CREF和JCWDE的模拟过程中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在NetBeans for Java Card中编写了一个简单的8字节随机数生成器程序.

A simple 8 byte random number generator program is written in NetBeans for Java Card.

这是程序:

public class RandGen extends Applet {
    byte[] generatedArray;
    RandomData randData =   RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);

    private RandGen() {
        generatedArray = JCSystem.makeTransientByteArray((short)8, JCSystem.CLEAR_ON_DESELECT);
    }

    public static void install(byte bArray[], short bOffset, byte bLength)
            throws ISOException {
        new RandGen().register();
    }

    public void process(APDU arg0) throws ISOException {
        byte[] byffer = arg0.getBuffer();
        byte[] generatedRandom = MyGenerator(arg0);
        Util.arrayCopyNonAtomic(generatedRandom, (short) 0, byffer, (short) 0,
                (short) generatedRandom.length);
        arg0.setOutgoingAndSend((short) 0, (short) generatedRandom.length);
    }

    public byte[] MyGenerator(APDU apdu) {
        randData.generateData(generatedArray, (short) 0, (short) 8);
        return generatedArray;
    }

}

我单击了锤子按钮以构建项目,然后单击绿色三角形以在模拟器上运行项目,如下所示:

I clicked on the hammer button to build the project and after that the green triangle to run the project on the simulator as follow :

问题:

当我对HelloWorld小程序执行上述过程时,在 3 部分(上图)中,我的小程序AID出现,并且在 4 部分中,模拟器返回SW = 9000响应命令.但是,如您所见,对于上述程序,既没有出现applet AID,也没有出现SW = 9000.为什么?

When I follow the above process for a HelloWorld applet, in the section 3 (Of above image) my applet AID appears and in the section 4 the simulator returns SW=9000 in response of the command. But for the above program, as you see, neither the applet AID appears, nor the SW=9000. Why?

对于HelloWorld小程序,我右键单击默认设备,然后选择控制台并发送APDU命令,卡将返回预期的APDU响应.但是对于此小程序,它仅返回SW=6999.为什么?

For the HelloWorld applet, I right click on the Default Device and select Console and send APDU commands, and the card returns expected APDU responses. But for this applet, it returns SW=6999 only. Why?

其他信息:

当我尝试使用 CREF JCWDE 来模拟此applet时,也会收到一些不同的状态字:

I receive some different Status Words when I tried to simulate this applet using CREF and JCWDE also :

这是我在以下模拟中使用的 MyScrip.script 文件的内容:

This is contents of MyScrip.script file that I used in the below simulation :

powerup;
// Select the installer applet
0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
0x80 0xB0 0x00 0x00 0x00 0x7F;

// randGen/javacard/Header.cap
0x80 0xB2 0x01 0x00 0x00 0x7F;
0x80 0xB4 0x01 0x00 0x17 0x01 0x00 0x14 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x04 0x00 0x01 0x0A 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x7F;
0x80 0xBC 0x01 0x00 0x00 0x7F;

// randGen/javacard/Directory.cap
0x80 0xB2 0x02 0x00 0x00 0x7F;
0x80 0xB4 0x02 0x00 0x20 0x02 0x00 0x1F 0x00 0x14 0x00 0x1F 0x00 0x0F 0x00 0x1F 0x00 0x32 0x00 0x0E 0x00 0x51 0x00 0x0A 0x00 0x13 0x00 0x00 0x00 0x83 0x00 0x00 0x00 0x00 0x00 0x00 0x03 0x7F;
0x80 0xB4 0x02 0x00 0x02 0x01 0x00 0x7F;
0x80 0xBC 0x02 0x00 0x00 0x7F;

// randGen/javacard/Import.cap
0x80 0xB2 0x04 0x00 0x00 0x7F;
0x80 0xB4 0x04 0x00 0x20 0x04 0x00 0x1F 0x03 0x03 0x01 0x07 0xA0 0x00 0x00 0x00 0x62 0x01 0x01 0x03 0x01 0x07 0xA0 0x00 0x00 0x00 0x62 0x01 0x02 0x00 0x01 0x07 0xA0 0x00 0x00 0x00 0x62 0x7F;
0x80 0xB4 0x04 0x00 0x02 0x00 0x01 0x7F;
0x80 0xBC 0x04 0x00 0x00 0x7F;

// randGen/javacard/Applet.cap
0x80 0xB2 0x03 0x00 0x00 0x7F;
0x80 0xB4 0x03 0x00 0x12 0x03 0x00 0x0F 0x01 0x0B 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x00 0x00 0x16 0x7F;
0x80 0xBC 0x03 0x00 0x00 0x7F;

// randGen/javacard/Class.cap
0x80 0xB2 0x06 0x00 0x00 0x7F;
0x80 0xB4 0x06 0x00 0x11 0x06 0x00 0x0E 0x00 0x80 0x03 0x02 0x00 0x02 0x07 0x02 0x00 0x00 0x00 0x23 0x00 0x42 0x7F;
0x80 0xBC 0x06 0x00 0x00 0x7F;

// randGen/javacard/Method.cap
0x80 0xB2 0x07 0x00 0x00 0x7F;
0x80 0xB4 0x07 0x00 0x20 0x07 0x00 0x51 0x00 0x02 0x10 0x18 0x8C 0x00 0x03 0x18 0x10 0x08 0x90 0x0B 0x87 0x00 0x18 0x05 0x8D 0x00 0x02 0x87 0x01 0x7A 0x02 0x30 0x8F 0x00 0x04 0x3D 0x8C 0x7F;
0x80 0xB4 0x07 0x00 0x20 0x00 0x05 0x8B 0x00 0x06 0x7A 0x05 0x22 0x19 0x8B 0x00 0x07 0x2D 0x18 0x19 0x8B 0x00 0x08 0x2E 0x1B 0x03 0x1A 0x03 0x1B 0x92 0x8D 0x00 0x09 0x3B 0x19 0x03 0x1B 0x7F;
0x80 0xB4 0x07 0x00 0x14 0x92 0x8B 0x00 0x0A 0x7A 0x04 0x20 0xAD 0x01 0xAD 0x00 0x03 0x10 0x08 0x8B 0x00 0x0B 0xAD 0x00 0x77 0x7F;
0x80 0xBC 0x07 0x00 0x00 0x7F;

// randGen/javacard/StaticField.cap
0x80 0xB2 0x08 0x00 0x00 0x7F;
0x80 0xB4 0x08 0x00 0x0D 0x08 0x00 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x7F;
0x80 0xBC 0x08 0x00 0x00 0x7F;

// randGen/javacard/ConstantPool.cap
0x80 0xB2 0x05 0x00 0x00 0x7F;
0x80 0xB4 0x05 0x00 0x20 0x05 0x00 0x32 0x00 0x0C 0x02 0x00 0x00 0x00 0x02 0x00 0x00 0x01 0x06 0x81 0x0E 0x00 0x06 0x80 0x03 0x00 0x01 0x00 0x00 0x00 0x06 0x00 0x00 0x01 0x03 0x80 0x03 0x7F;
0x80 0xB4 0x05 0x00 0x15 0x01 0x03 0x80 0x0A 0x01 0x03 0x00 0x00 0x08 0x06 0x80 0x10 0x02 0x03 0x80 0x0A 0x08 0x03 0x81 0x0E 0x01 0x7F;
0x80 0xBC 0x05 0x00 0x00 0x7F;

// randGen/javacard/RefLocation.cap
0x80 0xB2 0x09 0x00 0x00 0x7F;
0x80 0xB4 0x09 0x00 0x16 0x09 0x00 0x13 0x00 0x05 0x0D 0x07 0x31 0x02 0x08 0x00 0x0A 0x05 0x0C 0x08 0x04 0x03 0x07 0x06 0x0A 0x08 0x0D 0x7F;
0x80 0xBC 0x09 0x00 0x00 0x7F;

0x80 0xBA 0x00 0x00 0x00 0x7F;

// Select the installer applet
0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
// create RandGen applet
// select RandGen applet
0x00 0xA4 0x04 0x00 0xb 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x00 0x7F;
0x80 0xB8 0x00 0x00 0xd 0xb 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x00 0x00 0x00 0x7F;

powerdown;

1- CREF正在运行:(对于负载上限命令,返回SW = 9000,对于最后一条命令,返回SW = 6D00和SW = 6444)

1- CREF is running : (Returns SW=9000 for load cap commands, but SW=6D00 and SW=6444 for last commands)

C:\Java\java_card_kit-2_2_2-rr-bin-windows-do\bin>apdutool.bat C:\Users\AmirEbrahim\Documents\EclipseProjects\RandomGenerator\bin\randGen\javacard\MyScript.script
Java Card 2.2.2 APDU Tool, Version 1.3
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
Opening connection to localhost on port 9025.
Connected.
Received ATR = 0x3b 0xf0 0x11 0x00 0xff 0x01
CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 09, a0, 00, 00, 00, 62, 03, 01, 08, 01, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b0, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 01, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 01, P2: 00, Lc: 17, 01, 00, 14, de, ca, ff, ed, 01, 02, 04, 00, 01, 0a, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 01, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 02, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 02, P2: 00, Lc: 20, 02, 00, 1f, 00, 14, 00, 1f, 00, 0f, 00, 1f, 00, 32, 00, 0e, 00, 51, 00, 0a, 00, 13, 00, 00, 00, 83, 00, 00, 00, 00, 00, 00, 03, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 02, P2: 00, Lc: 02, 01, 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 02, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 04, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 04, P2: 00, Lc: 20, 04, 00, 1f, 03, 03, 01, 07, a0, 00, 00, 00, 62, 01, 01, 03, 01, 07, a0, 00, 00, 00, 62, 01, 02, 00, 01, 07, a0, 00, 00, 00, 62, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 04, P2: 00, Lc: 02, 00, 01, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 04, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 03, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 03, P2: 00, Lc: 12, 03, 00, 0f, 01, 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, 00, 16, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 03, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 06, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 06, P2: 00, Lc: 11, 06, 00, 0e, 00, 80, 03, 02, 00, 02, 07, 02, 00, 00, 00, 23, 00, 42, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 06, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 07, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 07, 00, 51, 00, 02, 10, 18, 8c, 00, 03, 18, 10, 08, 90, 0b, 87, 00, 18, 05, 8d, 00, 02, 87, 01, 7a, 02, 30, 8f, 00, 04, 3d, 8c, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 00, 05, 8b, 00, 06, 7a, 05, 22, 19, 8b, 00, 07, 2d, 18, 19, 8b, 00, 08, 2e, 1b, 03, 1a, 03, 1b, 92, 8d, 00, 09, 3b, 19, 03, 1b, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 14, 92, 8b, 00, 0a, 7a, 04, 20, ad, 01, ad, 00, 03, 10, 08, 8b, 00, 0b, ad, 00, 77, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 07, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 08, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 08, P2: 00, Lc: 0d, 08, 00, 0a, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 08, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 05, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 05, P2: 00, Lc: 20, 05, 00, 32, 00, 0c, 02, 00, 00, 00, 02, 00, 00, 01, 06, 81, 0e, 00, 06, 80, 03, 00, 01, 00, 00, 00, 06, 00, 00, 01, 03, 80, 03, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 05, P2: 00, Lc: 15, 01, 03, 80, 0a, 01, 03, 00, 00, 08, 06, 80, 10, 02, 03, 80, 0a, 08, 03, 81, 0e, 01, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 05, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 09, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 09, P2: 00, Lc: 16, 09, 00, 13, 00, 05, 0d, 07, 31, 02, 08, 00, 0a, 05, 0c, 08, 04, 03, 07, 06, 0a, 08, 0d, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: bc, P1: 09, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: ba, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 09, a0, 00, 00, 00, 62, 03, 01, 08, 01, Le: 00, SW1: 90, SW2: 00
CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, Le: 00, SW1: 6d, SW2: 00
CLA: 80, INS: b8, P1: 00, P2: 00, Lc: 0d, 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, 00, Le: 00, SW1: 64, SW2: 44

2- JCWDE正在运行:(对于负载上限命令,返回SW = 6421,对于最后一条命令,返回SW = 6d00和SW = 6444)

2- JCWDE is running : (Returns SW=6421 for load cap commands, and SW=6d00 and SW=6444 for the last commands)

C:\Java\java_card_kit-2_2_2-rr-bin-windows-do\bin>apdutool.bat C:\Users\AmirEbrahim\Documents\EclipseProjects\RandomGenerator\bin\randGen\javacard\MyScript.script
Java Card 2.2.2 APDU Tool, Version 1.3
Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
Opening connection to localhost on port 9025.
Connected.
Received ATR = 0x3b 0xf0 0x11 0x00 0xff 0x00
CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 09, a0, 00, 00, 00, 62, 03, 01, 08, 01, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b0, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b2, P1: 01, P2: 00, Lc: 00, Le: 00, SW1: 90, SW2: 00
CLA: 80, INS: b4, P1: 01, P2: 00, Lc: 17, 01, 00, 14, de, ca, ff, ed, 01, 02, 04, 00, 01, 0a, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, Le: 00, SW1: 64, SW2: 3a
CLA: 80, INS: bc, P1: 01, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 02, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 02, P2: 00, Lc: 20, 02, 00, 1f, 00, 14, 00, 1f, 00, 0f, 00, 1f, 00, 32, 00, 0e, 00, 51, 00, 0a, 00, 13, 00, 00, 00, 83, 00, 00, 00, 00, 00, 00, 03, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 02, P2: 00, Lc: 02, 01, 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 02, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 04, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 04, P2: 00, Lc: 20, 04, 00, 1f, 03, 03, 01, 07, a0, 00, 00, 00, 62, 01, 01, 03, 01, 07, a0, 00, 00, 00, 62, 01, 02, 00, 01, 07, a0, 00, 00, 00, 62, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 04, P2: 00, Lc: 02, 00, 01, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 04, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 03, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 03, P2: 00, Lc: 12, 03, 00, 0f, 01, 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, 00, 16, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 03, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 06, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 06, P2: 00, Lc: 11, 06, 00, 0e, 00, 80, 03, 02, 00, 02, 07, 02, 00, 00, 00, 23, 00, 42, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 06, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 07, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 07, 00, 51, 00, 02, 10, 18, 8c, 00, 03, 18, 10, 08, 90, 0b, 87, 00, 18, 05, 8d, 00, 02, 87, 01, 7a, 02, 30, 8f, 00, 04, 3d, 8c, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 20, 00, 05, 8b, 00, 06, 7a, 05, 22, 19, 8b, 00, 07, 2d, 18, 19, 8b, 00, 08, 2e, 1b, 03, 1a, 03, 1b, 92, 8d, 00, 09, 3b, 19, 03, 1b, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 07, P2: 00, Lc: 14, 92, 8b, 00, 0a, 7a, 04, 20, ad, 01, ad, 00, 03, 10, 08, 8b, 00, 0b, ad, 00, 77, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 07, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 08, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 08, P2: 00, Lc: 0d, 08, 00, 0a, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 08, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 05, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 05, P2: 00, Lc: 20, 05, 00, 32, 00, 0c, 02, 00, 00, 00, 02, 00, 00, 01, 06, 81, 0e, 00, 06, 80, 03, 00, 01, 00, 00, 00, 06, 00, 00, 01, 03, 80, 03, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 05, P2: 00, Lc: 15, 01, 03, 80, 0a, 01, 03, 00, 00, 08, 06, 80, 10, 02, 03, 80, 0a, 08, 03, 81, 0e, 01, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 05, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b2, P1: 09, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: b4, P1: 09, P2: 00, Lc: 16, 09, 00, 13, 00, 05, 0d, 07, 31, 02, 08, 00, 0a, 05, 0c, 08, 04, 03, 07, 06, 0a, 08, 0d, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: bc, P1: 09, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 80, INS: ba, P1: 00, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 21
CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 09, a0, 00, 00, 00, 62, 03, 01, 08, 01, Le: 00, SW1: 90, SW2: 00
CLA: 00, INS: a4, P1: 04, P2: 00, Lc: 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, Le: 00, SW1: 6d, SW2: 00
CLA: 80, INS: b8, P1: 00, P2: 00, Lc: 0d, 0b, 01, 02, 03, 04, 05, 06, 07, 08, 09, 00, 00, 00, Le: 00, SW1: 64, SW2: 44

C:\Java\java_card_kit-2_2_2-rr-bin-windows-do\bin>

这个小程序怎么了?

请注意,任何使applet更加有效的评论也将不胜感激.

Note that any comment to make the applet more efficient will also appreciate.

编辑/更新:CREF和JCWDE的输出彼此不同.并且与NetBeans也不同. (我在上一版中错了)

推荐答案

也许这是支持ALG_SECURE_RANDOM的模拟器限制问题.

Maybe that's simulator limitation problem to support ALG_SECURE_RANDOM.

请改为尝试ALG_PSEUDO_RANDOM.

来自随机数据类:

ALG_PSEUDO_RANDOM

Utility pseudo-random number generation algorithms. The random number sequence generated by this algorithm need not be the same even if seeded with the same seed data.

Even if a transaction is in progress, the update of the internal state shall not participate in the transaction. 

ALG_SECURE_RANDOM

密码安全的随机数生成算法.

Cryptographically secure random number generation algorithms.

P.S. 另外,尝试从头开始重新创建项目.

P.S. Also, try recreating the project from scratch.

这篇关于接收SW ="6999","6422","6444".和"6D00";在使用NetBeans,CREF和JCWDE的模拟过程中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆