• Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
Wednesday, March 22, 2023
No Result
View All Result
AltCoin 247
  • Home
  • Cryptocurrency
  • Bitcoin
  • DEFI
  • Regulation
  • Litecoin
  • Dogecoin
  • Altcoin
  • Home
  • Cryptocurrency
  • Bitcoin
  • DEFI
  • Regulation
  • Litecoin
  • Dogecoin
  • Altcoin
No Result
View All Result
AltCoin 247
No Result
View All Result
Home Bitcoin

python – How to add elliptic curve points from a file?

by altcoin247
September 27, 2022
in Bitcoin
0
currencies – How are crypto prices calculated by an exchange? Example game in a spreadsheet to illustrate


i’m just a tech newbie learning how ec cryptography works and stumbled into a problem with my python code

i’m testing basic elliptic curve operations like adding points, multiple by G etc, let’s say i have

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

f = open('B-coordinates.txt', 'r')
data = f.read()     
f.close()     
print (data)            
B = 'data'

there B-coordinates.txt contains lines like
(0xe7e6bd3424a1e92abb45846c82d570f0596850661d1c952f9fe3564567d9b9e8,0x59c9e0bba945e45f40c0aa58379a3cb6a5a2283993e90c58654af4920e37f5)

then i perform basic point addition A+B add(A,B)

so because of B = ‘data’ i obviously have this error

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

and if i add int(data) > Error invalid literal for int() with base 10: because letters in input (i.e. in points coordinates).

so my question is, please can someone knowledgeable in python and elliptic curve calculations tell me how to add the coordinates of a point so as to bypass these int problems when extracting lines from a file into .py? I will be very grateful for the answer! I’ve been trying to figure out how to do it right for many hours now, and maybe just goofing off, but please I’ll appreciate any hints



Source_link

altcoin247

altcoin247

Next Post
Kitsumon launches NFT land sale in partnership with top NFT and Gaming

Kitsumon launches NFT land sale in partnership with top NFT and Gaming

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Could The United States Ban Crypto Due To National Security Concerns?

Could The United States Ban Crypto Due To National Security Concerns?

3 months ago
Ethereum Name Service (ENS) Breaks Out, Can Price Hit $20?

Ethereum Name Service (ENS) Breaks Out, Can Price Hit $20?

6 months ago

Popular News

  • As Pound Crumbles, a Third of UK Citizens Now Own Cryptocurrency

    As Pound Crumbles, a Third of UK Citizens Now Own Cryptocurrency

    0 shares
    Share 0 Tweet 0
  • How Crypto Exchange Can Revolutionize Businesses

    0 shares
    Share 0 Tweet 0
  • Das Blockmagazin ist da! – Der Altcoinspekulant

    0 shares
    Share 0 Tweet 0
  • Dogecoin (DOGE) Price Prediction 2025-2030: What does 2023 have in store for DOGE traders?

    0 shares
    Share 0 Tweet 0
  • How Does Uniglo (GLO) Manage To Have A 35% Price Spike Unlike Fantom (FTM) And Dogecoin (DOGE)?

    0 shares
    Share 0 Tweet 0
AltCoin 247

Welcome to Altcoin247 The goal of Altcoin247 is to give you the absolute best news sources for any topic! Our topics are carefully curated and constantly updated as we know the web moves fast so we try to as well.

Category

  • Altcoin
  • Bitcoin
  • Cryptocurrency
  • DEFI
  • Dogecoin
  • Litecoin
  • Regulation

Site Links

  • Home
  • About Us
  • Contact Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions

Recent Posts

  • Litecoin: On LTC’s underperformance, upcoming halving, and block readiness
  • Bitcoin critic Trump facing indictment after calling for protests

Copyright © 2022 Altcoin247.net | All Rights Reserved.

No Result
View All Result
  • Home
  • Cryptocurrency
  • Bitcoin
  • DEFI
  • Regulation
  • Litecoin
  • Dogecoin
  • Altcoin

Copyright © 2022 Altcoin247.net | All Rights Reserved.

What Are Cookies
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT