Skip to content

Commit f369620

Browse files
committed
test coverage for Edwards key public_point() method
1 parent c983649 commit f369620

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/ecdsa/test_eddsa.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,22 @@ def test_add_wrong_point_type(self):
259259
self.assertIn("different curve", str(e.exception))
260260

261261

262+
def test_generate_with_point():
263+
x1 = int(
264+
"427838232691226969392843410947554224151809796397784248136826"
265+
"78720006717057747"
266+
)
267+
y1 = int(
268+
"463168356949264781694283940034751631413079938662562256157830"
269+
"33603165251855960"
270+
)
271+
p = PointEdwards(curve_ed25519, x1, y1, 1, x1 * y1)
272+
273+
pk = PublicKey(generator_ed25519, b"0" * 32, public_point=p)
274+
275+
assert pk.public_point() == p
276+
277+
262278
def test_ed25519_mul_to_order_min_1():
263279
x1 = int(
264280
"427838232691226969392843410947554224151809796397784248136826"

0 commit comments

Comments
 (0)