25 lines
812 B
Python
25 lines
812 B
Python
import ecc_rs
|
|
|
|
# Example point coordinates for P1 and P2 as tuples (x1, y1) and (x2, y2)
|
|
p1 = (
|
|
"1234567890123456789012345678901234567890123456789012345678901234",
|
|
"9876543210987654321098765432109876543210987654321098765432109876",
|
|
)
|
|
p2 = (
|
|
"2234567890123456789012345678901234567890123456789012345678901234",
|
|
"2876543210987654321098765432109876543210987654321098765432109876",
|
|
)
|
|
print(ecc_rs.__all__)
|
|
|
|
# Add the two points
|
|
result_x, result_y = ecc_rs.add(p1, p2)
|
|
print(f"Resulting Point: x = {result_x}, y = {result_y}")
|
|
|
|
# Convert the result to integers if needed
|
|
result_x_int = int(result_x)
|
|
result_y_int = int(result_y)
|
|
print(f"Resulting Point as integers: x = {result_x_int}, y = {result_y_int}")
|
|
|
|
result = ecc_rs.multiply(p1, "2")
|
|
print(f"Resulting Point: x = {result[0]}, y = {result[1]}")
|