public void openImplicitChannel() throws CardException {
		if (scpVersion == SCP_02_0A || scpVersion == SCP_02_0B || scpVersion == SCP_02_1A || scpVersion == SCP_02_1B) {
			CommandAPDU getData = new CommandAPDU(CLA_GP, GET_DATA, 0, 0xE0);
			ResponseAPDU data = channel.transmit(getData);

			byte[] result = data.getBytes();
			int keySet = 0;
			if (result.length > 6)
				keySet = result[result[0] != 0 ? 5 : 6];

			KeySet staticKeys = keys.get(keySet);
			if (staticKeys == null) {
				throw new IllegalStateException("Key set " + keySet + " not defined.");
			}

			CommandAPDU getSeq = new CommandAPDU(CLA_GP, GET_DATA, 0, 0xC1);
			ResponseAPDU seq = channel.transmit(getSeq);
			result = seq.getBytes();
			short sw = (short) seq.getSW();
			if (sw != ISO7816.SW_NO_ERROR) {
				throw new CardException("Reading sequence counter failed. SW: " + GPUtils.swToString(sw));
			}

			try {
				KeySet sessionKeys = deriveSessionKeysSCP02(staticKeys, result[2], result[3], true);
				byte[] temp = GPUtils.pad80(sdAID.getBytes());

				byte[] icv = GPUtils.mac_des_3des(sessionKeys.keys[1], temp, new byte[8]);
				byte[] ricv = GPUtils.mac_des_3des(sessionKeys.keys[3], temp, new byte[8]);
				wrapper = new SecureChannelWrapper(sessionKeys, scpVersion, APDU_MAC, icv, ricv);
			} catch (Exception e) {
				throw new CardException("Implicit secure channel initialization failed.", e);
			}
		}
		
	}