private void sendPublicKey(short crt, APDU apdu) {
        RSAPublicKey key = null;
        short len, l;

        switch(crt) {
            case (short)0xb600:
                key = (RSAPublicKey)keySign.getPublic();
                break;
            case (short)0xb800:
                key = (RSAPublicKey)keyDecrypt.getPublic();
                break;
            case (short)0xa400:
                key = (RSAPublicKey)keyAuth.getPublic();
                break;
            default:
                ISOException.throwIt(ISO7816.SW_DATA_INVALID);
        }
        tmpData[0] = (byte)0x7f;
        tmpData[1] = (byte)0x49;
        tmpData[2] = (byte)0x82;
        tmpData[5] = (byte)0x81;
        len = 6;
//        len = 5;
        l = key.getModulus(tmpData, (short)(len + 3));
        tmpData[len++] = (byte)0x82;
        Util.setShort(tmpData, len, l);
        len += 2;
//        tmpData[len++] = (byte)l;
        len += l;
        tmpData[len++] = (byte)0x82;
        l = key.getExponent(tmpData, (short)(len + 1));
        tmpData[len++] = (byte)l;
        len += l;
        Util.setShort(tmpData, (short)3, (short)(len - 5));
//        tmpData[3] = (byte)(len - 4);
        sendData(apdu, tmpData, len);
    }