Saturday, October 1, 2022
HomeBitcoinpython - The best way to add elliptic curve factors from a...

python – The best way to add elliptic curve factors from a file?


i am only a tech beginner studying how ec cryptography works and stumbled into an issue with my python code

i am testing primary elliptic curve operations like including factors, a number of by G and so forth, to illustrate i’ve

Ax = 0xbc46aa75e5948daa08123b36f2080d234aac274bf62fca8f9eb0aadf829c744a
Ay = 0xe5f28c3a044b1cac54a9b4bf719f02dfae93a0bae73832301e786104f43255a5
A = (Ax,Ay)

f = open('B-coordinates.txt', 'r')
knowledge = f.learn()     
f.shut()     
print (knowledge)            
B = 'knowledge'

there B-coordinates.txt comprises traces like
(0xe7e6bd3424a1e92abb45846c82d570f0596850661d1c952f9fe3564567d9b9e8,0x59c9e0bba945e45f40c0aa58379a3cb6a5a2283993e90c58654af4920e37f5)

then i carry out primary level addition A+B add(A,B)

so due to B = ‘knowledge’ i clearly have this error

TypeError: unsupported operand kind(s) for -: 'int' and 'str'

and if i add int(knowledge) > Error invalid literal for int() with base 10: as a result of letters in enter (i.e. in factors coordinates).

so my query is, please can somebody educated in python and elliptic curve calculations inform me the best way to add the coordinates of a degree in order to bypass these int issues when extracting traces from a file into .py? I might be very grateful for the reply! I have been attempting to determine the best way to do it proper for a lot of hours now, and perhaps simply goofing off, however please I will respect any hints

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments