'High level function. Compute public key with the local private key
and returns a 512bits shared key'

def get_ecdh_key(self, pubkey):

    (curve, pubkey_x, pubkey_y, i) = ECC._decode_pubkey(pubkey)
    if (curve != self.curve):
        raise Exception('ECC    keys    must    be    from    the    same    curve    !')
    return sha512(self.raw_get_ecdh_key(pubkey_x, pubkey_y)).digest()
