public static byte[][] readCpabeData(InputStream is) throws IOException {
        int i, len;

        byte[][] res = new byte[3][];
        byte[] mBuf, aesBuf, cphBuf;

        /* read m buf */
        len = 0;
        for (i = 3; i >= 0; i--) {
            len |= is.read() << (i * 8);
        }
        mBuf = new byte[len];
        is.read(mBuf);
        /* read aes buf */
        len = 0;
        for (i = 3; i >= 0; i--) {
            len |= is.read() << (i * 8);
        }
        aesBuf = new byte[len];
        is.read(aesBuf);

        /* read cph buf */
        len = 0;
        for (i = 3; i >= 0; i--) {
            len |= is.read() << (i * 8);
        }
        cphBuf = new byte[len];
        is.read(cphBuf);

        is.close();
        res[0] = aesBuf;
        res[1] = cphBuf;
        res[2] = mBuf;
        return res;
    }