call genKeyPair as soon as possible to avoid timeouts on first installation ever on JCOP3 cards. Apparently no "wait" TPDUs are sent when the card does its very first ECC key generation
This commit is contained in:
parent
1f9df5503b
commit
8799ed6dc7
|
@ -149,6 +149,7 @@ public class KeycardApplet extends Applet {
|
|||
public KeycardApplet(byte[] bArray, short bOffset, byte bLength) {
|
||||
crypto = new Crypto();
|
||||
secp256k1 = new SECP256k1(crypto);
|
||||
secureChannel = new SecureChannel(PAIRING_MAX_CLIENT_COUNT, crypto, secp256k1);
|
||||
|
||||
uid = new byte[UID_LENGTH];
|
||||
crypto.random.generateData(uid, (short) 0, UID_LENGTH);
|
||||
|
@ -173,7 +174,6 @@ public class KeycardApplet extends Applet {
|
|||
resetCurveParameters();
|
||||
|
||||
signature = Signature.getInstance(Signature.ALG_ECDSA_SHA_256, false);
|
||||
secureChannel = new SecureChannel(PAIRING_MAX_CLIENT_COUNT, crypto, secp256k1);
|
||||
|
||||
duplicationEncKey = new byte[(short)(KeyBuilder.LENGTH_AES_256/8)];
|
||||
expectedEntropy = -1;
|
||||
|
|
Loading…
Reference in New Issue