Elliptic Curve: Elliptic Curve defined by y^2 = x^3 + 21*x + 4 over Finite Field of size 23
First 6 points: [(0 : 1 : 0), (2 : 13 : 1), (6 : 22 : 1), (11 : 18 : 1), (14 : 12 : 1)]
P + Q = (11 : 18 : 1)
Coordinates: (11, 18))
' Check: Verify that R lies on the curve by substituting coordinates into the equation.\nLet x=11\nx^3 +21x+4\n1331-21*11+4=1566\n1566%23=2\ny^2=18^2=324\n324%23=2\n(11,18) Lies on the curve'
5 * P = (2 : 13 : 1)
Coordinates: (2, 13))
3 * P = (10 : 15 : 1)
Coordinates: (10, 15))
Private key: 1234567
Public key: (5 : 21 : 1)
Ephemeral public key R: (10 : 15 : 1)
Encrypted message: e}{y|
Decrypted message: HELLO
=== Complete ECIES Example ===
Alice's public key: (7 : 11 : 1)
Original message: CAT
Bob sends: R=(0 : 1 : 1), encrypted message
Alice computes shared secret: (7 : 11 : 1)
Bob's shared secret was: (7 : 11 : 1)
Secrets match: True
Elliptic Curve: Elliptic Curve defined by y^2 = x^3 + x + 3 over Finite Field of size 37
Private key: 14451642
Public key: (6 : 22 : 1)
Ephemeral public key R: (35 : 17 : 1)
Encrypted message: BWAR[DQ
Decrypted message: saraouf