Commit 8cfdaad1 authored by Josh Ji's avatar Josh Ji

correct the arrayCopying of hmac in getHMAC(), rename aesRawKey as hashedSharedSecret

parent 2a5c69e0
// converted by version [v3.0.5] // converted by version [v3.0.5]
// on Tue Jun 14 11:42:39 CST 2022 // on Sat Jun 18 22:52:05 CST 2022
.package com/josh/vku2f { .package com/josh/vku2f {
.aid 0xA0:0x0:0x0:0x6:0x47; .aid 0xA0:0x0:0x0:0x6:0x47;
...@@ -173,77 +173,77 @@ ...@@ -173,77 +173,77 @@
// 76 // 76
instanceFieldRef byte[] IDSecret/RxRp; instanceFieldRef byte[] IDSecret/RxRp;
// 77 // 77
instanceFieldRef byte[] IDSecret/aesRawKey; instanceFieldRef byte[] IDSecret/hashedSharedSecret;
// 78 // 78
instanceFieldRef byte[] IDSecret/Cx; instanceFieldRef byte[] IDSecret/Cx;
// 79 // 79
instanceFieldRef byte[] IDSecret/IV_ZERO_AES; instanceFieldRef byte[] IDSecret/hashedIDxAndCx;
// 80 // 80
instanceFieldRef short IDSecret/SCRATCH_LENGTH; instanceFieldRef byte[] IDSecret/IV_ZERO_AES;
// 81 // 81
instanceFieldRef byte IDSecret/i; instanceFieldRef short IDSecret/SCRATCH_LENGTH;
// 82 // 82
instanceFieldRef 1.20 IDSecret/aesKey; instanceFieldRef byte IDSecret/i;
// 83 // 83
instanceFieldRef 4.1 IDSecret/aesEncrypt; instanceFieldRef 1.20 IDSecret/aesKey;
// 84 // 84
instanceFieldRef 4.1 IDSecret/aesDecrypt; instanceFieldRef 4.1 IDSecret/aesEncrypt;
// 85 // 85
instanceFieldRef 1.11 IDSecret/sha256; instanceFieldRef 4.1 IDSecret/aesDecrypt;
// 86 // 86
instanceFieldRef byte[] IDSecret/scratch; instanceFieldRef 1.11 IDSecret/sha256;
// 87 // 87
instanceFieldRef 1.16 PinUvAuthProtocolOne/ecDhKeyPair; instanceFieldRef byte[] IDSecret/scratch;
// 88 // 88
instanceFieldRef boolean[] PinUvAuthProtocolOne/ecDhSet; instanceFieldRef 1.16 PinUvAuthProtocolOne/ecDhKeyPair;
// 89 // 89
instanceFieldRef byte PinUvAuthToken/permissionsRPID; instanceFieldRef boolean[] PinUvAuthProtocolOne/ecDhSet;
// 90 // 90
instanceFieldRef byte PinUvAuthToken/permissionsSet; instanceFieldRef byte PinUvAuthToken/permissionsRPID;
// 91 // 91
instanceFieldRef byte PinUvAuthToken/usageTimer; instanceFieldRef byte PinUvAuthToken/permissionsSet;
// 92 // 92
instanceFieldRef boolean PinUvAuthToken/inUseFlag; instanceFieldRef byte PinUvAuthToken/usageTimer;
// 93 // 93
instanceFieldRef byte PinUvAuthToken/initialUsageTimeLimit; instanceFieldRef boolean PinUvAuthToken/inUseFlag;
// 94 // 94
instanceFieldRef byte PinUvAuthToken/userPresentTimeLimit; instanceFieldRef byte PinUvAuthToken/initialUsageTimeLimit;
// 95 // 95
instanceFieldRef byte PinUvAuthToken/maxUsageTimePeriod; instanceFieldRef byte PinUvAuthToken/userPresentTimeLimit;
// 96 // 96
instanceFieldRef boolean PinUvAuthToken/userVerifiedFlag; instanceFieldRef byte PinUvAuthToken/maxUsageTimePeriod;
// 97 // 97
instanceFieldRef boolean PinUvAuthToken/userPresentFlag; instanceFieldRef boolean PinUvAuthToken/userVerifiedFlag;
// 98 // 98
instanceFieldRef byte[] PublicKeyCredentialDescriptor/type; instanceFieldRef boolean PinUvAuthToken/userPresentFlag;
// 99 // 99
instanceFieldRef DomString PublicKeyCredentialEntity/name; instanceFieldRef byte[] PublicKeyCredentialDescriptor/type;
// 100 // 100
instanceFieldRef short[] PublicKeyCredentialParams/paramList; instanceFieldRef DomString PublicKeyCredentialEntity/name;
// 101 // 101
instanceFieldRef short PublicKeyCredentialParams/listIndex; instanceFieldRef short[] PublicKeyCredentialParams/paramList;
// 102 // 102
instanceFieldRef DomString PublicKeyCredentialRpEntity/rpId; instanceFieldRef short PublicKeyCredentialParams/listIndex;
// 103 // 103
instanceFieldRef boolean[] PublicKeyCredentialUserEntity/dataPresent; instanceFieldRef DomString PublicKeyCredentialRpEntity/rpId;
// 104 // 104
instanceFieldRef byte[] StoredCredential/signingCounter; instanceFieldRef boolean[] PublicKeyCredentialUserEntity/dataPresent;
// 105 // 105
instanceFieldRef boolean StoredCredential/initialised; instanceFieldRef byte[] StoredCredential/signingCounter;
// 106 // 106
instanceFieldRef boolean StoredCredential/hmacEnabled; instanceFieldRef boolean StoredCredential/initialised;
// 107 // 107
instanceFieldRef byte[] StoredCredential/credRandom; instanceFieldRef boolean StoredCredential/hmacEnabled;
// 108 // 108
instanceFieldRef 1.16 StoredCredential/keyPair; instanceFieldRef byte[] StoredCredential/credRandom;
// 109 // 109
instanceFieldRef 1.15 StoredES256Credential/sig; instanceFieldRef 1.16 StoredCredential/keyPair;
// 110 // 110
instanceFieldRef 1.15 StoredPS256Credential/kpSignature; instanceFieldRef 1.15 StoredES256Credential/sig;
// 111 // 111
instanceFieldRef 4.1 StoredRS256Credential/kpSignature; instanceFieldRef 1.15 StoredPS256Credential/kpSignature;
// 112 // 112
staticMethodRef 2.8.13(SB)[B; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B instanceFieldRef 4.1 StoredRS256Credential/kpSignature;
// 113 // 113
.classRef CBOREncoder; .classRef CBOREncoder;
// 114 // 114
...@@ -709,29 +709,29 @@ ...@@ -709,29 +709,29 @@
// 310 // 310
virtualMethodRef CBORBase/getCurrentOffset()S; virtualMethodRef CBORBase/getCurrentOffset()S;
// 311 // 311
staticFieldRef byte[] Utf8Strings/UTF8_NULL; virtualMethodRef CBORDecoder/readRawByte()B;
// 312 // 312
staticFieldRef byte[] Utf8Strings/UTF8_NULL;
// 313
staticMethodRef Random/getInstance()Ljavacard/security/RandomData;; staticMethodRef Random/getInstance()Ljavacard/security/RandomData;;
.descriptor Ljavacard/security/RandomData; 1.14; .descriptor Ljavacard/security/RandomData; 1.14;
// 313
virtualMethodRef 1.14.3([BSS)S; // nextBytes([BSS)S
// 314 // 314
staticMethodRef 2.16.7([BSSB)S; // javacard/framework/Util.arrayFill([BSSB)S virtualMethodRef 1.14.3([BSS)S; // nextBytes([BSS)S
// 315 // 315
staticMethodRef 2.16.7([BSSB)S; // javacard/framework/Util.arrayFill([BSSB)S
// 316
staticMethodRef 1.13.0(BSZ)Ljavacard/security/Key;; // javacard/security/KeyBuilder.buildKey(BSZ)Ljavacard/security/Key; staticMethodRef 1.13.0(BSZ)Ljavacard/security/Key;; // javacard/security/KeyBuilder.buildKey(BSZ)Ljavacard/security/Key;
.descriptor Ljavacard/security/Key; 1.0; .descriptor Ljavacard/security/Key; 1.0;
// 316
.classRef 1.20; // javacard/security/AESKey
// 317 // 317
virtualMethodRef CBORDecoder/readRawByte()B; .classRef 1.20; // javacard/security/AESKey
// 318 // 318
virtualMethodRef CBORBase/getBuffer()[B;
// 319
staticMethodRef 4.1.0(BZ)Ljavacardx/crypto/Cipher;; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher; staticMethodRef 4.1.0(BZ)Ljavacardx/crypto/Cipher;; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher;
.descriptor Ljavacardx/crypto/Cipher; 4.1; .descriptor Ljavacardx/crypto/Cipher; 4.1;
// 319
virtualMethodRef CBORBase/getBuffer()[B;
// 320 // 320
virtualMethodRef CBORBase/getCurrentOffsetAndIncrease(S)S; virtualMethodRef CBORBase/getCurrentOffsetAndIncrease(S)S;
// 321 // 321
...@@ -739,42 +739,42 @@ ...@@ -739,42 +739,42 @@
// 322 // 322
staticMethodRef 2.16.2([BS[BSS)S; // javacard/framework/Util.arrayCopyNonAtomic([BS[BSS)S staticMethodRef 2.16.2([BS[BSS)S; // javacard/framework/Util.arrayCopyNonAtomic([BS[BSS)S
// 323 // 323
virtualMethodRef CBORDecoder/readInt16()S;
// 324
virtualMethodRef 4.1.4(Ljavacard/security/Key;B[BSS)V; // init(Ljavacard/security/Key;B[BSS)V virtualMethodRef 4.1.4(Ljavacard/security/Key;B[BSS)V; // init(Ljavacard/security/Key;B[BSS)V
.descriptor Ljavacard/security/Key; 1.0; .descriptor Ljavacard/security/Key; 1.0;
// 324
virtualMethodRef 4.1.1([BSS[BS)S; // doFinal([BSS[BS)S
// 325 // 325
virtualMethodRef 1.11.5([BSS)V; // update([BSS)V virtualMethodRef 4.1.1([BSS[BS)S; // doFinal([BSS[BS)S
// 326 // 326
virtualMethodRef 4.1.5([BSS[BS)S; // update([BSS[BS)S virtualMethodRef 1.11.5([BSS)V; // update([BSS)V
// 327 // 327
virtualMethodRef IDSecret/getRxRp()[B; virtualMethodRef 4.1.5([BSS[BS)S; // update([BSS[BS)S
// 328 // 328
staticFieldRef byte[] KeyParams/secp256r1p; virtualMethodRef IDSecret/getRxRp()[B;
// 329 // 329
staticFieldRef byte[] KeyParams/secp256r1A; staticFieldRef byte[] KeyParams/secp256r1p;
// 330 // 330
staticFieldRef byte[] KeyParams/secp256r1B; staticFieldRef byte[] KeyParams/secp256r1A;
// 331 // 331
staticFieldRef byte[] KeyParams/secp256r1G; staticFieldRef byte[] KeyParams/secp256r1B;
// 332 // 332
staticFieldRef byte[] KeyParams/secp256r1R; staticFieldRef byte[] KeyParams/secp256r1G;
// 333 // 333
staticMethodRef PinUvAuthProtocol/<init>()V; staticFieldRef byte[] KeyParams/secp256r1R;
// 334 // 334
staticMethodRef PinUvAuthProtocol/<init>()V;
// 335
staticMethodRef 1.16.1(Ljavacard/security/PublicKey;Ljavacard/security/PrivateKey;)V; // javacard/security/KeyPair.<init>(Ljavacard/security/PublicKey;Ljavacard/security/PrivateKey;)V staticMethodRef 1.16.1(Ljavacard/security/PublicKey;Ljavacard/security/PrivateKey;)V; // javacard/security/KeyPair.<init>(Ljavacard/security/PublicKey;Ljavacard/security/PrivateKey;)V
.descriptor Ljavacard/security/PublicKey; 1.3; .descriptor Ljavacard/security/PublicKey; 1.3;
.descriptor Ljavacard/security/PrivateKey; 1.2; .descriptor Ljavacard/security/PrivateKey; 1.2;
// 335
virtualMethodRef CBORDecoder/readInt16()S;
// 336 // 336
virtualMethodRef CBORDecoder/readRawByteArray([BSS)S; virtualMethodRef CBORDecoder/readRawByteArray([BSS)S;
// 337 // 337
virtualMethodRef PinUvAuthToken/resetTokenState()V;
// 338
virtualMethodRef CBORBase/getBufferLength()S; virtualMethodRef CBORBase/getBufferLength()S;
// 338
virtualMethodRef PinUvAuthToken/resetTokenState()V;
// 339 // 339
staticMethodRef ICUtil/isLessThanAsUnsignedShort(SS)Z; staticMethodRef ICUtil/isLessThanAsUnsignedShort(SS)Z;
// 340 // 340
...@@ -800,27 +800,27 @@ ...@@ -800,27 +800,27 @@
// 350 // 350
virtualMethodRef CBORBase/getCurrentOffsetAndIncrease(S)S; virtualMethodRef CBORBase/getCurrentOffsetAndIncrease(S)S;
// 351 // 351
staticMethodRef PublicKeyCredentialEntity/<init>()V;
// 352
staticMethodRef CBOREncoder/writeRawByteArray([BSS)S; staticMethodRef CBOREncoder/writeRawByteArray([BSS)S;
// 352
staticMethodRef PublicKeyCredentialEntity/<init>()V;
// 353 // 353
virtualMethodRef DomString/checkEquals(Lcom/josh/vku2f/DomString;)Z;
// 354
staticMethodRef 2.16.1([BS[BSS)S; // javacard/framework/Util.arrayCopy([BS[BSS)S staticMethodRef 2.16.1([BS[BSS)S; // javacard/framework/Util.arrayCopy([BS[BSS)S
// 354
virtualMethodRef DomString/checkEquals(Lcom/josh/vku2f/DomString;)Z;
// 355 // 355
.classRef 0.5; // java/lang/ArrayIndexOutOfBoundsException staticMethodRef 2.3.0()V; // javacard/framework/Applet.<init>()V
// 356 // 356
staticFieldRef 1.14 Random/rng; .classRef 0.5; // java/lang/ArrayIndexOutOfBoundsException
// 357 // 357
staticFieldRef 1.14 Random/rng;
// 358
staticMethodRef 1.14.0(B)Ljavacard/security/RandomData;; // javacard/security/RandomData.getInstance(B)Ljavacard/security/RandomData; staticMethodRef 1.14.0(B)Ljavacard/security/RandomData;; // javacard/security/RandomData.getInstance(B)Ljavacard/security/RandomData;
.descriptor Ljavacard/security/RandomData; 1.14; .descriptor Ljavacard/security/RandomData; 1.14;
// 358
staticFieldRef 1.14 StoredCredential/randomData;
// 359 // 359
virtualMethodRef 1.14.1([BSS)V; // generateData([BSS)V staticFieldRef 1.14 StoredCredential/randomData;
// 360 // 360
staticMethodRef 2.3.0()V; // javacard/framework/Applet.<init>()V virtualMethodRef 1.14.1([BSS)V; // generateData([BSS)V
// 361 // 361
.classRef 1.19; // javacard/security/ECPublicKey .classRef 1.19; // javacard/security/ECPublicKey
// 362 // 362
...@@ -828,42 +828,44 @@ ...@@ -828,42 +828,44 @@
// 363 // 363
staticMethodRef 2.8.15(SB)[S; // javacard/framework/JCSystem.makeTransientShortArray(SB)[S staticMethodRef 2.8.15(SB)[S; // javacard/framework/JCSystem.makeTransientShortArray(SB)[S
// 364 // 364
staticMethodRef 2.16.3([BSSB)S; // javacard/framework/Util.arrayFillNonAtomic([BSSB)S
// 365
staticMethodRef StoredCredential/<init>()V;
// 366
virtualMethodRef 1.16.3()Ljavacard/security/PublicKey;; // getPublic()Ljavacard/security/PublicKey; virtualMethodRef 1.16.3()Ljavacard/security/PublicKey;; // getPublic()Ljavacard/security/PublicKey;
.descriptor Ljavacard/security/PublicKey; 1.3; .descriptor Ljavacard/security/PublicKey; 1.3;
// 365
staticMethodRef 2.16.3([BSSB)S; // javacard/framework/Util.arrayFillNonAtomic([BSSB)S
// 366
staticMethodRef StoredCredential/<init>()V;
// 367 // 367
virtualMethodRef AuthenticatorMakeCredential/getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity;; virtualMethodRef CBORDecoder/readMajorType(B)S;
// 368 // 368
virtualMethodRef AuthenticatorMakeCredential/getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity;; virtualMethodRef AuthenticatorMakeCredential/getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity;;
// 369 // 369
virtualMethodRef CBORDecoder/readMajorType(B)S; virtualMethodRef AuthenticatorMakeCredential/getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity;;
// 370 // 370
virtualMethodRef StoredCredential/incrementCounter()V; .classRef CBORDecoder;
// 371 // 371
virtualMethodRef StoredCredential/doAttestationCommon([BS)V; virtualMethodRef StoredCredential/incrementCounter()V;
// 372 // 372
.classRef CBORDecoder; virtualMethodRef StoredCredential/doAttestationCommon([BS)V;
// 373 // 373
virtualMethodRef StoredCredential/incrementCounter()V; staticMethodRef CBORDecoder/<init>()V;
// 374 // 374
virtualMethodRef StoredCredential/doAttestationCommon([BS)V; virtualMethodRef StoredCredential/incrementCounter()V;
// 375 // 375
.classRef 1.9; // javacard/security/RSAPublicKey virtualMethodRef StoredCredential/doAttestationCommon([BS)V;
// 376 // 376
staticMethodRef CBORDecoder/<init>()V; .classRef 1.9; // javacard/security/RSAPublicKey
// 377 // 377
staticMethodRef 2.8.13(SB)[B; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
// 378
virtualMethodRef 4.1.3(Ljavacard/security/Key;B)V; // init(Ljavacard/security/Key;B)V virtualMethodRef 4.1.3(Ljavacard/security/Key;B)V; // init(Ljavacard/security/Key;B)V
.descriptor Ljavacard/security/Key; 1.0; .descriptor Ljavacard/security/Key; 1.0;
// 378
virtualMethodRef StoredCredential/incrementCounter()V;
// 379 // 379
virtualMethodRef StoredCredential/doAttestationCommon([BS)V; virtualMethodRef StoredCredential/incrementCounter()V;
// 380 // 380
virtualMethodRef StoredCredential/doAttestationCommon([BS)V;
// 381
virtualMethodRef CBOREncoder/encodeNegativeUInt16(S)S; virtualMethodRef CBOREncoder/encodeNegativeUInt16(S)S;
} }
...@@ -904,7 +906,7 @@ ...@@ -904,7 +906,7 @@
invokespecial 292; // javacard/security/KeyPair.<init>(BS)V invokespecial 292; // javacard/security/KeyPair.<init>(BS)V
putfield_a 0; // reference com/josh/vku2f/AttestationKeyPair.kp putfield_a 0; // reference com/josh/vku2f/AttestationKeyPair.kp
getfield_a_this 0; // reference com/josh/vku2f/AttestationKeyPair.kp getfield_a_this 0; // reference com/josh/vku2f/AttestationKeyPair.kp
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 120; // T_CLASSORINTERFACE javacard/security/ECKey checkcast 0 120; // T_CLASSORINTERFACE javacard/security/ECKey
invokestatic 124; // com/josh/vku2f/KeyParams.sec256r1params(Ljavacard/security/ECKey;)V invokestatic 124; // com/josh/vku2f/KeyParams.sec256r1params(Ljavacard/security/ECKey;)V
getfield_a_this 0; // reference com/josh/vku2f/AttestationKeyPair.kp getfield_a_this 0; // reference com/josh/vku2f/AttestationKeyPair.kp
...@@ -963,7 +965,7 @@ ...@@ -963,7 +965,7 @@
getfield_a_this 2; // reference com/josh/vku2f/AttestationKeyPair.x509cert getfield_a_this 2; // reference com/josh/vku2f/AttestationKeyPair.x509cert
sconst_0; sconst_0;
sload_3; sload_3;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
return; return;
} }
...@@ -978,7 +980,7 @@ ...@@ -978,7 +980,7 @@
sload_2; sload_2;
getfield_a_this 2; // reference com/josh/vku2f/AttestationKeyPair.x509cert getfield_a_this 2; // reference com/josh/vku2f/AttestationKeyPair.x509cert
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 2; // reference com/josh/vku2f/AttestationKeyPair.x509cert getfield_a_this 2; // reference com/josh/vku2f/AttestationKeyPair.x509cert
arraylength; arraylength;
...@@ -1002,7 +1004,7 @@ ...@@ -1002,7 +1004,7 @@
.locals 0; .locals 0;
L0: getfield_a_this 0; // reference com/josh/vku2f/AttestationKeyPair.kp L0: getfield_a_this 0; // reference com/josh/vku2f/AttestationKeyPair.kp
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 361; // T_CLASSORINTERFACE javacard/security/ECPublicKey checkcast 0 361; // T_CLASSORINTERFACE javacard/security/ECPublicKey
aload_1; aload_1;
sload_2; sload_2;
...@@ -1072,11 +1074,11 @@ ...@@ -1072,11 +1074,11 @@
sconst_0; sconst_0;
aload_1; aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sastore; sastore;
L5: bspush 64; L5: bspush 64;
sconst_1; sconst_1;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
astore_3; astore_3;
L6: goto L8; L6: goto L8;
L7: astore 4; L7: astore 4;
...@@ -1123,7 +1125,7 @@ ...@@ -1123,7 +1125,7 @@
aload_2; aload_2;
sconst_3; sconst_3;
saload; saload;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
goto_w L38; goto_w L38;
L12: aload_2; L12: aload_2;
...@@ -1146,14 +1148,14 @@ ...@@ -1146,14 +1148,14 @@
aload_2; aload_2;
sconst_3; sconst_3;
saload; saload;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
goto_w L38; goto_w L38;
L13: aload_2; L13: aload_2;
sconst_3; sconst_3;
aload_1; aload_1;
sconst_4; sconst_4;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sastore; sastore;
aload_0; aload_0;
aload_2; aload_2;
...@@ -1175,7 +1177,7 @@ ...@@ -1175,7 +1177,7 @@
sconst_3; sconst_3;
aload_1; aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sastore; sastore;
aload_2; aload_2;
sconst_3; sconst_3;
...@@ -1265,7 +1267,7 @@ ...@@ -1265,7 +1267,7 @@
sconst_3; sconst_3;
aload_1; aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sastore; sastore;
aload_2; aload_2;
sconst_4; sconst_4;
...@@ -1366,7 +1368,7 @@ ...@@ -1366,7 +1368,7 @@
sload_2; sload_2;
getfield_a_this 6; // reference com/josh/vku2f/AuthenticatorGetAssertion.clientDataHash getfield_a_this 6; // reference com/josh/vku2f/AuthenticatorGetAssertion.clientDataHash
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 6; // reference com/josh/vku2f/AuthenticatorGetAssertion.clientDataHash getfield_a_this 6; // reference com/josh/vku2f/AuthenticatorGetAssertion.clientDataHash
arraylength; arraylength;
...@@ -1435,7 +1437,7 @@ ...@@ -1435,7 +1437,7 @@
astore_2; astore_2;
L4: bspush 64; L4: bspush 64;
sconst_2; sconst_2;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
astore_3; astore_3;
L5: goto L7; L5: goto L7;
L6: astore 4; L6: astore 4;
...@@ -1444,7 +1446,7 @@ ...@@ -1444,7 +1446,7 @@
astore_3; astore_3;
L7: bspush 64; L7: bspush 64;
sconst_2; sconst_2;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
astore 4; astore 4;
L8: goto L10; L8: goto L10;
L9: astore 5; L9: astore 5;
...@@ -1453,7 +1455,7 @@ ...@@ -1453,7 +1455,7 @@
astore 4; astore 4;
L10: aload_1; L10: aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 5; sstore 5;
getfield_a_this 8; // reference com/josh/vku2f/AuthenticatorMakeCredential.options getfield_a_this 8; // reference com/josh/vku2f/AuthenticatorMakeCredential.options
sconst_0; sconst_0;
...@@ -1487,7 +1489,7 @@ ...@@ -1487,7 +1489,7 @@
getfield_a_this 9; // reference com/josh/vku2f/AuthenticatorMakeCredential.dataHash getfield_a_this 9; // reference com/josh/vku2f/AuthenticatorMakeCredential.dataHash
sconst_0; sconst_0;
sload 8; sload 8;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
goto_w L92; goto_w L92;
L14: aload_0; L14: aload_0;
...@@ -1497,7 +1499,7 @@ ...@@ -1497,7 +1499,7 @@
putfield_a 10; // reference com/josh/vku2f/AuthenticatorMakeCredential.rp putfield_a 10; // reference com/josh/vku2f/AuthenticatorMakeCredential.rp
aload_1; aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 8; sstore 8;
sload 8; sload 8;
sconst_2; sconst_2;
...@@ -1557,7 +1559,7 @@ ...@@ -1557,7 +1559,7 @@
putfield_a 11; // reference com/josh/vku2f/AuthenticatorMakeCredential.user putfield_a 11; // reference com/josh/vku2f/AuthenticatorMakeCredential.user
aload_1; aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 8; sstore 8;
sconst_0; sconst_0;
sstore 9; sstore 9;
...@@ -1646,7 +1648,7 @@ ...@@ -1646,7 +1648,7 @@
L36: goto_w L92; L36: goto_w L92;
L37: aload_1; L37: aload_1;
sconst_4; sconst_4;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 8; sstore 8;
aload_0; aload_0;
new 276; // com/josh/vku2f/PublicKeyCredentialParams new 276; // com/josh/vku2f/PublicKeyCredentialParams
...@@ -1661,7 +1663,7 @@ ...@@ -1661,7 +1663,7 @@
if_scmpge_w L60; if_scmpge_w L60;
L39: aload_1; L39: aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 10; sstore 10;
sload 10; sload 10;
sconst_2; sconst_2;
...@@ -1781,7 +1783,7 @@ ...@@ -1781,7 +1783,7 @@
L60: goto_w L92; L60: goto_w L92;
L61: aload_1; L61: aload_1;
sconst_4; sconst_4;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 8; sstore 8;
aload_0; aload_0;
sload 8; sload 8;
...@@ -1794,7 +1796,7 @@ ...@@ -1794,7 +1796,7 @@
if_scmpge L74; if_scmpge L74;
L63: aload_1; L63: aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 10; sstore 10;
sload 10; sload 10;
sconst_2; sconst_2;
...@@ -1863,7 +1865,7 @@ ...@@ -1863,7 +1865,7 @@
goto L92; goto L92;
L77: aload_1; L77: aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore 8; sstore 8;
sconst_0; sconst_0;
sstore 9; sstore 9;
...@@ -2010,7 +2012,7 @@ ...@@ -2010,7 +2012,7 @@
sload_2; sload_2;
getfield_a_this 9; // reference com/josh/vku2f/AuthenticatorMakeCredential.dataHash getfield_a_this 9; // reference com/josh/vku2f/AuthenticatorMakeCredential.dataHash
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 9; // reference com/josh/vku2f/AuthenticatorMakeCredential.dataHash getfield_a_this 9; // reference com/josh/vku2f/AuthenticatorMakeCredential.dataHash
arraylength; arraylength;
...@@ -2394,7 +2396,7 @@ ...@@ -2394,7 +2396,7 @@
.locals 1; .locals 1;
L0: aload_0; L0: aload_0;
invokevirtual 317; // readRawByte()B invokevirtual 311; // readRawByte()B
bspush 31; bspush 31;
sand; sand;
sstore_1; sstore_1;
...@@ -2407,7 +2409,7 @@ ...@@ -2407,7 +2409,7 @@
bspush 24; bspush 24;
if_scmpne L4; if_scmpne L4;
L3: aload_0; L3: aload_0;
invokevirtual 317; // readRawByte()B invokevirtual 311; // readRawByte()B
sspush 255; sspush 255;
sand; sand;
s2b; s2b;
...@@ -2423,7 +2425,7 @@ ...@@ -2423,7 +2425,7 @@
.locals 1; .locals 1;
L0: aload_0; L0: aload_0;
invokevirtual 317; // readRawByte()B invokevirtual 311; // readRawByte()B
bspush 31; bspush 31;
sand; sand;
sstore_1; sstore_1;
...@@ -2431,7 +2433,7 @@ ...@@ -2431,7 +2433,7 @@
bspush 25; bspush 25;
if_scmpne L2; if_scmpne L2;
L1: aload_0; L1: aload_0;
invokevirtual 319; // getBuffer()[B invokevirtual 318; // getBuffer()[B
aload_0; aload_0;
sconst_2; sconst_2;
invokevirtual 320; // getCurrentOffsetAndIncrease(S)S invokevirtual 320; // getCurrentOffsetAndIncrease(S)S
...@@ -2448,7 +2450,7 @@ ...@@ -2448,7 +2450,7 @@
.locals 1; .locals 1;
L0: aload_0; L0: aload_0;
invokevirtual 317; // readRawByte()B invokevirtual 311; // readRawByte()B
bspush 31; bspush 31;
sand; sand;
sstore_3; sstore_3;
...@@ -2456,7 +2458,7 @@ ...@@ -2456,7 +2458,7 @@
bspush 26; bspush 26;
if_scmpne L2; if_scmpne L2;
L1: aload_0; L1: aload_0;
invokevirtual 319; // getBuffer()[B invokevirtual 318; // getBuffer()[B
aload_0; aload_0;
sconst_4; sconst_4;
invokevirtual 320; // getCurrentOffsetAndIncrease(S)S invokevirtual 320; // getCurrentOffsetAndIncrease(S)S
...@@ -2476,7 +2478,7 @@ ...@@ -2476,7 +2478,7 @@
.locals 1; .locals 1;
L0: aload_0; L0: aload_0;
invokevirtual 317; // readRawByte()B invokevirtual 311; // readRawByte()B
bspush 31; bspush 31;
sand; sand;
sstore_3; sstore_3;
...@@ -2484,7 +2486,7 @@ ...@@ -2484,7 +2486,7 @@
bspush 27; bspush 27;
if_scmpne L2; if_scmpne L2;
L1: aload_0; L1: aload_0;
invokevirtual 319; // getBuffer()[B invokevirtual 318; // getBuffer()[B
aload_0; aload_0;
bspush 8; bspush 8;
invokevirtual 320; // getCurrentOffsetAndIncrease(S)S invokevirtual 320; // getCurrentOffsetAndIncrease(S)S
...@@ -2516,7 +2518,7 @@ ...@@ -2516,7 +2518,7 @@
bastore; bastore;
goto L3; goto L3;
L2: aload_0; L2: aload_0;
invokevirtual 319; // getBuffer()[B invokevirtual 318; // getBuffer()[B
aload_0; aload_0;
sconst_1; sconst_1;
sload_3; sload_3;
...@@ -2555,7 +2557,7 @@ ...@@ -2555,7 +2557,7 @@
sconst_2; sconst_2;
if_scmpne L4; if_scmpne L4;
L3: aload_0; L3: aload_0;
invokevirtual 335; // readInt16()S invokevirtual 323; // readInt16()S
sstore_2; sstore_2;
goto L5; goto L5;
L4: sspush 27012; L4: sspush 27012;
...@@ -2569,7 +2571,7 @@ ...@@ -2569,7 +2571,7 @@
.locals 1; .locals 1;
L0: aload_0; L0: aload_0;
invokevirtual 317; // readRawByte()B invokevirtual 311; // readRawByte()B
sstore_1; sstore_1;
sload_1; sload_1;
bspush -11; bspush -11;
...@@ -2646,12 +2648,12 @@ ...@@ -2646,12 +2648,12 @@
invokevirtual 310; // getCurrentOffset()S invokevirtual 310; // getCurrentOffset()S
sadd; sadd;
aload_0; aload_0;
invokevirtual 338; // getBufferLength()S invokevirtual 337; // getBufferLength()S
if_scmple L3; if_scmple L3;
L2: sspush 26368; L2: sspush 26368;
invokestatic 299; // javacard/framework/ISOException.throwIt(S)V invokestatic 299; // javacard/framework/ISOException.throwIt(S)V
L3: aload_0; L3: aload_0;
invokevirtual 319; // getBuffer()[B invokevirtual 318; // getBuffer()[B
aload_0; aload_0;
invokevirtual 310; // getCurrentOffset()S invokevirtual 310; // getCurrentOffset()S
aload_1; aload_1;
...@@ -2672,7 +2674,7 @@ ...@@ -2672,7 +2674,7 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokevirtual 319; // getBuffer()[B invokevirtual 318; // getBuffer()[B
getfield_a_this 15; // reference com/josh/vku2f/CBORBase.mStatusWords getfield_a_this 15; // reference com/josh/vku2f/CBORBase.mStatusWords
sconst_0; sconst_0;
dup2; dup2;
...@@ -2945,7 +2947,7 @@ ...@@ -2945,7 +2947,7 @@
aload_1; aload_1;
sload_2; sload_2;
sload_3; sload_3;
invokespecial 352; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S invokespecial 351; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S
sadd; sadd;
sstore 4; sstore 4;
sload 4; sload 4;
...@@ -2966,7 +2968,7 @@ ...@@ -2966,7 +2968,7 @@
aload_1; aload_1;
sload_2; sload_2;
sload_3; sload_3;
invokespecial 352; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S invokespecial 351; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S
sadd; sadd;
sstore 4; sstore 4;
sload 4; sload 4;
...@@ -3033,7 +3035,7 @@ ...@@ -3033,7 +3035,7 @@
aload_1; aload_1;
sload_2; sload_2;
sconst_4; sconst_4;
invokespecial 352; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S invokespecial 351; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S
sconst_1; sconst_1;
sadd; sadd;
sreturn; sreturn;
...@@ -3051,7 +3053,7 @@ ...@@ -3051,7 +3053,7 @@
aload_1; aload_1;
sload_2; sload_2;
bspush 8; bspush 8;
invokespecial 352; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S invokespecial 351; // com/josh/vku2f/CBOREncoder.writeRawByteArray([BSS)S
sconst_1; sconst_1;
sadd; sadd;
sreturn; sreturn;
...@@ -3215,7 +3217,7 @@ ...@@ -3215,7 +3217,7 @@
.locals 2; .locals 2;
L0: aload_0; L0: aload_0;
invokespecial 360; // javacard/framework/Applet.<init>()V invokespecial 355; // javacard/framework/Applet.<init>()V
bspush 8; bspush 8;
putfield_b_this 17; // byte com/josh/vku2f/CTAP2.MAX_PIN_RETRIES putfield_b_this 17; // byte com/josh/vku2f/CTAP2.MAX_PIN_RETRIES
bspush 8; bspush 8;
...@@ -3223,7 +3225,7 @@ ...@@ -3223,7 +3225,7 @@
L1: aload_0; L1: aload_0;
sspush 1210; sspush 1210;
sconst_2; sconst_2;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
putfield_a 19; // reference com/josh/vku2f/CTAP2.dataBuffer putfield_a 19; // reference com/josh/vku2f/CTAP2.dataBuffer
L2: goto L4; L2: goto L4;
L3: astore_1; L3: astore_1;
...@@ -3234,7 +3236,7 @@ ...@@ -3234,7 +3236,7 @@
L4: aload_0; L4: aload_0;
sspush 512; sspush 512;
sconst_2; sconst_2;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
putfield_a 20; // reference com/josh/vku2f/CTAP2.scratch putfield_a 20; // reference com/josh/vku2f/CTAP2.scratch
L5: goto L7; L5: goto L7;
L6: astore_1; L6: astore_1;
...@@ -3248,9 +3250,9 @@ ...@@ -3248,9 +3250,9 @@
invokestatic 363; // javacard/framework/JCSystem.makeTransientShortArray(SB)[S invokestatic 363; // javacard/framework/JCSystem.makeTransientShortArray(SB)[S
putfield_a 21; // reference com/josh/vku2f/CTAP2.tempVars putfield_a 21; // reference com/josh/vku2f/CTAP2.tempVars
aload_0; aload_0;
new 372; // com/josh/vku2f/CBORDecoder new 370; // com/josh/vku2f/CBORDecoder
dup; dup;
invokespecial 376; // com/josh/vku2f/CBORDecoder.<init>()V invokespecial 373; // com/josh/vku2f/CBORDecoder.<init>()V
putfield_a 22; // reference com/josh/vku2f/CTAP2.cborDecoder putfield_a 22; // reference com/josh/vku2f/CTAP2.cborDecoder
aload_0; aload_0;
new 113; // com/josh/vku2f/CBOREncoder new 113; // com/josh/vku2f/CBOREncoder
...@@ -3854,7 +3856,7 @@ ...@@ -3854,7 +3856,7 @@
sload_2; sload_2;
sconst_1; sconst_1;
ssub; ssub;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 34; // reference com/josh/vku2f/CTAP2.idSecret getfield_a_this 34; // reference com/josh/vku2f/CTAP2.idSecret
new 184; // com/josh/vku2f/DomString new 184; // com/josh/vku2f/DomString
...@@ -3933,7 +3935,7 @@ ...@@ -3933,7 +3935,7 @@
invokevirtual 193; // init([BSS)V invokevirtual 193; // init([BSS)V
L1: getfield_a_this 22; // reference com/josh/vku2f/CTAP2.cborDecoder L1: getfield_a_this 22; // reference com/josh/vku2f/CTAP2.cborDecoder
sconst_4; sconst_4;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
pop; pop;
getfield_a_this 22; // reference com/josh/vku2f/CTAP2.cborDecoder getfield_a_this 22; // reference com/josh/vku2f/CTAP2.cborDecoder
getfield_a_this 20; // reference com/josh/vku2f/CTAP2.scratch getfield_a_this 20; // reference com/josh/vku2f/CTAP2.scratch
...@@ -3958,7 +3960,7 @@ ...@@ -3958,7 +3960,7 @@
getfield_a 39; // reference com/josh/vku2f/IDSecret.PuKp getfield_a 39; // reference com/josh/vku2f/IDSecret.PuKp
sconst_1; sconst_1;
bspush 64; bspush 64;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
L2: goto L4; L2: goto L4;
L3: astore_3; L3: astore_3;
...@@ -4093,7 +4095,7 @@ ...@@ -4093,7 +4095,7 @@
sload_2; sload_2;
sconst_1; sconst_1;
ssub; ssub;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 19; // reference com/josh/vku2f/CTAP2.dataBuffer getfield_a_this 19; // reference com/josh/vku2f/CTAP2.dataBuffer
sconst_0; sconst_0;
...@@ -5287,7 +5289,7 @@ ...@@ -5287,7 +5289,7 @@
sconst_0; sconst_0;
getfield_a_this 23; // reference com/josh/vku2f/CTAP2.cborEncoder getfield_a_this 23; // reference com/josh/vku2f/CTAP2.cborEncoder
invokevirtual 345; // getCurrentOffset()S invokevirtual 345; // getCurrentOffset()S
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
invokestatic 268; // javacard/framework/JCSystem.commitTransaction()V invokestatic 268; // javacard/framework/JCSystem.commitTransaction()V
L2: getfield_a_this 50; // reference com/josh/vku2f/CTAP2.fidoInfo L2: getfield_a_this 50; // reference com/josh/vku2f/CTAP2.fidoInfo
...@@ -6061,7 +6063,7 @@ ...@@ -6061,7 +6063,7 @@
L0: aload_1; L0: aload_1;
sconst_5; sconst_5;
invokevirtual 369; // readMajorType(B)S invokevirtual 367; // readMajorType(B)S
sstore_2; sstore_2;
L1: aload_1; L1: aload_1;
invokevirtual 115; // readInt8()B invokevirtual 115; // readInt8()B
...@@ -6609,7 +6611,7 @@ ...@@ -6609,7 +6611,7 @@
getfield_a_this 54; // reference com/josh/vku2f/DomString.str getfield_a_this 54; // reference com/josh/vku2f/DomString.str
sconst_0; sconst_0;
sload_2; sload_2;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
sload_2; sload_2;
putfield_s_this 55; // short com/josh/vku2f/DomString.len putfield_s_this 55; // short com/josh/vku2f/DomString.len
...@@ -6888,19 +6890,20 @@ ...@@ -6888,19 +6890,20 @@
public final byte[] Rp 2; // [B public final byte[] Rp 2; // [B
public final byte[] PuKp 3; // [B public final byte[] PuKp 3; // [B
public final byte[] sharedSecret 4; // [B public final byte[] sharedSecret 4; // [B
public final byte[] aesRawKey 5; // [B public final byte[] hashedSharedSecret 5; // [B
public final byte[] Cx 6; // [B public final byte[] Cx 6; // [B
public final byte[] encryptedCx 7; // [B public final byte[] encryptedCx 7; // [B
public final byte[] hmac 8; // [B public final byte[] hmac 8; // [B
private final byte[] RxRp 9; // [B public final byte[] hashedIDxAndCx 9; // [B
private 1.20 aesKey 10; // Ljavacard/security/AESKey; private final byte[] RxRp 10; // [B
private 4.1 aesEncrypt 11; // Ljavacardx/crypto/Cipher; private 1.20 aesKey 11; // Ljavacard/security/AESKey;
private 4.1 aesDecrypt 12; // Ljavacardx/crypto/Cipher; private 4.1 aesEncrypt 12; // Ljavacardx/crypto/Cipher;
private final byte[] IV_ZERO_AES 13; // [B private 4.1 aesDecrypt 13; // Ljavacardx/crypto/Cipher;
private 1.11 sha256 14; // Ljavacard/security/MessageDigest; private final byte[] IV_ZERO_AES 14; // [B
private byte[] scratch 15; // [B private 1.11 sha256 15; // Ljavacard/security/MessageDigest;
private final short SCRATCH_LENGTH 16; // S private byte[] scratch 16; // [B
private byte i 17; // B private final short SCRATCH_LENGTH 17; // S
private byte i 18; // B
} }
.publicMethodTable 1 { .publicMethodTable 1 {
...@@ -6944,7 +6947,7 @@ ...@@ -6944,7 +6947,7 @@
aload_0; aload_0;
bspush 32; bspush 32;
newarray 11; newarray 11;
putfield_a 77; // reference com/josh/vku2f/IDSecret.aesRawKey putfield_a 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
aload_0; aload_0;
bspush 16; bspush 16;
newarray 11; newarray 11;
...@@ -6958,6 +6961,10 @@ ...@@ -6958,6 +6961,10 @@
newarray 11; newarray 11;
putfield_a 43; // reference com/josh/vku2f/IDSecret.hmac putfield_a 43; // reference com/josh/vku2f/IDSecret.hmac
aload_0; aload_0;
bspush 32;
newarray 11;
putfield_a 79; // reference com/josh/vku2f/IDSecret.hashedIDxAndCx
aload_0;
bspush 16; bspush 16;
newarray 11; newarray 11;
dup; dup;
...@@ -7024,25 +7031,25 @@ ...@@ -7024,25 +7031,25 @@
bspush 15; bspush 15;
sconst_0; sconst_0;
bastore; bastore;
putfield_a 79; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES putfield_a 80; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES
sspush 128; sspush 128;
putfield_s_this 80; // short com/josh/vku2f/IDSecret.SCRATCH_LENGTH putfield_s_this 81; // short com/josh/vku2f/IDSecret.SCRATCH_LENGTH
sconst_0; sconst_0;
putfield_b_this 81; // byte com/josh/vku2f/IDSecret.i putfield_b_this 82; // byte com/josh/vku2f/IDSecret.i
aload_0; aload_0;
new 184; // com/josh/vku2f/DomString new 184; // com/josh/vku2f/DomString
dup; dup;
getstatic_a 311; // reference com/josh/vku2f/Utf8Strings.UTF8_NULL getstatic_a 312; // reference com/josh/vku2f/Utf8Strings.UTF8_NULL
getstatic_a 311; // reference com/josh/vku2f/Utf8Strings.UTF8_NULL getstatic_a 312; // reference com/josh/vku2f/Utf8Strings.UTF8_NULL
arraylength; arraylength;
invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V
putfield_a 37; // reference com/josh/vku2f/IDSecret.IDx putfield_a 37; // reference com/josh/vku2f/IDSecret.IDx
invokestatic 312; // com/josh/vku2f/Random.getInstance()Ljavacard/security/RandomData; invokestatic 313; // com/josh/vku2f/Random.getInstance()Ljavacard/security/RandomData;
getfield_a_this 38; // reference com/josh/vku2f/IDSecret.Rx getfield_a_this 38; // reference com/josh/vku2f/IDSecret.Rx
sconst_0; sconst_0;
getfield_a_this 38; // reference com/josh/vku2f/IDSecret.Rx getfield_a_this 38; // reference com/josh/vku2f/IDSecret.Rx
arraylength; arraylength;
invokevirtual 313; // nextBytes([BSS)S invokevirtual 314; // nextBytes([BSS)S
pop; pop;
getfield_a_this 75; // reference com/josh/vku2f/IDSecret.Rp getfield_a_this 75; // reference com/josh/vku2f/IDSecret.Rp
sconst_0; sconst_0;
...@@ -7050,7 +7057,7 @@ ...@@ -7050,7 +7057,7 @@
getfield_a_this 75; // reference com/josh/vku2f/IDSecret.Rp getfield_a_this 75; // reference com/josh/vku2f/IDSecret.Rp
arraylength; arraylength;
s2b; s2b;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp
sconst_0; sconst_0;
...@@ -7058,7 +7065,7 @@ ...@@ -7058,7 +7065,7 @@
getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp
arraylength; arraylength;
s2b; s2b;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
getfield_a_this 39; // reference com/josh/vku2f/IDSecret.PuKp getfield_a_this 39; // reference com/josh/vku2f/IDSecret.PuKp
sconst_0; sconst_0;
...@@ -7072,7 +7079,7 @@ ...@@ -7072,7 +7079,7 @@
ssub; ssub;
s2b; s2b;
sconst_0; sconst_0;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
getfield_a_this 40; // reference com/josh/vku2f/IDSecret.sharedSecret getfield_a_this 40; // reference com/josh/vku2f/IDSecret.sharedSecret
sconst_0; sconst_0;
...@@ -7080,22 +7087,22 @@ ...@@ -7080,22 +7087,22 @@
arraylength; arraylength;
s2b; s2b;
sconst_0; sconst_0;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
getfield_a_this 77; // reference com/josh/vku2f/IDSecret.aesRawKey getfield_a_this 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
sconst_0; sconst_0;
getfield_a_this 77; // reference com/josh/vku2f/IDSecret.aesRawKey getfield_a_this 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
arraylength; arraylength;
s2b; s2b;
sconst_0; sconst_0;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
invokestatic 312; // com/josh/vku2f/Random.getInstance()Ljavacard/security/RandomData; invokestatic 313; // com/josh/vku2f/Random.getInstance()Ljavacard/security/RandomData;
getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx
sconst_0; sconst_0;
getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx
arraylength; arraylength;
invokevirtual 313; // nextBytes([BSS)S invokevirtual 314; // nextBytes([BSS)S
pop; pop;
getfield_a_this 41; // reference com/josh/vku2f/IDSecret.encryptedCx getfield_a_this 41; // reference com/josh/vku2f/IDSecret.encryptedCx
sconst_0; sconst_0;
...@@ -7103,7 +7110,7 @@ ...@@ -7103,7 +7110,7 @@
arraylength; arraylength;
s2b; s2b;
sconst_0; sconst_0;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
getfield_a_this 43; // reference com/josh/vku2f/IDSecret.hmac getfield_a_this 43; // reference com/josh/vku2f/IDSecret.hmac
sconst_0; sconst_0;
...@@ -7111,35 +7118,35 @@ ...@@ -7111,35 +7118,35 @@
arraylength; arraylength;
s2b; s2b;
sconst_0; sconst_0;
invokestatic 314; // javacard/framework/Util.arrayFill([BSSB)S invokestatic 315; // javacard/framework/Util.arrayFill([BSSB)S
pop; pop;
aload_0; aload_0;
bspush 15; bspush 15;
sspush 256; sspush 256;
sconst_0; sconst_0;
invokestatic 315; // javacard/security/KeyBuilder.buildKey(BSZ)Ljavacard/security/Key; invokestatic 316; // javacard/security/KeyBuilder.buildKey(BSZ)Ljavacard/security/Key;
checkcast 0 316; // T_CLASSORINTERFACE javacard/security/AESKey checkcast 0 317; // T_CLASSORINTERFACE javacard/security/AESKey
putfield_a 82; // reference com/josh/vku2f/IDSecret.aesKey putfield_a 83; // reference com/josh/vku2f/IDSecret.aesKey
aload_0; aload_0;
bspush 13; bspush 13;
sconst_0; sconst_0;
invokestatic 318; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher; invokestatic 319; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher;
putfield_a 83; // reference com/josh/vku2f/IDSecret.aesEncrypt putfield_a 84; // reference com/josh/vku2f/IDSecret.aesEncrypt
aload_0; aload_0;
bspush 13; bspush 13;
sconst_0; sconst_0;
invokestatic 318; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher; invokestatic 319; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher;
putfield_a 84; // reference com/josh/vku2f/IDSecret.aesDecrypt putfield_a 85; // reference com/josh/vku2f/IDSecret.aesDecrypt
aload_0; aload_0;
sconst_4; sconst_4;
sconst_0; sconst_0;
invokestatic 119; // javacard/security/MessageDigest.getInstance(BZ)Ljavacard/security/MessageDigest; invokestatic 119; // javacard/security/MessageDigest.getInstance(BZ)Ljavacard/security/MessageDigest;
putfield_a 85; // reference com/josh/vku2f/IDSecret.sha256 putfield_a 86; // reference com/josh/vku2f/IDSecret.sha256
aload_0; aload_0;
sspush 128; sspush 128;
sconst_2; sconst_2;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
putfield_a 86; // reference com/josh/vku2f/IDSecret.scratch putfield_a 87; // reference com/josh/vku2f/IDSecret.scratch
return; return;
} }
...@@ -7148,27 +7155,27 @@ ...@@ -7148,27 +7155,27 @@
.locals 0; .locals 0;
L0: sconst_0; L0: sconst_0;
putfield_b_this 81; // byte com/josh/vku2f/IDSecret.i putfield_b_this 82; // byte com/josh/vku2f/IDSecret.i
L1: getfield_b_this 81; // byte com/josh/vku2f/IDSecret.i L1: getfield_b_this 82; // byte com/josh/vku2f/IDSecret.i
sconst_4; sconst_4;
if_scmpge L3; if_scmpge L3;
L2: getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp L2: getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp
getfield_b_this 81; // byte com/josh/vku2f/IDSecret.i getfield_b_this 82; // byte com/josh/vku2f/IDSecret.i
getfield_a_this 38; // reference com/josh/vku2f/IDSecret.Rx getfield_a_this 38; // reference com/josh/vku2f/IDSecret.Rx
getfield_b_this 81; // byte com/josh/vku2f/IDSecret.i getfield_b_this 82; // byte com/josh/vku2f/IDSecret.i
baload; baload;
getfield_a_this 75; // reference com/josh/vku2f/IDSecret.Rp getfield_a_this 75; // reference com/josh/vku2f/IDSecret.Rp
getfield_b_this 81; // byte com/josh/vku2f/IDSecret.i getfield_b_this 82; // byte com/josh/vku2f/IDSecret.i
baload; baload;
sxor; sxor;
bastore; bastore;
aload_0; aload_0;
dup; dup;
getfield_b 81; // byte com/josh/vku2f/IDSecret.i getfield_b 82; // byte com/josh/vku2f/IDSecret.i
sconst_1; sconst_1;
sadd; sadd;
s2b; s2b;
putfield_b 81; // byte com/josh/vku2f/IDSecret.i putfield_b 82; // byte com/josh/vku2f/IDSecret.i
goto L1; goto L1;
L3: getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp L3: getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp
areturn; areturn;
...@@ -7178,34 +7185,34 @@ ...@@ -7178,34 +7185,34 @@
.stack 6; .stack 6;
.locals 0; .locals 0;
L0: getfield_a_this 85; // reference com/josh/vku2f/IDSecret.sha256 L0: getfield_a_this 86; // reference com/josh/vku2f/IDSecret.sha256
getfield_a_this 40; // reference com/josh/vku2f/IDSecret.sharedSecret getfield_a_this 40; // reference com/josh/vku2f/IDSecret.sharedSecret
sconst_0; sconst_0;
bspush 20; bspush 20;
getfield_a_this 77; // reference com/josh/vku2f/IDSecret.aesRawKey getfield_a_this 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
sconst_0; sconst_0;
invokevirtual 209; // doFinal([BSS[BS)S invokevirtual 209; // doFinal([BSS[BS)S
pop; pop;
getfield_a_this 82; // reference com/josh/vku2f/IDSecret.aesKey getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesKey
getfield_a_this 77; // reference com/josh/vku2f/IDSecret.aesRawKey getfield_a_this 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
sconst_0; sconst_0;
invokeinterface 3 316 4; // javacard/security/AESKey invokeinterface 3 317 4; // javacard/security/AESKey
getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesEncrypt getfield_a_this 84; // reference com/josh/vku2f/IDSecret.aesEncrypt
getfield_a_this 82; // reference com/josh/vku2f/IDSecret.aesKey getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesKey
sconst_2; sconst_2;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES getfield_a_this 80; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES
sconst_0; sconst_0;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES getfield_a_this 80; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES
arraylength; arraylength;
invokevirtual 323; // init(Ljavacard/security/Key;B[BSS)V invokevirtual 324; // init(Ljavacard/security/Key;B[BSS)V
getfield_a_this 84; // reference com/josh/vku2f/IDSecret.aesDecrypt getfield_a_this 85; // reference com/josh/vku2f/IDSecret.aesDecrypt
getfield_a_this 82; // reference com/josh/vku2f/IDSecret.aesKey getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesKey
sconst_1; sconst_1;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES getfield_a_this 80; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES
sconst_0; sconst_0;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES getfield_a_this 80; // reference com/josh/vku2f/IDSecret.IV_ZERO_AES
arraylength; arraylength;
invokevirtual 323; // init(Ljavacard/security/Key;B[BSS)V invokevirtual 324; // init(Ljavacard/security/Key;B[BSS)V
return; return;
} }
...@@ -7213,14 +7220,14 @@ ...@@ -7213,14 +7220,14 @@
.stack 6; .stack 6;
.locals 0; .locals 0;
L0: getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesEncrypt L0: getfield_a_this 84; // reference com/josh/vku2f/IDSecret.aesEncrypt
getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx
sconst_0; sconst_0;
getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx
arraylength; arraylength;
getfield_a_this 41; // reference com/josh/vku2f/IDSecret.encryptedCx getfield_a_this 41; // reference com/josh/vku2f/IDSecret.encryptedCx
sconst_0; sconst_0;
invokevirtual 324; // doFinal([BSS[BS)S invokevirtual 325; // doFinal([BSS[BS)S
pop; pop;
return; return;
} }
...@@ -7232,22 +7239,22 @@ ...@@ -7232,22 +7239,22 @@
L0: getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx L0: getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx
getfield_a 54; // reference com/josh/vku2f/DomString.str getfield_a 54; // reference com/josh/vku2f/DomString.str
sconst_0; sconst_0;
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
sconst_0; sconst_0;
getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx
getfield_a 54; // reference com/josh/vku2f/DomString.str getfield_a 54; // reference com/josh/vku2f/DomString.str
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx
sconst_0; sconst_0;
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx
getfield_a 54; // reference com/josh/vku2f/DomString.str getfield_a 54; // reference com/josh/vku2f/DomString.str
arraylength; arraylength;
getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx getfield_a_this 78; // reference com/josh/vku2f/IDSecret.Cx
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx getfield_a_this 37; // reference com/josh/vku2f/IDSecret.IDx
getfield_a 54; // reference com/josh/vku2f/DomString.str getfield_a 54; // reference com/josh/vku2f/DomString.str
...@@ -7261,46 +7268,53 @@ ...@@ -7261,46 +7268,53 @@
L1: sload_3; L1: sload_3;
bspush 32; bspush 32;
if_scmple L3; if_scmple L3;
L2: getfield_a_this 85; // reference com/josh/vku2f/IDSecret.sha256 L2: getfield_a_this 86; // reference com/josh/vku2f/IDSecret.sha256
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
sload 4; sload 4;
bspush 32; bspush 32;
invokevirtual 325; // update([BSS)V invokevirtual 326; // update([BSS)V
sinc 3 -32; sinc 3 -32;
sinc 4 32; sinc 4 32;
goto L1; goto L1;
L3: getfield_a_this 85; // reference com/josh/vku2f/IDSecret.sha256 L3: getfield_a_this 86; // reference com/josh/vku2f/IDSecret.sha256
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
sload 4; sload 4;
sload_3; sload_3;
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
sconst_0; sconst_0;
invokevirtual 209; // doFinal([BSS[BS)S invokevirtual 209; // doFinal([BSS[BS)S
pop; pop;
getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesEncrypt getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch sconst_0;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.hashedIDxAndCx
sconst_0;
bspush 32;
invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop;
getfield_a_this 84; // reference com/josh/vku2f/IDSecret.aesEncrypt
getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
sconst_0; sconst_0;
bspush 16; bspush 16;
aload_1; aload_1;
sload_2; sload_2;
invokevirtual 326; // update([BSS[BS)S invokevirtual 327; // update([BSS[BS)S
pop; pop;
getfield_a_this 83; // reference com/josh/vku2f/IDSecret.aesEncrypt getfield_a_this 84; // reference com/josh/vku2f/IDSecret.aesEncrypt
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch getfield_a_this 87; // reference com/josh/vku2f/IDSecret.scratch
bspush 16; bspush 16;
bspush 16; bspush 16;
aload_1; aload_1;
sload_2; sload_2;
bspush 16; bspush 16;
sadd; sadd;
invokevirtual 324; // doFinal([BSS[BS)S invokevirtual 325; // doFinal([BSS[BS)S
pop; pop;
getfield_a_this 86; // reference com/josh/vku2f/IDSecret.scratch aload_1;
sconst_0; sconst_0;
getfield_a_this 43; // reference com/josh/vku2f/IDSecret.hmac getfield_a_this 43; // reference com/josh/vku2f/IDSecret.hmac
sconst_0; sconst_0;
bspush 32; bspush 32;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
return; return;
} }
...@@ -7315,7 +7329,7 @@ ...@@ -7315,7 +7329,7 @@
sspush 1200; sspush 1200;
invokevirtual 187; // init([BSS)V invokevirtual 187; // init([BSS)V
aload_2; aload_2;
bspush 10; bspush 11;
invokevirtual 188; // startArray(S)S invokevirtual 188; // startArray(S)S
pop; pop;
aload_2; aload_2;
...@@ -7342,7 +7356,7 @@ ...@@ -7342,7 +7356,7 @@
pop; pop;
aload_2; aload_2;
aload_0; aload_0;
invokevirtual 327; // getRxRp()[B invokevirtual 328; // getRxRp()[B
sconst_0; sconst_0;
getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp getfield_a_this 76; // reference com/josh/vku2f/IDSecret.RxRp
arraylength; arraylength;
...@@ -7363,9 +7377,9 @@ ...@@ -7363,9 +7377,9 @@
invokevirtual 191; // encodeByteString([BSS)S invokevirtual 191; // encodeByteString([BSS)S
pop; pop;
aload_2; aload_2;
getfield_a_this 77; // reference com/josh/vku2f/IDSecret.aesRawKey getfield_a_this 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
sconst_0; sconst_0;
getfield_a_this 77; // reference com/josh/vku2f/IDSecret.aesRawKey getfield_a_this 77; // reference com/josh/vku2f/IDSecret.hashedSharedSecret
arraylength; arraylength;
invokevirtual 191; // encodeByteString([BSS)S invokevirtual 191; // encodeByteString([BSS)S
pop; pop;
...@@ -7391,6 +7405,13 @@ ...@@ -7391,6 +7405,13 @@
invokevirtual 191; // encodeByteString([BSS)S invokevirtual 191; // encodeByteString([BSS)S
pop; pop;
aload_2; aload_2;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.hashedIDxAndCx
sconst_0;
getfield_a_this 79; // reference com/josh/vku2f/IDSecret.hashedIDxAndCx
arraylength;
invokevirtual 191; // encodeByteString([BSS)S
pop;
aload_2;
invokevirtual 345; // getCurrentOffset()S invokevirtual 345; // getCurrentOffset()S
sreturn; sreturn;
} }
...@@ -7431,27 +7452,27 @@ ...@@ -7431,27 +7452,27 @@
.descriptor Ljavacard/security/ECKey; 1.17; .descriptor Ljavacard/security/ECKey; 1.17;
L0: aload_0; L0: aload_0;
getstatic_a 328; // reference com/josh/vku2f/KeyParams.secp256r1p getstatic_a 329; // reference com/josh/vku2f/KeyParams.secp256r1p
sconst_0; sconst_0;
bspush 32; bspush 32;
invokeinterface 4 120 0; // javacard/security/ECKey invokeinterface 4 120 0; // javacard/security/ECKey
aload_0; aload_0;
getstatic_a 329; // reference com/josh/vku2f/KeyParams.secp256r1A getstatic_a 330; // reference com/josh/vku2f/KeyParams.secp256r1A
sconst_0; sconst_0;
bspush 32; bspush 32;
invokeinterface 4 120 3; // javacard/security/ECKey invokeinterface 4 120 3; // javacard/security/ECKey
aload_0; aload_0;
getstatic_a 330; // reference com/josh/vku2f/KeyParams.secp256r1B getstatic_a 331; // reference com/josh/vku2f/KeyParams.secp256r1B
sconst_0; sconst_0;
bspush 32; bspush 32;
invokeinterface 4 120 4; // javacard/security/ECKey invokeinterface 4 120 4; // javacard/security/ECKey
aload_0; aload_0;
getstatic_a 331; // reference com/josh/vku2f/KeyParams.secp256r1G getstatic_a 332; // reference com/josh/vku2f/KeyParams.secp256r1G
sconst_0; sconst_0;
bspush 65; bspush 65;
invokeinterface 4 120 5; // javacard/security/ECKey invokeinterface 4 120 5; // javacard/security/ECKey
aload_0; aload_0;
getstatic_a 332; // reference com/josh/vku2f/KeyParams.secp256r1R getstatic_a 333; // reference com/josh/vku2f/KeyParams.secp256r1R
sconst_0; sconst_0;
bspush 32; bspush 32;
invokeinterface 4 120 6; // javacard/security/ECKey invokeinterface 4 120 6; // javacard/security/ECKey
...@@ -7544,7 +7565,7 @@ ...@@ -7544,7 +7565,7 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokespecial 333; // com/josh/vku2f/PinUvAuthProtocol.<init>()V invokespecial 334; // com/josh/vku2f/PinUvAuthProtocol.<init>()V
return; return;
} }
...@@ -7571,13 +7592,13 @@ ...@@ -7571,13 +7592,13 @@
dup; dup;
aload_1; aload_1;
aload_2; aload_2;
invokespecial 334; // javacard/security/KeyPair.<init>(Ljavacard/security/PublicKey;Ljavacard/security/PrivateKey;)V invokespecial 335; // javacard/security/KeyPair.<init>(Ljavacard/security/PublicKey;Ljavacard/security/PrivateKey;)V
putfield_a 87; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair putfield_a 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair
aload_0; aload_0;
sconst_1; sconst_1;
sconst_1; sconst_1;
invokestatic 126; // javacard/framework/JCSystem.makeTransientBooleanArray(SB)[Z invokestatic 126; // javacard/framework/JCSystem.makeTransientBooleanArray(SB)[Z
putfield_a 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhSet putfield_a 89; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhSet
return; return;
} }
...@@ -7601,29 +7622,29 @@ ...@@ -7601,29 +7622,29 @@
L0: bspush 65; L0: bspush 65;
sconst_1; sconst_1;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
astore_1; astore_1;
L1: goto L3; L1: goto L3;
L2: astore_2; L2: astore_2;
bspush 65; bspush 65;
newarray 11; newarray 11;
astore_1; astore_1;
L3: getfield_a_this 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhSet L3: getfield_a_this 89; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhSet
sconst_0; sconst_0;
baload; baload;
ifne L5; ifne L5;
L4: getfield_a_this 87; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair L4: getfield_a_this 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 120; // T_CLASSORINTERFACE javacard/security/ECKey checkcast 0 120; // T_CLASSORINTERFACE javacard/security/ECKey
invokestatic 124; // com/josh/vku2f/KeyParams.sec256r1params(Ljavacard/security/ECKey;)V invokestatic 124; // com/josh/vku2f/KeyParams.sec256r1params(Ljavacard/security/ECKey;)V
getfield_a_this 87; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair getfield_a_this 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair
invokevirtual 127; // genKeyPair()V invokevirtual 127; // genKeyPair()V
getfield_a_this 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhSet getfield_a_this 89; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhSet
sconst_0; sconst_0;
sconst_1; sconst_1;
bastore; bastore;
L5: getfield_a_this 87; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair L5: getfield_a_this 88; // reference com/josh/vku2f/PinUvAuthProtocolOne.ecDhKeyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 361; // T_CLASSORINTERFACE javacard/security/ECPublicKey checkcast 0 361; // T_CLASSORINTERFACE javacard/security/ECPublicKey
aload_1; aload_1;
sconst_0; sconst_0;
...@@ -7734,7 +7755,7 @@ ...@@ -7734,7 +7755,7 @@
L0: aload_0; L0: aload_0;
invokespecial 293; // java/lang/Object.<init>()V invokespecial 293; // java/lang/Object.<init>()V
aload_0; aload_0;
invokevirtual 337; // resetTokenState()V invokevirtual 338; // resetTokenState()V
return; return;
} }
...@@ -7750,23 +7771,23 @@ ...@@ -7750,23 +7771,23 @@
.locals 0; .locals 0;
L0: sconst_0; L0: sconst_0;
putfield_b_this 89; // byte com/josh/vku2f/PinUvAuthToken.permissionsRPID putfield_b_this 90; // byte com/josh/vku2f/PinUvAuthToken.permissionsRPID
sconst_0; sconst_0;
putfield_b_this 90; // byte com/josh/vku2f/PinUvAuthToken.permissionsSet putfield_b_this 91; // byte com/josh/vku2f/PinUvAuthToken.permissionsSet
sconst_0; sconst_0;
putfield_b_this 91; // byte com/josh/vku2f/PinUvAuthToken.usageTimer putfield_b_this 92; // byte com/josh/vku2f/PinUvAuthToken.usageTimer
sconst_0; sconst_0;
putfield_b_this 92; // boolean com/josh/vku2f/PinUvAuthToken.inUseFlag putfield_b_this 93; // boolean com/josh/vku2f/PinUvAuthToken.inUseFlag
sconst_0; sconst_0;
putfield_b_this 93; // byte com/josh/vku2f/PinUvAuthToken.initialUsageTimeLimit putfield_b_this 94; // byte com/josh/vku2f/PinUvAuthToken.initialUsageTimeLimit
sconst_0; sconst_0;
putfield_b_this 94; // byte com/josh/vku2f/PinUvAuthToken.userPresentTimeLimit putfield_b_this 95; // byte com/josh/vku2f/PinUvAuthToken.userPresentTimeLimit
sconst_0; sconst_0;
putfield_b_this 95; // byte com/josh/vku2f/PinUvAuthToken.maxUsageTimePeriod putfield_b_this 96; // byte com/josh/vku2f/PinUvAuthToken.maxUsageTimePeriod
sconst_0; sconst_0;
putfield_b_this 96; // boolean com/josh/vku2f/PinUvAuthToken.userVerifiedFlag putfield_b_this 97; // boolean com/josh/vku2f/PinUvAuthToken.userVerifiedFlag
sconst_0; sconst_0;
putfield_b_this 97; // boolean com/josh/vku2f/PinUvAuthToken.userPresentFlag putfield_b_this 98; // boolean com/josh/vku2f/PinUvAuthToken.userPresentFlag
return; return;
} }
...@@ -7774,7 +7795,7 @@ ...@@ -7774,7 +7795,7 @@
.stack 1; .stack 1;
.locals 0; .locals 0;
L0: getfield_b_this 92; // boolean com/josh/vku2f/PinUvAuthToken.inUseFlag L0: getfield_b_this 93; // boolean com/josh/vku2f/PinUvAuthToken.inUseFlag
sreturn; sreturn;
} }
...@@ -7804,14 +7825,14 @@ ...@@ -7804,14 +7825,14 @@
getstatic_a 288; // reference com/josh/vku2f/Utf8Strings.UTF8_PUBLIC_KEY getstatic_a 288; // reference com/josh/vku2f/Utf8Strings.UTF8_PUBLIC_KEY
arraylength; arraylength;
newarray 11; newarray 11;
putfield_a 98; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.type putfield_a 99; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.type
getstatic_a 288; // reference com/josh/vku2f/Utf8Strings.UTF8_PUBLIC_KEY getstatic_a 288; // reference com/josh/vku2f/Utf8Strings.UTF8_PUBLIC_KEY
sconst_0; sconst_0;
getfield_a_this 98; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.type getfield_a_this 99; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.type
sconst_0; sconst_0;
getfield_a_this 98; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.type getfield_a_this 99; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.type
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
aload_0; aload_0;
sload_3; sload_3;
...@@ -7823,7 +7844,7 @@ ...@@ -7823,7 +7844,7 @@
sconst_0; sconst_0;
getfield_a_this 48; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.id getfield_a_this 48; // reference com/josh/vku2f/PublicKeyCredentialDescriptor.id
arraylength; arraylength;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
return; return;
} }
...@@ -7863,7 +7884,7 @@ ...@@ -7863,7 +7884,7 @@
aload_1; aload_1;
sload_2; sload_2;
invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V
putfield_a 99; // reference com/josh/vku2f/PublicKeyCredentialEntity.name putfield_a 100; // reference com/josh/vku2f/PublicKeyCredentialEntity.name
return; return;
} }
...@@ -7897,9 +7918,9 @@ ...@@ -7897,9 +7918,9 @@
aload_0; aload_0;
sload_1; sload_1;
newarray 12; newarray 12;
putfield_a 100; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList putfield_a 101; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList
sconst_0; sconst_0;
putfield_s_this 101; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex putfield_s_this 102; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex
return; return;
} }
...@@ -7907,14 +7928,14 @@ ...@@ -7907,14 +7928,14 @@
.stack 5; .stack 5;
.locals 0; .locals 0;
L0: getfield_a_this 100; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList L0: getfield_a_this 101; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList
aload_0; aload_0;
dup; dup;
getfield_s 101; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex getfield_s 102; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex
dup_x 18; dup_x 18;
sconst_1; sconst_1;
sadd; sadd;
putfield_s 101; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex putfield_s 102; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex
sload_1; sload_1;
sastore; sastore;
return; return;
...@@ -7927,23 +7948,23 @@ ...@@ -7927,23 +7948,23 @@
L0: sconst_0; L0: sconst_0;
sstore_1; sstore_1;
L1: sload_1; L1: sload_1;
getfield_s_this 101; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex getfield_s_this 102; // short com/josh/vku2f/PublicKeyCredentialParams.listIndex
if_scmpge L9; if_scmpge L9;
L2: getfield_a_this 100; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList L2: getfield_a_this 101; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList
sload_1; sload_1;
saload; saload;
bspush -7; bspush -7;
if_scmpne L4; if_scmpne L4;
L3: bspush 33; L3: bspush 33;
sreturn; sreturn;
L4: getfield_a_this 100; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList L4: getfield_a_this 101; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList
sload_1; sload_1;
saload; saload;
sspush -257; sspush -257;
if_scmpne L6; if_scmpne L6;
L5: bspush 40; L5: bspush 40;
sreturn; sreturn;
L6: getfield_a_this 100; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList L6: getfield_a_this 101; // reference com/josh/vku2f/PublicKeyCredentialParams.paramList
sload_1; sload_1;
saload; saload;
bspush -37; bspush -37;
...@@ -7982,7 +8003,7 @@ ...@@ -7982,7 +8003,7 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokespecial 351; // com/josh/vku2f/PublicKeyCredentialEntity.<init>()V invokespecial 352; // com/josh/vku2f/PublicKeyCredentialEntity.<init>()V
return; return;
} }
...@@ -7996,7 +8017,7 @@ ...@@ -7996,7 +8017,7 @@
aload_1; aload_1;
sload_2; sload_2;
invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V
putfield_a 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId putfield_a 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
return; return;
} }
...@@ -8004,7 +8025,7 @@ ...@@ -8004,7 +8025,7 @@
.stack 4; .stack 4;
.locals 0; .locals 0;
L0: getfield_a_this 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId L0: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
aload_1; aload_1;
sload_2; sload_2;
sload_3; sload_3;
...@@ -8016,10 +8037,10 @@ ...@@ -8016,10 +8037,10 @@
.stack 2; .stack 2;
.locals 0; .locals 0;
L0: getfield_a_this 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId L0: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
aload_1; aload_1;
getfield_a 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId getfield_a 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
invokevirtual 353; // checkEquals(Lcom/josh/vku2f/DomString;)Z invokevirtual 354; // checkEquals(Lcom/josh/vku2f/DomString;)Z
sreturn; sreturn;
} }
...@@ -8027,14 +8048,14 @@ ...@@ -8027,14 +8048,14 @@
.stack 5; .stack 5;
.locals 0; .locals 0;
L0: getfield_a_this 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId L0: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
getfield_a 54; // reference com/josh/vku2f/DomString.str getfield_a 54; // reference com/josh/vku2f/DomString.str
sconst_0; sconst_0;
aload_1; aload_1;
sload_2; sload_2;
getfield_a_this 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
getfield_s 55; // short com/josh/vku2f/DomString.len getfield_s 55; // short com/josh/vku2f/DomString.len
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
return; return;
} }
...@@ -8043,7 +8064,7 @@ ...@@ -8043,7 +8064,7 @@
.stack 1; .stack 1;
.locals 0; .locals 0;
L0: getfield_a_this 102; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId L0: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialRpEntity.rpId
getfield_s 55; // short com/josh/vku2f/DomString.len getfield_s 55; // short com/josh/vku2f/DomString.len
sreturn; sreturn;
} }
...@@ -8078,11 +8099,11 @@ ...@@ -8078,11 +8099,11 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokespecial 351; // com/josh/vku2f/PublicKeyCredentialEntity.<init>()V invokespecial 352; // com/josh/vku2f/PublicKeyCredentialEntity.<init>()V
aload_0; aload_0;
sconst_4; sconst_4;
newarray 10; newarray 10;
putfield_a 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent putfield_a 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_0; sconst_0;
putfield_b_this 52; // byte com/josh/vku2f/PublicKeyCredentialUserEntity.numData putfield_b_this 52; // byte com/josh/vku2f/PublicKeyCredentialUserEntity.numData
return; return;
...@@ -8101,13 +8122,13 @@ ...@@ -8101,13 +8122,13 @@
getfield_a_this 56; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.id getfield_a_this 56; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.id
sconst_0; sconst_0;
sload_3; sload_3;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_1; sconst_1;
baload; baload;
ifne L2; ifne L2;
L1: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent L1: getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_1; sconst_1;
sconst_1; sconst_1;
bastore; bastore;
...@@ -8134,13 +8155,13 @@ ...@@ -8134,13 +8155,13 @@
getfield_a_this 58; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.icon getfield_a_this 58; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.icon
sconst_0; sconst_0;
sload_2; sload_2;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_3; sconst_3;
baload; baload;
ifne L2; ifne L2;
L1: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent L1: getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_3; sconst_3;
sconst_1; sconst_1;
bastore; bastore;
...@@ -8158,7 +8179,7 @@ ...@@ -8158,7 +8179,7 @@
L4: return; L4: return;
.exceptionTable { .exceptionTable {
// start_block end_block handler_block catch_type_index // start_block end_block handler_block catch_type_index
L0 L2 L3 355; L0 L2 L3 356;
} }
} }
...@@ -8173,11 +8194,11 @@ ...@@ -8173,11 +8194,11 @@
sload_2; sload_2;
invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V
putfield_a 53; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.displayName putfield_a 53; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.displayName
getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_2; sconst_2;
baload; baload;
ifne L2; ifne L2;
L1: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent L1: getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_2; sconst_2;
sconst_1; sconst_1;
bastore; bastore;
...@@ -8224,12 +8245,12 @@ ...@@ -8224,12 +8245,12 @@
aload_1; aload_1;
sload_2; sload_2;
invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V invokespecial 185; // com/josh/vku2f/DomString.<init>([BS)V
putfield_a 99; // reference com/josh/vku2f/PublicKeyCredentialEntity.name putfield_a 100; // reference com/josh/vku2f/PublicKeyCredentialEntity.name
getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_0; sconst_0;
baload; baload;
ifne L2; ifne L2;
L1: getfield_a_this 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent L1: getfield_a_this 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
sconst_0; sconst_0;
sconst_1; sconst_1;
bastore; bastore;
...@@ -8286,12 +8307,12 @@ ...@@ -8286,12 +8307,12 @@
.descriptor Ljavacard/security/RandomData; 1.14; .descriptor Ljavacard/security/RandomData; 1.14;
L0: getstatic_a 356; // reference com/josh/vku2f/Random.rng L0: getstatic_a 357; // reference com/josh/vku2f/Random.rng
ifnonnull L2; ifnonnull L2;
L1: sconst_2; L1: sconst_2;
invokestatic 357; // javacard/security/RandomData.getInstance(B)Ljavacard/security/RandomData; invokestatic 358; // javacard/security/RandomData.getInstance(B)Ljavacard/security/RandomData;
putstatic_a 356; // reference com/josh/vku2f/Random.rng putstatic_a 357; // reference com/josh/vku2f/Random.rng
L2: getstatic_a 356; // reference com/josh/vku2f/Random.rng L2: getstatic_a 357; // reference com/josh/vku2f/Random.rng
areturn; areturn;
} }
...@@ -8334,27 +8355,27 @@ ...@@ -8334,27 +8355,27 @@
L0: aload_0; L0: aload_0;
invokespecial 293; // java/lang/Object.<init>()V invokespecial 293; // java/lang/Object.<init>()V
getstatic_a 358; // reference com/josh/vku2f/StoredCredential.randomData getstatic_a 359; // reference com/josh/vku2f/StoredCredential.randomData
ifnonnull L2; ifnonnull L2;
L1: invokestatic 312; // com/josh/vku2f/Random.getInstance()Ljavacard/security/RandomData; L1: invokestatic 313; // com/josh/vku2f/Random.getInstance()Ljavacard/security/RandomData;
putstatic_a 358; // reference com/josh/vku2f/StoredCredential.randomData putstatic_a 359; // reference com/josh/vku2f/StoredCredential.randomData
L2: aload_0; L2: aload_0;
bspush 16; bspush 16;
newarray 11; newarray 11;
putfield_a 49; // reference com/josh/vku2f/StoredCredential.credentialId putfield_a 49; // reference com/josh/vku2f/StoredCredential.credentialId
getstatic_a 358; // reference com/josh/vku2f/StoredCredential.randomData getstatic_a 359; // reference com/josh/vku2f/StoredCredential.randomData
getfield_a_this 49; // reference com/josh/vku2f/StoredCredential.credentialId getfield_a_this 49; // reference com/josh/vku2f/StoredCredential.credentialId
sconst_0; sconst_0;
bspush 16; bspush 16;
invokevirtual 359; // generateData([BSS)V invokevirtual 360; // generateData([BSS)V
aload_0; aload_0;
sconst_4; sconst_4;
newarray 11; newarray 11;
putfield_a 104; // reference com/josh/vku2f/StoredCredential.signingCounter putfield_a 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_0; sconst_0;
putfield_b_this 105; // boolean com/josh/vku2f/StoredCredential.initialised putfield_b_this 106; // boolean com/josh/vku2f/StoredCredential.initialised
sconst_0; sconst_0;
putfield_b_this 106; // boolean com/josh/vku2f/StoredCredential.hmacEnabled putfield_b_this 107; // boolean com/josh/vku2f/StoredCredential.hmacEnabled
return; return;
} }
...@@ -8373,14 +8394,14 @@ ...@@ -8373,14 +8394,14 @@
L0: aload_0; L0: aload_0;
bspush 32; bspush 32;
newarray 11; newarray 11;
putfield_a 107; // reference com/josh/vku2f/StoredCredential.credRandom putfield_a 108; // reference com/josh/vku2f/StoredCredential.credRandom
getstatic_a 358; // reference com/josh/vku2f/StoredCredential.randomData getstatic_a 359; // reference com/josh/vku2f/StoredCredential.randomData
getfield_a_this 107; // reference com/josh/vku2f/StoredCredential.credRandom getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.credRandom
sconst_0; sconst_0;
bspush 32; bspush 32;
invokevirtual 359; // generateData([BSS)V invokevirtual 360; // generateData([BSS)V
sconst_1; sconst_1;
putfield_b_this 106; // boolean com/josh/vku2f/StoredCredential.hmacEnabled putfield_b_this 107; // boolean com/josh/vku2f/StoredCredential.hmacEnabled
sconst_1; sconst_1;
sreturn; sreturn;
} }
...@@ -8412,7 +8433,7 @@ ...@@ -8412,7 +8433,7 @@
.locals 0; .locals 0;
L0: getfield_a_this 51; // reference com/josh/vku2f/StoredCredential.userEntity L0: getfield_a_this 51; // reference com/josh/vku2f/StoredCredential.userEntity
getfield_a 103; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent getfield_a 104; // reference com/josh/vku2f/PublicKeyCredentialUserEntity.dataPresent
areturn; areturn;
} }
...@@ -8426,12 +8447,12 @@ ...@@ -8426,12 +8447,12 @@
L1: sload_1; L1: sload_1;
sconst_1; sconst_1;
if_scmple L5; if_scmple L5;
L2: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L2: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sload_1; sload_1;
baload; baload;
sspush 255; sspush 255;
if_scmpne L4; if_scmpne L4;
L3: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L3: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sload_1; sload_1;
sconst_1; sconst_1;
ssub; ssub;
...@@ -8441,7 +8462,7 @@ ...@@ -8441,7 +8462,7 @@
sadd; sadd;
s2b; s2b;
bastore; bastore;
getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sload_1; sload_1;
sconst_0; sconst_0;
bastore; bastore;
...@@ -8449,35 +8470,35 @@ ...@@ -8449,35 +8470,35 @@
return; return;
L4: sinc 1 -1; L4: sinc 1 -1;
goto L1; goto L1;
L5: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L5: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_0; sconst_0;
baload; baload;
sspush 255; sspush 255;
if_scmpne L10; if_scmpne L10;
L6: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L6: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_1; sconst_1;
baload; baload;
sspush 255; sspush 255;
if_scmpne L10; if_scmpne L10;
L7: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L7: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_2; sconst_2;
baload; baload;
sspush 255; sspush 255;
if_scmpne L10; if_scmpne L10;
L8: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L8: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_3; sconst_3;
baload; baload;
sspush 255; sspush 255;
if_scmpne L10; if_scmpne L10;
L9: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L9: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_0; sconst_0;
sconst_4; sconst_4;
sconst_0; sconst_0;
invokestatic 364; // javacard/framework/Util.arrayFillNonAtomic([BSSB)S invokestatic 365; // javacard/framework/Util.arrayFillNonAtomic([BSSB)S
pop; pop;
invokestatic 268; // javacard/framework/JCSystem.commitTransaction()V invokestatic 268; // javacard/framework/JCSystem.commitTransaction()V
return; return;
L10: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L10: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_3; sconst_3;
dup2; dup2;
baload; baload;
...@@ -8493,12 +8514,12 @@ ...@@ -8493,12 +8514,12 @@
.stack 5; .stack 5;
.locals 0; .locals 0;
L0: getfield_a_this 104; // reference com/josh/vku2f/StoredCredential.signingCounter L0: getfield_a_this 105; // reference com/josh/vku2f/StoredCredential.signingCounter
sconst_0; sconst_0;
aload_1; aload_1;
sload_2; sload_2;
sconst_4; sconst_4;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
sconst_4; sconst_4;
sreturn; sreturn;
...@@ -8513,7 +8534,7 @@ ...@@ -8513,7 +8534,7 @@
aload_1; aload_1;
sload_2; sload_2;
bspush 16; bspush 16;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
aload_1; aload_1;
sload_2; sload_2;
...@@ -8534,7 +8555,7 @@ ...@@ -8534,7 +8555,7 @@
bspush 18; bspush 18;
sadd; sadd;
bspush 16; bspush 16;
invokestatic 354; // javacard/framework/Util.arrayCopy([BS[BSS)S invokestatic 353; // javacard/framework/Util.arrayCopy([BS[BSS)S
pop; pop;
return; return;
} }
...@@ -8578,35 +8599,35 @@ ...@@ -8578,35 +8599,35 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokespecial 365; // com/josh/vku2f/StoredCredential.<init>()V invokespecial 366; // com/josh/vku2f/StoredCredential.<init>()V
aload_0; aload_0;
new 200; // javacard/security/KeyPair new 200; // javacard/security/KeyPair
dup; dup;
sconst_5; sconst_5;
sspush 256; sspush 256;
invokespecial 292; // javacard/security/KeyPair.<init>(BS)V invokespecial 292; // javacard/security/KeyPair.<init>(BS)V
putfield_a 108; // reference com/josh/vku2f/StoredCredential.keyPair putfield_a 109; // reference com/josh/vku2f/StoredCredential.keyPair
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 120; // T_CLASSORINTERFACE javacard/security/ECKey checkcast 0 120; // T_CLASSORINTERFACE javacard/security/ECKey
invokestatic 124; // com/josh/vku2f/KeyParams.sec256r1params(Ljavacard/security/ECKey;)V invokestatic 124; // com/josh/vku2f/KeyParams.sec256r1params(Ljavacard/security/ECKey;)V
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 127; // genKeyPair()V invokevirtual 127; // genKeyPair()V
aload_0; aload_0;
aload_1; aload_1;
invokevirtual 367; // getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity; invokevirtual 368; // getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity;
putfield_a 51; // reference com/josh/vku2f/StoredCredential.userEntity putfield_a 51; // reference com/josh/vku2f/StoredCredential.userEntity
aload_0; aload_0;
aload_1; aload_1;
invokevirtual 368; // getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity; invokevirtual 369; // getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity;
putfield_a 42; // reference com/josh/vku2f/StoredCredential.rpEntity putfield_a 42; // reference com/josh/vku2f/StoredCredential.rpEntity
aload_0; aload_0;
bspush 33; bspush 33;
sconst_0; sconst_0;
invokestatic 194; // javacard/security/Signature.getInstance(BZ)Ljavacard/security/Signature; invokestatic 194; // javacard/security/Signature.getInstance(BZ)Ljavacard/security/Signature;
putfield_a 109; // reference com/josh/vku2f/StoredES256Credential.sig putfield_a 110; // reference com/josh/vku2f/StoredES256Credential.sig
getfield_a_this 109; // reference com/josh/vku2f/StoredES256Credential.sig getfield_a_this 110; // reference com/josh/vku2f/StoredES256Credential.sig
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 238; // getPrivate()Ljavacard/security/PrivateKey; invokevirtual 238; // getPrivate()Ljavacard/security/PrivateKey;
sconst_1; sconst_1;
invokevirtual 261; // init(Ljavacard/security/Key;B)V invokevirtual 261; // init(Ljavacard/security/Key;B)V
...@@ -8618,8 +8639,8 @@ ...@@ -8618,8 +8639,8 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokevirtual 370; // incrementCounter()V invokevirtual 371; // incrementCounter()V
getfield_a_this 109; // reference com/josh/vku2f/StoredES256Credential.sig getfield_a_this 110; // reference com/josh/vku2f/StoredES256Credential.sig
aload_1; aload_1;
sload_2; sload_2;
sload_3; sload_3;
...@@ -8647,15 +8668,15 @@ ...@@ -8647,15 +8668,15 @@
astore_3; astore_3;
L1: bspush 65; L1: bspush 65;
sconst_1; sconst_1;
invokestatic 112; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B invokestatic 377; // javacard/framework/JCSystem.makeTransientByteArray(SB)[B
astore 4; astore 4;
L2: goto L4; L2: goto L4;
L3: astore 5; L3: astore 5;
bspush 65; bspush 65;
newarray 11; newarray 11;
astore 4; astore 4;
L4: getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair L4: getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 361; // T_CLASSORINTERFACE javacard/security/ECPublicKey checkcast 0 361; // T_CLASSORINTERFACE javacard/security/ECPublicKey
aload 4; aload 4;
sconst_0; sconst_0;
...@@ -8664,7 +8685,7 @@ ...@@ -8664,7 +8685,7 @@
aload_0; aload_0;
aload_1; aload_1;
sload_2; sload_2;
invokevirtual 371; // doAttestationCommon([BS)V invokevirtual 372; // doAttestationCommon([BS)V
aload_3; aload_3;
aload_1; aload_1;
sload_2; sload_2;
...@@ -8761,31 +8782,31 @@ ...@@ -8761,31 +8782,31 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokespecial 365; // com/josh/vku2f/StoredCredential.<init>()V invokespecial 366; // com/josh/vku2f/StoredCredential.<init>()V
aload_0; aload_0;
new 200; // javacard/security/KeyPair new 200; // javacard/security/KeyPair
dup; dup;
sconst_2; sconst_2;
sspush 2048; sspush 2048;
invokespecial 292; // javacard/security/KeyPair.<init>(BS)V invokespecial 292; // javacard/security/KeyPair.<init>(BS)V
putfield_a 108; // reference com/josh/vku2f/StoredCredential.keyPair putfield_a 109; // reference com/josh/vku2f/StoredCredential.keyPair
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 127; // genKeyPair()V invokevirtual 127; // genKeyPair()V
aload_0; aload_0;
aload_1; aload_1;
invokevirtual 367; // getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity; invokevirtual 368; // getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity;
putfield_a 51; // reference com/josh/vku2f/StoredCredential.userEntity putfield_a 51; // reference com/josh/vku2f/StoredCredential.userEntity
aload_0; aload_0;
aload_1; aload_1;
invokevirtual 368; // getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity; invokevirtual 369; // getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity;
putfield_a 42; // reference com/josh/vku2f/StoredCredential.rpEntity putfield_a 42; // reference com/josh/vku2f/StoredCredential.rpEntity
aload_0; aload_0;
bspush 44; bspush 44;
sconst_0; sconst_0;
invokestatic 194; // javacard/security/Signature.getInstance(BZ)Ljavacard/security/Signature; invokestatic 194; // javacard/security/Signature.getInstance(BZ)Ljavacard/security/Signature;
putfield_a 110; // reference com/josh/vku2f/StoredPS256Credential.kpSignature putfield_a 111; // reference com/josh/vku2f/StoredPS256Credential.kpSignature
getfield_a_this 110; // reference com/josh/vku2f/StoredPS256Credential.kpSignature getfield_a_this 111; // reference com/josh/vku2f/StoredPS256Credential.kpSignature
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 238; // getPrivate()Ljavacard/security/PrivateKey; invokevirtual 238; // getPrivate()Ljavacard/security/PrivateKey;
sconst_1; sconst_1;
invokevirtual 261; // init(Ljavacard/security/Key;B)V invokevirtual 261; // init(Ljavacard/security/Key;B)V
...@@ -8797,8 +8818,8 @@ ...@@ -8797,8 +8818,8 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokevirtual 373; // incrementCounter()V invokevirtual 374; // incrementCounter()V
getfield_a_this 110; // reference com/josh/vku2f/StoredPS256Credential.kpSignature getfield_a_this 111; // reference com/josh/vku2f/StoredPS256Credential.kpSignature
aload_1; aload_1;
sload_2; sload_2;
sload_3; sload_3;
...@@ -8827,7 +8848,7 @@ ...@@ -8827,7 +8848,7 @@
aload_0; aload_0;
aload_1; aload_1;
sload_2; sload_2;
invokevirtual 374; // doAttestationCommon([BS)V invokevirtual 375; // doAttestationCommon([BS)V
aload_3; aload_3;
aload_1; aload_1;
sload_2; sload_2;
...@@ -8863,12 +8884,12 @@ ...@@ -8863,12 +8884,12 @@
sspush 256; sspush 256;
invokevirtual 227; // startByteString(S)S invokevirtual 227; // startByteString(S)S
sstore 4; sstore 4;
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 375; // T_CLASSORINTERFACE javacard/security/RSAPublicKey checkcast 0 376; // T_CLASSORINTERFACE javacard/security/RSAPublicKey
aload_1; aload_1;
sload 4; sload 4;
invokeinterface 3 375 5; // javacard/security/RSAPublicKey invokeinterface 3 376 5; // javacard/security/RSAPublicKey
pop; pop;
aload_3; aload_3;
sconst_1; sconst_1;
...@@ -8878,12 +8899,12 @@ ...@@ -8878,12 +8899,12 @@
sconst_3; sconst_3;
invokevirtual 227; // startByteString(S)S invokevirtual 227; // startByteString(S)S
sstore 4; sstore 4;
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 375; // T_CLASSORINTERFACE javacard/security/RSAPublicKey checkcast 0 376; // T_CLASSORINTERFACE javacard/security/RSAPublicKey
aload_1; aload_1;
sload 4; sload 4;
invokeinterface 3 375 4; // javacard/security/RSAPublicKey invokeinterface 3 376 4; // javacard/security/RSAPublicKey
pop; pop;
sspush 305; sspush 305;
sreturn; sreturn;
...@@ -8919,34 +8940,34 @@ ...@@ -8919,34 +8940,34 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokespecial 365; // com/josh/vku2f/StoredCredential.<init>()V invokespecial 366; // com/josh/vku2f/StoredCredential.<init>()V
aload_0; aload_0;
new 200; // javacard/security/KeyPair new 200; // javacard/security/KeyPair
dup; dup;
sconst_2; sconst_2;
sspush 2048; sspush 2048;
invokespecial 292; // javacard/security/KeyPair.<init>(BS)V invokespecial 292; // javacard/security/KeyPair.<init>(BS)V
putfield_a 108; // reference com/josh/vku2f/StoredCredential.keyPair putfield_a 109; // reference com/josh/vku2f/StoredCredential.keyPair
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 127; // genKeyPair()V invokevirtual 127; // genKeyPair()V
aload_0; aload_0;
aload_1; aload_1;
invokevirtual 367; // getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity; invokevirtual 368; // getUser()Lcom/josh/vku2f/PublicKeyCredentialUserEntity;
putfield_a 51; // reference com/josh/vku2f/StoredCredential.userEntity putfield_a 51; // reference com/josh/vku2f/StoredCredential.userEntity
aload_0; aload_0;
aload_1; aload_1;
invokevirtual 368; // getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity; invokevirtual 369; // getRp()Lcom/josh/vku2f/PublicKeyCredentialRpEntity;
putfield_a 42; // reference com/josh/vku2f/StoredCredential.rpEntity putfield_a 42; // reference com/josh/vku2f/StoredCredential.rpEntity
aload_0; aload_0;
bspush 10; bspush 10;
sconst_0; sconst_0;
invokestatic 318; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher; invokestatic 319; // javacardx/crypto/Cipher.getInstance(BZ)Ljavacardx/crypto/Cipher;
putfield_a 111; // reference com/josh/vku2f/StoredRS256Credential.kpSignature putfield_a 112; // reference com/josh/vku2f/StoredRS256Credential.kpSignature
getfield_a_this 111; // reference com/josh/vku2f/StoredRS256Credential.kpSignature getfield_a_this 112; // reference com/josh/vku2f/StoredRS256Credential.kpSignature
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 238; // getPrivate()Ljavacard/security/PrivateKey; invokevirtual 238; // getPrivate()Ljavacard/security/PrivateKey;
sconst_2; sconst_2;
invokevirtual 377; // init(Ljavacard/security/Key;B)V invokevirtual 378; // init(Ljavacard/security/Key;B)V
return; return;
} }
...@@ -8955,14 +8976,14 @@ ...@@ -8955,14 +8976,14 @@
.locals 0; .locals 0;
L0: aload_0; L0: aload_0;
invokevirtual 378; // incrementCounter()V invokevirtual 379; // incrementCounter()V
getfield_a_this 111; // reference com/josh/vku2f/StoredRS256Credential.kpSignature getfield_a_this 112; // reference com/josh/vku2f/StoredRS256Credential.kpSignature
aload_1; aload_1;
sload_2; sload_2;
sload_3; sload_3;
aload 4; aload 4;
sload 5; sload 5;
invokevirtual 324; // doFinal([BSS[BS)S invokevirtual 325; // doFinal([BSS[BS)S
sreturn; sreturn;
} }
...@@ -8985,7 +9006,7 @@ ...@@ -8985,7 +9006,7 @@
aload_0; aload_0;
aload_1; aload_1;
sload_2; sload_2;
invokevirtual 379; // doAttestationCommon([BS)V invokevirtual 380; // doAttestationCommon([BS)V
aload_3; aload_3;
aload_1; aload_1;
sload_2; sload_2;
...@@ -9011,7 +9032,7 @@ ...@@ -9011,7 +9032,7 @@
pop; pop;
aload_3; aload_3;
sspush 256; sspush 256;
invokevirtual 380; // encodeNegativeUInt16(S)S invokevirtual 381; // encodeNegativeUInt16(S)S
pop; pop;
aload_3; aload_3;
sconst_0; sconst_0;
...@@ -9021,12 +9042,12 @@ ...@@ -9021,12 +9042,12 @@
sspush 256; sspush 256;
invokevirtual 227; // startByteString(S)S invokevirtual 227; // startByteString(S)S
sstore 4; sstore 4;
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 375; // T_CLASSORINTERFACE javacard/security/RSAPublicKey checkcast 0 376; // T_CLASSORINTERFACE javacard/security/RSAPublicKey
aload_1; aload_1;
sload 4; sload 4;
invokeinterface 3 375 5; // javacard/security/RSAPublicKey invokeinterface 3 376 5; // javacard/security/RSAPublicKey
pop; pop;
aload_3; aload_3;
sconst_1; sconst_1;
...@@ -9036,12 +9057,12 @@ ...@@ -9036,12 +9057,12 @@
sconst_3; sconst_3;
invokevirtual 227; // startByteString(S)S invokevirtual 227; // startByteString(S)S
sstore 4; sstore 4;
getfield_a_this 108; // reference com/josh/vku2f/StoredCredential.keyPair getfield_a_this 109; // reference com/josh/vku2f/StoredCredential.keyPair
invokevirtual 366; // getPublic()Ljavacard/security/PublicKey; invokevirtual 364; // getPublic()Ljavacard/security/PublicKey;
checkcast 0 375; // T_CLASSORINTERFACE javacard/security/RSAPublicKey checkcast 0 376; // T_CLASSORINTERFACE javacard/security/RSAPublicKey
aload_1; aload_1;
sload 4; sload 4;
invokeinterface 3 375 4; // javacard/security/RSAPublicKey invokeinterface 3 376 4; // javacard/security/RSAPublicKey
pop; pop;
sspush 306; sspush 306;
sreturn; sreturn;
......
...@@ -19,7 +19,7 @@ public class IDSecret { ...@@ -19,7 +19,7 @@ public class IDSecret {
private final byte[] RxRp = new byte[4]; private final byte[] RxRp = new byte[4];
public final byte[] PuKp = new byte[65]; public final byte[] PuKp = new byte[65];
public final byte[] sharedSecret = new byte[20]; public final byte[] sharedSecret = new byte[20];
public final byte[] aesRawKey = new byte[32]; public final byte[] hashedSharedSecret = new byte[32];
public final byte[] Cx = new byte[16]; public final byte[] Cx = new byte[16];
public final byte[] encryptedCx = new byte[16]; public final byte[] encryptedCx = new byte[16];
public final byte[] hmac = new byte[32]; public final byte[] hmac = new byte[32];
...@@ -41,7 +41,7 @@ public class IDSecret { ...@@ -41,7 +41,7 @@ public class IDSecret {
Util.arrayFill(PuKp, (short)1, (byte)(PuKp.length-1), (byte)0); Util.arrayFill(PuKp, (short)1, (byte)(PuKp.length-1), (byte)0);
Util.arrayFill(sharedSecret, (short)0, (byte)sharedSecret.length, (byte)0); Util.arrayFill(sharedSecret, (short)0, (byte)sharedSecret.length, (byte)0);
Util.arrayFill(aesRawKey, (short)0, (byte)aesRawKey.length, (byte)0); Util.arrayFill(hashedSharedSecret, (short)0, (byte) hashedSharedSecret.length, (byte)0);
Random.getInstance().nextBytes(Cx, (short)0, (short)Cx.length); Random.getInstance().nextBytes(Cx, (short)0, (short)Cx.length);
Util.arrayFill(encryptedCx, (short)0, (byte)encryptedCx.length, (byte)0); Util.arrayFill(encryptedCx, (short)0, (byte)encryptedCx.length, (byte)0);
Util.arrayFill(hmac, (short)0, (byte)hmac.length, (byte)0); Util.arrayFill(hmac, (short)0, (byte)hmac.length, (byte)0);
...@@ -63,8 +63,8 @@ public class IDSecret { ...@@ -63,8 +63,8 @@ public class IDSecret {
} }
public void initAesKey(){ public void initAesKey(){
sha256.doFinal(sharedSecret, (short)0, (short)20, aesRawKey, (short)0); sha256.doFinal(sharedSecret, (short)0, (short)20, hashedSharedSecret, (short)0);
aesKey.setKey(aesRawKey, (short)0); aesKey.setKey(hashedSharedSecret, (short)0);
aesEncrypt.init(aesKey, Cipher.MODE_ENCRYPT, IV_ZERO_AES, (short)0, (short)IV_ZERO_AES.length); aesEncrypt.init(aesKey, Cipher.MODE_ENCRYPT, IV_ZERO_AES, (short)0, (short)IV_ZERO_AES.length);
aesDecrypt.init(aesKey, Cipher.MODE_DECRYPT, IV_ZERO_AES, (short)0, (short)IV_ZERO_AES.length); aesDecrypt.init(aesKey, Cipher.MODE_DECRYPT, IV_ZERO_AES, (short)0, (short)IV_ZERO_AES.length);
} }
...@@ -90,7 +90,7 @@ public class IDSecret { ...@@ -90,7 +90,7 @@ public class IDSecret {
aesEncrypt.update(scratch, (short)0, (short)16, outputBuffer, outputOffset); aesEncrypt.update(scratch, (short)0, (short)16, outputBuffer, outputOffset);
aesEncrypt.doFinal(scratch, (short)16, (short)16 , outputBuffer, (short)(outputOffset+16) ); aesEncrypt.doFinal(scratch, (short)16, (short)16 , outputBuffer, (short)(outputOffset+16) );
Util.arrayCopy(scratch, (short)0, hmac, (short)0, (short)32 ); Util.arrayCopy(outputBuffer, (short)0, hmac, (short)0, (short)32 );
} }
/** /**
...@@ -106,7 +106,7 @@ public class IDSecret { ...@@ -106,7 +106,7 @@ public class IDSecret {
encoder.encodeByteString(getRxRp(), (short)0, (short)RxRp.length); encoder.encodeByteString(getRxRp(), (short)0, (short)RxRp.length);
encoder.encodeByteString(PuKp, (short)0, (short)PuKp.length); encoder.encodeByteString(PuKp, (short)0, (short)PuKp.length);
encoder.encodeByteString(sharedSecret, (short)0, (short)sharedSecret.length); encoder.encodeByteString(sharedSecret, (short)0, (short)sharedSecret.length);
encoder.encodeByteString(aesRawKey, (short)0 , (short)aesRawKey.length); encoder.encodeByteString(hashedSharedSecret, (short)0 , (short) hashedSharedSecret.length);
encoder.encodeByteString(Cx, (short)0, (short)Cx.length); encoder.encodeByteString(Cx, (short)0, (short)Cx.length);
encoder.encodeByteString(encryptedCx, (short)0, (short)encryptedCx.length); encoder.encodeByteString(encryptedCx, (short)0, (short)encryptedCx.length);
encoder.encodeByteString(hmac, (short)0, (short)hmac.length ); encoder.encodeByteString(hmac, (short)0, (short)hmac.length );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment