Use better method for determining keysize in bytes (thanks @cygnusv)

pull/127/head
tuxxy 2018-04-24 16:52:09 -06:00
parent 6c2dd86522
commit 92ec0f2a8c
1 changed files with 1 additions and 3 deletions

View File

@ -41,6 +41,4 @@ def kdf(ecpoint, key_length):
def get_curve_keysize_bytes(curve):
# We use the ceil operation to fit all bytes on curve sizes where eight is
# not evenly divisible.
return int(math.ceil(curve.key_size / 8.00))
return (curve.key_size + 7) // 8