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()     
print (knowledge)            
B = 'knowledge'

there B-coordinates.txt comprises traces like

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



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments