diff --git a/src/main/java/im/status/keycard/KeycardApplet.java b/src/main/java/im/status/keycard/KeycardApplet.java index 1d7151e..c00e0fc 100644 --- a/src/main/java/im/status/keycard/KeycardApplet.java +++ b/src/main/java/im/status/keycard/KeycardApplet.java @@ -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;