Skip to content

Instantly share code, notes, and snippets.

@VulBusters
Created August 9, 2023 07:56
Show Gist options
  • Save VulBusters/fc0be8740c4a330c160eb7b23421ba2c to your computer and use it in GitHub Desktop.
Save VulBusters/fc0be8740c4a330c160eb7b23421ba2c to your computer and use it in GitHub Desktop.
def get_shared_secret(self, pub_key) -> bytes:
client_pub_key_der = serialization.load_der_public_key(bytes.fromhex(pub_key))
return self.serv_priv_key.exchange(ec.ECDH(), client_pub_key_der)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment