tlslite.utils.x25519 module¶
Handling X25519 and X448 curve based key agreement protocol.
-
tlslite.utils.x25519.
cswap
(swap, x_2, x_3)¶ Conditional swap function.
-
tlslite.utils.x25519.
decodeScalar22519
(k)¶ Function to decode the private K parameter of the x25519 function.
-
tlslite.utils.x25519.
decodeScalar448
(k)¶ Function to decode the private K parameter of the X448 function.
-
tlslite.utils.x25519.
decodeUCoordinate
(u, bits)¶ Function to decode the public U coordinate of X25519-family curves.
-
tlslite.utils.x25519.
x25519
(k, u)¶ Perform point multiplication on X25519 curve.
Parameters: - k (bytearray) – random secret value (multiplier), should be 32 byte long
- u (bytearray) – curve generator or the other party key share
Return type: bytearray
-
tlslite.utils.x25519.
x448
(k, u)¶ Perform point multiplication on X448 curve.
Parameters: - k (bytearray) – random secret value (multiplier), should be 56 bytes long
- u (bytearray) – curve generator or the other party key share
Return type: bytearray