处理入参STMSI得到iv

This commit is contained in:
zcy
2025-09-09 16:06:49 +08:00
parent 7425c4d980
commit c8608321d9
3 changed files with 159 additions and 78 deletions

View File

@@ -4,6 +4,7 @@ import javacard.framework.APDU;
import javacard.framework.Applet;
import javacard.framework.ISO7816;
import javacard.framework.ISOException;
//import javacard.security.RandomData;
/**
* @author liuww
@@ -12,7 +13,7 @@ import javacard.framework.ISOException;
public class XwSecurity extends Applet {
//todo test
public static final byte INS_PROCESS_DATA_TEST = (byte)0xE3;
// public static final byte INS_PROCESS_DATA_TEST = (byte)0xE3;
public static final byte INS_LOCATION_ENCRYPT = (byte)0xCA;
@@ -28,11 +29,10 @@ public class XwSecurity extends Applet {
public XwSecurity(byte[] bArray, short bOffset, byte bLength) {
// TODO Auto-generated constructor stub
method = new Method(); //todo new?
method = new Method();//rng); //todo new?
// key store -> flash
key_store_byte = new byte[120];
register(bArray, (short)(bOffset + 1), bArray[bOffset]);
}
public static void install(byte[] bArray, short bOffset, byte bLength)
@@ -71,10 +71,10 @@ public class XwSecurity extends Applet {
// break;
//todo test
case INS_PROCESS_DATA_TEST:
method.testZuc256(apdu);
break;
// //todo test
// case INS_PROCESS_DATA_TEST:
// method.testZuc256(apdu);
// break;
case INS_LOCATION_ENCRYPT: