• About
  • FAQ
  • Privacy Policy
  • Support Forum
  • Disclaimer
  • Contact Us
Newsletter
Token Alytics
  • Home
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Defi
  • Ripple
  • Ethereum
  • Metaverse
No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Defi
  • Ripple
  • Ethereum
  • Metaverse
No Result
View All Result
Token Alytics
No Result
View All Result
Home Bitcoin

message signing – Does Bitcoin Core Validate ECDSA Signature Part r Utilizing Mod N?

thecryptogoblin by thecryptogoblin
October 21, 2024
in Bitcoin
0
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


Within the e-book Programming Bitcoin (2019) by Jimmy Music (pg’s 61-72) the ECDSA signing/verification process for message hash z, personal/public key pair (e, P), generator level G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8), elliptic curve cyclic group order

N = || = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141, area order p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F, and ephemeral personal key ok is outlined by :

  1. Signature (r, s) created as follows :
    r = x coordinate of the purpose R = kG (so r is within the vary [0, p – 1]),
    s = (z + re) / ok mod N (so s is in vary [0, N – 1])

  2. Signature (r, s) is validated as follows :
    Calculate the purpose Q = (z/s)G + (r/s)P.
    (r, s) is legitimate if x coordinate of Q equals r

That is carried out within the e-book code at :
https://github.com/jimmysong/programmingbitcoin/blob/grasp/code-ch13/ecc.py
within the strategies PrivateKey.signal and S256Point.confirm.

Nonetheless in different sources, eg :
https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
https://andrea.corbellini.title/2015/05/30/elliptic-curve-cryptography-ecdh-and-ecdsa/
https://www.secg.org/sec1-v2.pdf

the algorithm is barely completely different :

  1. r is taken to be mod N (so r is within the vary [0, N – 1]),

  2. (r, s) is taken into account legitimate if (x coordinate of Q mod N) equals r

My query is which method does Bitcoin itself undertake ?

If Bitcoin adopts the latter method then if we signal as in Jimmy’s e-book, and if the x coordinate of R is within the vary [N, p – 1], which is feasible as N < p, then our r worth is within the vary [N, p – 1]. Nonetheless then, on validation utilizing the second method we compute (x coordinate of Q mod N), which should lie within the vary [0, N – 1] and thus it could actually by no means equal r, and the validation fails.

The chance of acquiring the x coord of R within the vary [N, p – 1] may be very small as N is proportionately very near p, nevertheless is it good apply in Bitcoin programming to imagine this could by no means occur ?

Related articles

Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

June 20, 2025
Circle Shares Soar 33% As Trump Urges GENIUS Act Approval

Circle Shares Soar 33% As Trump Urges GENIUS Act Approval

June 20, 2025


Within the e-book Programming Bitcoin (2019) by Jimmy Music (pg’s 61-72) the ECDSA signing/verification process for message hash z, personal/public key pair (e, P), generator level G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798,
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8), elliptic curve cyclic group order

N = || = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141, area order p = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F, and ephemeral personal key ok is outlined by :

  1. Signature (r, s) created as follows :
    r = x coordinate of the purpose R = kG (so r is within the vary [0, p – 1]),
    s = (z + re) / ok mod N (so s is in vary [0, N – 1])

  2. Signature (r, s) is validated as follows :
    Calculate the purpose Q = (z/s)G + (r/s)P.
    (r, s) is legitimate if x coordinate of Q equals r

That is carried out within the e-book code at :
https://github.com/jimmysong/programmingbitcoin/blob/grasp/code-ch13/ecc.py
within the strategies PrivateKey.signal and S256Point.confirm.

Nonetheless in different sources, eg :
https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm
https://andrea.corbellini.title/2015/05/30/elliptic-curve-cryptography-ecdh-and-ecdsa/
https://www.secg.org/sec1-v2.pdf

the algorithm is barely completely different :

  1. r is taken to be mod N (so r is within the vary [0, N – 1]),

  2. (r, s) is taken into account legitimate if (x coordinate of Q mod N) equals r

My query is which method does Bitcoin itself undertake ?

If Bitcoin adopts the latter method then if we signal as in Jimmy’s e-book, and if the x coordinate of R is within the vary [N, p – 1], which is feasible as N < p, then our r worth is within the vary [N, p – 1]. Nonetheless then, on validation utilizing the second method we compute (x coordinate of Q mod N), which should lie within the vary [0, N – 1] and thus it could actually by no means equal r, and the validation fails.

The chance of acquiring the x coord of R within the vary [N, p – 1] may be very small as N is proportionately very near p, nevertheless is it good apply in Bitcoin programming to imagine this could by no means occur ?

Tags: BitcoinComponentCoreECDSAmessageModsignaturesigningValidate
Share76Tweet47

Related Posts

Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

by thecryptogoblin
June 20, 2025
0

I've put in bitcoin core testnet and it's now synchronized with the community after 24 hours. My query is about...

Circle Shares Soar 33% As Trump Urges GENIUS Act Approval

Circle Shares Soar 33% As Trump Urges GENIUS Act Approval

by thecryptogoblin
June 20, 2025
0

Be part of Our Telegram channel to remain updated on breaking information protection Shares of USDC stablecoin issuer Circle surged...

Bitcoin Value Depends upon Peace in Iran For June Breakout: Development, Key Ranges and Extra Submit-FOMC

Bitcoin Value Depends upon Peace in Iran For June Breakout: Development, Key Ranges and Extra Submit-FOMC

by thecryptogoblin
June 19, 2025
0

Bitcoin value has been ranging close to its highs, consolidating earlier than persevering with increased. That's the perception many merchants...

ChatGPT Bullish on $XRP and $SHIB – However Snorter Token Emerges because the Subsequent Large Buying and selling Bot

ChatGPT Bullish on $XRP and $SHIB – However Snorter Token Emerges because the Subsequent Large Buying and selling Bot

by thecryptogoblin
June 19, 2025
0

Trusted Editorial content material, reviewed by main trade specialists and seasoned editors. Advert Disclosure ChatGPT has predicted the end-of-year costs...

XRP Value Clings to Assist — Restoration Hopes Hinge on Holding the Line

XRP Value Clings to Assist — Restoration Hopes Hinge on Holding the Line

by thecryptogoblin
June 19, 2025
0

Aayush Jindal, a luminary on this planet of monetary markets, whose experience spans over 15 illustrious years within the realms...

Load More
  • Trending
  • Comments
  • Latest
CryptoRank Telegram Airdrop Information | How To Take part

CryptoRank Telegram Airdrop Information | How To Take part

September 7, 2024

bitcoin core – mandatory-script-verify-flag-failed (Script evaluated with out error however completed with a false/empty prime stack component) on wrapped SegWit enter

December 24, 2024
How Essential is Jito Solana MEV Bot Growth for the Cryptocurrency Ecosystem?

How Essential is Jito Solana MEV Bot Growth for the Cryptocurrency Ecosystem?

August 1, 2024
Lumina Hunt Telegram Sport Airdrop Information

Lumina Hunt Telegram Sport Airdrop Information

October 23, 2024

Ethereum Whales Quickly Accumulate ETH Amid Worth Decline

0

How Can a Web3 Neobanking Platform Be Useful for the Decentralized Enterprise Area?

0

2024 Recreation Growth Traits: Alternatives & Challenges | by Jon Radoff | Constructing the Metaverse

0

Prime Ethereum Analyst Says DOGE, PEPE, and RCOF Are About to Expertise a ‘Historic Breakout’

0
Uber Expands AI Push After Meta’s Scale AI Funding

Uber Expands AI Push After Meta’s Scale AI Funding

June 20, 2025
Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

June 20, 2025
SEC Vs Ripple: Knowledgeable Breaks Down 10 Essential Updates On Settlement Progress

SEC Vs Ripple: Knowledgeable Breaks Down 10 Essential Updates On Settlement Progress

June 20, 2025
Checkpoint – March 2025 | Ethereum Basis Weblog

Checkpoint #4: Berlinterop | Ethereum Basis Weblog

June 20, 2025

Token Alytics

We are a team of dedicated enthusiasts, analysts, and writers with a shared interest in the dynamic and fast-paced world of digital assets and blockchain innovation. Our diverse backgrounds in finance, technology, and media give us a unique perspective on the developments in the crypto space.

Categories

  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Defi
  • Ethereum
  • Metaverse
  • Ripple

Follow Us

  • 643 Followers

Recent News

Uber Expands AI Push After Meta’s Scale AI Funding

Uber Expands AI Push After Meta’s Scale AI Funding

June 20, 2025
Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

Adjustments for bitcoin.conf file and particulars on the testnet community bitcoin-core

June 20, 2025
  • About
  • FAQ
  • Privacy Policy
  • Support Forum
  • Disclaimer
  • Contact Us

© 2018- tokenalytics.io, All rights reserved

No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Cryptocurrency
  • Defi
  • Ripple
  • Ethereum
  • Metaverse

© 2018- tokenalytics.io, All rights reserved