def __init__(self, app_param, chal_param, data):
        self.app_param = app_param
        self.chal_param = chal_param
        self.data = data

        if byte2int(data[0]) != 0x05:
            raise ValueError("Invalid data: %r" % (data,))

        data = data[1:]
        self.pub_key = data[:self.PUBKEY_LEN]

        data = data[self.PUBKEY_LEN:]

        kh_len = byte2int(data[0])
        data = data[1:]

        self.key_handle = data[:kh_len]
        data = data[kh_len:]

        self.certificate = self._fixsig(certificate_from_der(data))
        self.signature = data[len(self.certificate.public_bytes(Encoding.DER)):]
dataset/ETHPy150Open Yubico/python-u2flib-server/u2flib_server/u2f_v2.py/RawRegistrationResponse.__init__/original