Fix bugs in secio implementation

This commit is contained in:
Alex Stokes
2019-08-24 19:57:56 +02:00
parent 228032805a
commit b8c0ef9ebb
3 changed files with 29 additions and 23 deletions

View File

@ -23,6 +23,6 @@ def create_ephemeral_key_pair(curve_type: str) -> Tuple[PublicKey, SharedKeyGene
private_key = cast(ECCPrivateKey, key_pair.private_key)
secret_point = curve_point * private_key.impl.d
byte_size = secret_point.size_in_bytes()
return secret_point.x.to_bytes(byte_size, byteorder="big")
return secret_point.x.to_bytes(byte_size)
return key_pair.public_key, _key_exchange