Skip to content

Commit 67c7764

Browse files
committed
use PointJacobi for ECDH [test]
this is a crude way to use the new features in python-ecdsa, will need to be reworked later
1 parent 322f5ff commit 67c7764

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tlslite/utils/ecc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ def decodeX962Point(data, curve=ecdsa.NIST256p):
1616
bytelength = getPointByteSize(curve)
1717
xCoord = bytesToNumber(parser.getFixBytes(bytelength))
1818
yCoord = bytesToNumber(parser.getFixBytes(bytelength))
19-
return ecdsa.ellipticcurve.Point(curve.curve, xCoord, yCoord)
19+
assert curve.curve.contains_point(xCoord, yCoord)
20+
return ecdsa.ellipticcurve.PointJacobi(curve.curve, xCoord, yCoord, 1)
2021

2122
def encodeX962Point(point):
2223
"""Encode a point in X9.62 format"""

0 commit comments

Comments
 (0)