1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
|
package simpleapdu;
import applets.EC_Consts;
import applets.SimpleECCApplet;
import javacard.framework.ISO7816;
import javacard.security.CryptoException;
import javacard.security.KeyPair;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import javax.smartcardio.ResponseAPDU;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Arrays;
/**
* @author Petr Svenda petr@svenda.com
*/
public class SimpleAPDU {
private CardMngr cardManager = new CardMngr();
private DirtyLogger systemOutLogger = null;
private CommandLineParser cliParser = new DefaultParser();
private Options opts = new Options();
private static final String cliHeader = "";
private static final String cliFooter = "";
private final static byte SELECT_ECTESTERAPPLET[] = {(byte) 0x00, (byte) 0xa4, (byte) 0x04, (byte) 0x00, (byte) 0x0a,
(byte) 0x45, (byte) 0x43, (byte) 0x54, (byte) 0x65, (byte) 0x73, (byte) 0x74, (byte) 0x65, (byte) 0x72, (byte) 0x30, (byte) 0x31};
private static final byte TESTECSUPPORTALL_FP[] = {(byte) 0xB0, (byte) 0x5E, (byte) 0x00, (byte) 0x00, (byte) 0x00};
private static final byte TESTECSUPPORTALL_F2M[] = {(byte) 0xB0, (byte) 0x5F, (byte) 0x00, (byte) 0x00, (byte) 0x00};
private static final byte TESTECSUPPORT_GIVENALG[] = {(byte) 0xB0, (byte) 0x71, (byte) 0x00, (byte) 0x00, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00};
private static final short TESTECSUPPORT_ALG_OFFSET = 5;
private static final short TESTECSUPPORT_KEYLENGTH_OFFSET = 6;
private static final byte TESTECSUPPORTALL_LASTUSEDPARAMS[] = {(byte) 0xB0, (byte) 0x40, (byte) 0x00, (byte) 0x00, (byte) 0x00};
private static final byte TESTECSUPPORTALL_FP_KEYGEN_INVALIDCURVEB[] = {(byte) 0xB0, (byte) 0x70, (byte) 0x00, (byte) 0x00, (byte) 0x05, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00};
private static final short INVALIDCURVEB_NUMREPEATS_OFFSET = 5;
private static final short INVALIDCURVEB_CORRUPTIONTYPE_OFFSET = 7;
private static final short INVALIDCURVEB_REWINDONSUCCESS_OFFSET = 9;
private static final byte TESTECSUPPORT_GENERATEECCKEY[] = {(byte) 0xB0, (byte) 0x5a, (byte) 0x00, (byte) 0x00, (byte) 0x04, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00};
private static final short GENERATEECKEY_ALG_OFFSET = 5;
private static final short GENERATEECKEY_KEYLENGTH_OFFSET = 6;
private static final short GENERATEECKEY_ANOMALOUS_OFFSET = 8;
public void run(String[] args) {
try {
//parse cmd args
CommandLine cli = parseArgs(args);
//byte[] installData = new byte[10];
//byte[] AID = {(byte) 0x4C, (byte) 0x61, (byte) 0x62, (byte) 0x61, (byte) 0x6B, (byte) 0x41, (byte) 0x70, (byte) 0x70, (byte) 0x6C, (byte) 0x65, (byte) 0x74};
//cardManager.prepareLocalSimulatorApplet(AID, installData, SimpleECCApplet.class);
//do stuff
if (cli.hasOption("help")) {
HelpFormatter help = new HelpFormatter();
help.printHelp("SimpleAPDU", cliHeader, opts, cliFooter);
} else {
//open log(only when actually doing something)
String logFileName = cli.getOptionValue("output-file", String.format("ECTESTER_log_%d.log", System.currentTimeMillis()));
FileOutputStream stdoutStream = new FileOutputStream(logFileName);
systemOutLogger = new DirtyLogger(stdoutStream, true);
boolean fp = cli.hasOption("fp");
boolean f2m = cli.hasOption("f2m");
if (!fp && !f2m) {
fp = true;
f2m = true;
}
int genAmount = Integer.parseInt(cli.getOptionValue("generate", "0"));
int keyLength = Integer.parseInt(cli.getOptionValue("b", "192"));
if (cli.hasOption("generate")) {
//generate EC keys
if (fp) {
generateECKeys(genAmount, KeyPair.ALG_EC_FP, (short) keyLength, cli.hasOption("anomalous"));
}
if (f2m) {
generateECKeys(genAmount, KeyPair.ALG_EC_F2M, (short) keyLength, cli.hasOption("anomalous"));
}
} else if (cli.hasOption("test")) {
if (cli.hasOption("bit-length")) {
//test only one bitsize
if (fp) {
testSupportECFp((short) keyLength);
}
if (f2m) {
testSupportECFp((short) keyLength);
}
} else {
//test default bit sizes
testSupportECAll(fp, f2m);
testFPkeyGen((short) 10, EC_Consts.CORRUPTION_ONEBYTERANDOM, true);
}
} else {
systemOutLogger.println("You need to specify one of -t / -g [num] commands.");
}
//close log
systemOutLogger.close();
}
//disconnect
cardManager.DisconnectFromCard();
} catch (Exception ex) {
if (systemOutLogger != null) {
systemOutLogger.println("Exception : " + ex);
}
}
}
private CommandLine parseArgs(String[] args) throws ParseException {
opts.addOption("h", "help", false, "show this help");
opts.addOption(Option.builder("g")
.longOpt("generate")
.hasArg()
.optionalArg(true)
.argName("num")
.desc("generate EC keys").build());
opts.addOption("t", "test", false, "test EC support (default)");
opts.addOption(Option.builder("b")
.longOpt("bit-length")
.hasArg()
.argName("bits")
.desc("set EC bit size").build());
opts.addOption("f2m", "use EC over binary-fields");
opts.addOption("fp", "user EC over prime-fields (default)");
opts.addOption("s", "anomalous", false, "generate anomalous (non-prime order, small pubkey order) curves");
opts.addOption(Option.builder("o")
.longOpt("output-file")
.hasArg()
.argName("file")
.desc("output file to log to").build());
return cliParser.parse(opts, args);
}
static short getShort(byte[] array, int offset) {
return (short) (((array[offset] & 0xFF) << 8) | (array[offset + 1] & 0xFF));
}
static void setShort(byte[] array, int offset, short value) {
array[offset + 1] = (byte) (value & 0xFF);
array[offset] = (byte) ((value >> 8) & 0xFF);
}
private boolean ReconnnectToCard() throws Exception {
if (cardManager.isConnected()) {
cardManager.DisconnectFromCard();
}
boolean result = cardManager.ConnectToCard();
if (result) {
// Select our application on card
cardManager.sendAPDU(SELECT_ECTESTERAPPLET);
}
return result;
}
private void testFPkeyGen(short numRepeats, short corruptionType, boolean bRewind) throws Exception {
byte[] apdu = Arrays.copyOf(TESTECSUPPORTALL_FP_KEYGEN_INVALIDCURVEB, TESTECSUPPORTALL_FP_KEYGEN_INVALIDCURVEB.length);
setShort(apdu, INVALIDCURVEB_NUMREPEATS_OFFSET, numRepeats);
setShort(apdu, INVALIDCURVEB_CORRUPTIONTYPE_OFFSET, corruptionType);
apdu[INVALIDCURVEB_REWINDONSUCCESS_OFFSET] = bRewind ? (byte) 1 : (byte) 0;
ReconnnectToCard();
ResponseAPDU resp_fp_keygen = cardManager.sendAPDU(apdu);
ResponseAPDU resp_keygen_params = cardManager.sendAPDU(TESTECSUPPORTALL_LASTUSEDPARAMS);
PrintECKeyGenInvalidCurveB(resp_fp_keygen);
PrintECKeyGenInvalidCurveB_lastUserParams(resp_keygen_params);
}
private void testSupportECGivenAlg(short keyLength, byte keyClass) throws Exception {
byte[] apdu = Arrays.copyOf(TESTECSUPPORT_GIVENALG, TESTECSUPPORT_GIVENALG.length);
apdu[TESTECSUPPORT_ALG_OFFSET] = keyClass;
setShort(apdu, TESTECSUPPORT_KEYLENGTH_OFFSET, keyLength);
ReconnnectToCard();
ResponseAPDU resp = cardManager.sendAPDU(apdu);
//byte[] resp = cardManager.sendAPDUSimulator(apdu);
PrintECSupport(resp);
}
private void testSupportECFp(short keyLength) throws Exception {
testSupportECGivenAlg(keyLength, KeyPair.ALG_EC_FP);
}
private void testSupportECF2m(short keyLength) throws Exception {
testSupportECGivenAlg(keyLength, KeyPair.ALG_EC_F2M);
}
private void testSupportECAll(boolean testFp, boolean testF2m) throws Exception {
if (testFp) {
testSupportECFp((short) 128);
testSupportECFp((short) 192);
testSupportECFp((short) 224);
testSupportECFp((short) 256);
testSupportECFp((short) 384);
testSupportECFp((short) 521);
}
if (testF2m) {
testSupportECF2m((short) 113);
testSupportECF2m((short) 131);
testSupportECF2m((short) 163);
testSupportECF2m((short) 193);
}
}
private void generateECKeys(int amount, byte keyClass, short keyLength, boolean anomalous) throws Exception {
if (cardManager.ConnectToCardSelect()) {
cardManager.sendAPDU(SELECT_ECTESTERAPPLET);
String keyFileName = String.format("ECKEYS_%s_%d.log", keyClass == KeyPair.ALG_EC_FP ? "fp" : "f2m", System.currentTimeMillis());
FileOutputStream keysFile = new FileOutputStream(keyFileName);
String message = "index;time;pubW;privS\n";
keysFile.write(message.getBytes());
byte[] gatherKeyAPDU = Arrays.copyOf(TESTECSUPPORT_GENERATEECCKEY, TESTECSUPPORT_GENERATEECCKEY.length);
// Prepare keypair object
gatherKeyAPDU[ISO7816.OFFSET_P1] = SimpleECCApplet.P1_SETCURVE;
gatherKeyAPDU[GENERATEECKEY_ALG_OFFSET] = keyClass;
setShort(gatherKeyAPDU, GENERATEECKEY_KEYLENGTH_OFFSET, keyLength);
gatherKeyAPDU[GENERATEECKEY_ANOMALOUS_OFFSET] = anomalous ? (byte) 1 : (byte) 0;
ResponseAPDU respGather = cardManager.sendAPDU(gatherKeyAPDU);
if (respGather.getSW() != ISO7816.SW_NO_ERROR) {
systemOutLogger.println(String.format("Card error: %x", respGather.getSW()));
keysFile.close();
return;
}
// Generate new keypair
gatherKeyAPDU[ISO7816.OFFSET_P1] = SimpleECCApplet.P1_GENERATEKEYPAIR;
int counter = 0;
while (true) {
counter++;
long elapsed = -System.nanoTime();
respGather = cardManager.sendAPDU(gatherKeyAPDU);
elapsed += System.nanoTime();
if (respGather.getSW() != ISO7816.SW_NO_ERROR) {
systemOutLogger.println(String.format("Card error: %x", respGather.getSW()));
break;
}
byte[] data = respGather.getData();
int offset = 0;
String pubKeyW = "";
String privKeyS = "";
if (data[offset] == EC_Consts.TAG_ECPUBKEY) {
offset++;
short len = getShort(data, offset);
offset += 2;
pubKeyW = CardMngr.bytesToHex(data, offset, len, false);
offset += len;
}
if (data[offset] == EC_Consts.TAG_ECPRIVKEY) {
offset++;
short len = getShort(data, offset);
offset += 2;
privKeyS = CardMngr.bytesToHex(data, offset, len, false);
offset += len;
}
message = String.format("%d;%d;%s;%s\n", counter, elapsed / 1000000, pubKeyW, privKeyS);
keysFile.write(message.getBytes());
this.systemOutLogger.flush();
keysFile.flush();
//stop when we have enough keys, go on forever with 0
if (counter >= amount && amount != 0)
break;
}
keysFile.close();
}
}
static String getPrintError(short code) {
if (code == ISO7816.SW_NO_ERROR) {
return "OK\t(0x9000)";
} else {
String codeStr = "unknown";
if (code == CryptoException.ILLEGAL_VALUE) {
codeStr = "ILLEGAL_VALUE";
}
if (code == CryptoException.UNINITIALIZED_KEY) {
codeStr = "UNINITIALIZED_KEY";
}
if (code == CryptoException.NO_SUCH_ALGORITHM) {
codeStr = "NO_SUCH_ALG";
}
if (code == CryptoException.INVALID_INIT) {
codeStr = "INVALID_INIT";
}
if (code == CryptoException.ILLEGAL_USE) {
codeStr = "ILLEGAL_USE";
}
if (code == SimpleECCApplet.SW_SKIPPED) {
codeStr = "skipped";
}
if (code == SimpleECCApplet.SW_KEYPAIR_GENERATED_INVALID) {
codeStr = "SW_KEYPAIR_GENERATED_INVALID";
}
if (code == SimpleECCApplet.SW_INVALID_CORRUPTION_TYPE) {
codeStr = "SW_INVALID_CORRUPTION_TYPE";
}
if (code == SimpleECCApplet.SW_SIG_VERIFY_FAIL) {
codeStr = "SW_SIG_VERIFY_FAIL";
}
return String.format("fail\t(%s,\t0x%4x)", codeStr, code);
}
}
enum ExpResult {
SHOULD_SUCCEED,
MAY_FAIL,
MUST_FAIL
}
private int VerifyPrintResult(String message, byte expectedTag, byte[] buffer, int bufferOffset, ExpResult expRes) {
if (bufferOffset >= buffer.length) {
systemOutLogger.println(" No more data returned");
} else {
if (buffer[bufferOffset] != expectedTag) {
systemOutLogger.println(" ERROR: mismatched tag");
assert (buffer[bufferOffset] == expectedTag);
}
bufferOffset++;
short resCode = getShort(buffer, bufferOffset);
bufferOffset += 2;
boolean bHiglight = false;
if ((expRes == ExpResult.MUST_FAIL) && (resCode == ISO7816.SW_NO_ERROR)) {
bHiglight = true;
}
if ((expRes == ExpResult.SHOULD_SUCCEED) && (resCode != ISO7816.SW_NO_ERROR)) {
bHiglight = true;
}
if (bHiglight) {
systemOutLogger.println(String.format("!! %-53s%s", message, getPrintError(resCode)));
} else {
systemOutLogger.println(String.format(" %-53s%s", message, getPrintError(resCode)));
}
}
return bufferOffset;
}
private void PrintECSupport(ResponseAPDU resp) {
PrintECSupport(resp.getData());
}
private void PrintECSupport(byte[] buffer) {
systemOutLogger.println();
systemOutLogger.println("### Test for support and with valid and invalid EC curves");
int bufferOffset = 0;
while (bufferOffset < buffer.length) {
assert (buffer[bufferOffset] == SimpleECCApplet.ECTEST_SEPARATOR);
bufferOffset++;
String ecType = "unknown";
if (buffer[bufferOffset] == KeyPair.ALG_EC_FP) {
ecType = "ALG_EC_FP";
}
if (buffer[bufferOffset] == KeyPair.ALG_EC_F2M) {
ecType = "ALG_EC_F2M";
}
systemOutLogger.println(String.format("%-56s%s", "EC type:", ecType));
bufferOffset++;
short keyLen = getShort(buffer, bufferOffset);
systemOutLogger.println(String.format("%-56s%d bits", "EC key length (bits):", keyLen));
bufferOffset += 2;
bufferOffset = VerifyPrintResult("KeyPair object allocation:", SimpleECCApplet.ECTEST_ALLOCATE_KEYPAIR, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("Generate key with def curve (fails if no def):", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_DEFCURVE, buffer, bufferOffset, ExpResult.MAY_FAIL);
bufferOffset = VerifyPrintResult("Set valid custom curve:", SimpleECCApplet.ECTEST_SET_VALIDCURVE, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("Generate key with valid curve:", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_CUSTOMCURVE, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("ECDH agreement with valid point:", SimpleECCApplet.ECTEST_ECDH_AGREEMENT_VALID_POINT, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("ECDH agreement with invalid point (fail is good):", SimpleECCApplet.ECTEST_ECDH_AGREEMENT_INVALID_POINT, buffer, bufferOffset, ExpResult.MUST_FAIL);
bufferOffset = VerifyPrintResult("ECDSA signature on random data:", SimpleECCApplet.ECTEST_ECDSA_SIGNATURE, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("Set anomalous custom curve (may fail):", SimpleECCApplet.ECTEST_SET_ANOMALOUSCURVE, buffer, bufferOffset, ExpResult.MAY_FAIL);
bufferOffset = VerifyPrintResult("Generate key with anomalous curve (may fail):", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_ANOMALOUSCURVE, buffer, bufferOffset, ExpResult.MAY_FAIL);
bufferOffset = VerifyPrintResult("ECDH agreement with small order point (fail is good):", SimpleECCApplet.ECTEST_ECDH_AGREEMENT_SMALL_DEGREE_POINT, buffer, bufferOffset, ExpResult.MUST_FAIL);
bufferOffset = VerifyPrintResult("Set invalid custom curve (may fail):", SimpleECCApplet.ECTEST_SET_INVALIDCURVE, buffer, bufferOffset, ExpResult.MAY_FAIL);
bufferOffset = VerifyPrintResult("Generate key with invalid curve (fail is good):", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_INVALIDCUSTOMCURVE, buffer, bufferOffset, ExpResult.MUST_FAIL);
bufferOffset = VerifyPrintResult("Set invalid field (may fail):", SimpleECCApplet.ECTEST_SET_INVALIDFIELD, buffer, bufferOffset, ExpResult.MAY_FAIL);
bufferOffset = VerifyPrintResult("Generate key with invalid field (fail si good):", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_INVALIDFIELD, buffer, bufferOffset, ExpResult.MUST_FAIL);
systemOutLogger.println();
}
}
private void PrintECKeyGenInvalidCurveB(ResponseAPDU resp) {
PrintECKeyGenInvalidCurveB(resp.getData());
}
private void PrintECKeyGenInvalidCurveB(byte[] buffer) {
systemOutLogger.println();
systemOutLogger.println("### Test for computation with invalid parameter B for EC curve");
int bufferOffset = 0;
while (bufferOffset < buffer.length) {
assert (buffer[bufferOffset] == SimpleECCApplet.ECTEST_SEPARATOR);
bufferOffset++;
String ecType = "unknown";
if (buffer[bufferOffset] == KeyPair.ALG_EC_FP) {
ecType = "ALG_EC_FP";
}
if (buffer[bufferOffset] == KeyPair.ALG_EC_F2M) {
ecType = "ALG_EC_F2M";
}
systemOutLogger.println(String.format("%-53s%s", "EC type:", ecType));
bufferOffset++;
short keyLen = getShort(buffer, bufferOffset);
systemOutLogger.println(String.format("%-53s%d bits", "EC key length (bits):", keyLen));
bufferOffset += 2;
short numRepeats = getShort(buffer, bufferOffset);
bufferOffset += 2;
systemOutLogger.println(String.format("%-53s%d times", "Executed repeats before unexpected error: ", numRepeats));
bufferOffset = VerifyPrintResult("KeyPair object allocation:", SimpleECCApplet.ECTEST_ALLOCATE_KEYPAIR, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
while (bufferOffset < buffer.length) {
bufferOffset = VerifyPrintResult("Set invalid custom curve:", SimpleECCApplet.ECTEST_SET_INVALIDCURVE, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("Generate key with invalid curve (fail is good):", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_INVALIDCUSTOMCURVE, buffer, bufferOffset, ExpResult.MUST_FAIL);
if (buffer[bufferOffset] == SimpleECCApplet.ECTEST_DH_GENERATESECRET) {
bufferOffset = VerifyPrintResult("ECDH agreement with invalid point (fail is good):", SimpleECCApplet.ECTEST_DH_GENERATESECRET, buffer, bufferOffset, ExpResult.MUST_FAIL);
}
bufferOffset = VerifyPrintResult("Set valid custom curve:", SimpleECCApplet.ECTEST_SET_VALIDCURVE, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
bufferOffset = VerifyPrintResult("Generate key with valid curve:", SimpleECCApplet.ECTEST_GENERATE_KEYPAIR_CUSTOMCURVE, buffer, bufferOffset, ExpResult.SHOULD_SUCCEED);
}
systemOutLogger.println();
}
}
private void PrintECKeyGenInvalidCurveB_lastUserParams(ResponseAPDU resp) {
byte[] buffer = resp.getData();
short offset = 0;
systemOutLogger.print("Last used value of B: ");
while (offset < buffer.length) {
systemOutLogger.print(String.format("%x ", buffer[offset]));
offset++;
}
}
public static void main(String[] args) throws FileNotFoundException, IOException {
SimpleAPDU app = new SimpleAPDU();
app.run(args);
}
}
|