Bitcoin Forum
April 20, 2024, 12:28:32 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: secp256k1 parameters: when to use what as a modulus?  (Read 546 times)
jaesyn (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 1


View Profile
December 31, 2013, 05:52:59 AM
Merited by ABCbits (1)
 #1

I've been studying Bitcoin's ECDSA, and I'm a bit confused at the moment about when to use mod(p) vs. mod(n). 

For example, when doing a EC point multiplication (i.e., to compute Q=d*G), are the point coordinates modulo p?  Is anything ever modulo n?

And while on that topic, could someone explain the purpose of p (as in Fp) and n (as in the "order n of the generator point G", but this description is a little lost on me...)?
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
jjthewolf
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 08, 2019, 05:08:12 AM
 #2

bumb % juicwy
Coding Enthusiast
Legendary
*
Offline Offline

Activity: 1039
Merit: 2783


Bitcoin and C♯ Enthusiast


View Profile WWW
February 08, 2019, 05:48:50 AM
Merited by ABCbits (2)
 #3

Since nobody has answered you yet, I'll give it a try.

Let me start by saying that P as in Fp is a prime that is defining your finite field or the finite set of elements in your group in which you are doing all your calculations. So when we talk about point addition your modulus is P since you are working in that group which has P elements.

N is the order of the subgroup of the main group that you had and is generated by the generator G. That is also why N is smaller than P. And it is mainly used in signature schemes. For example when you calculate `s` you are using mod(N). And that is because now you are working in that subgroup instead.

More information: http://www.secg.org/sec1-v2.pdf

Projects List+Suggestion box
Donate: 1Q9s or bc1q
|
|
|
FinderOuter(0.19.1)Ann-git
Denovo(0.7.0)Ann-git
Bitcoin.Net(0.26.0)Ann-git
|
|
|
BitcoinTransactionTool(0.11.0)Ann-git
WatchOnlyBitcoinWallet(3.2.1)Ann-git
SharpPusher(0.12.0)Ann-git
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!