def check_key(self, privkey, pubkey):
        curve, pubkey_x, pubkey_y, i = ECC._decode_pubkey(pubkey)
        if privkey is None:
            raw_privkey = None
            curve2 = curve
        else:
            curve2, raw_privkey, i = ECC._decode_privkey(privkey)
        if curve != curve2:
            raise Exception("Bad public and private key")
        return self.raw_check_key(raw_privkey, pubkey_x, pubkey_y, curve)
Check the public key and the private key.
dataset/ETHPy150Open Anenome/Bitlaw/src/bitlawui/pyelliptic/ecc.py/ECC.check_key