Talkless has quit [Quit: Konversation terminated!]
b_101 has joined #bitcoin-core-dev
b_101 has quit [Ping timeout: 272 seconds]
sipsorcery has quit [Ping timeout: 264 seconds]
as2333 has quit [Ping timeout: 264 seconds]
b_101 has joined #bitcoin-core-dev
b_101 has quit [Ping timeout: 264 seconds]
dermoth has quit [Ping timeout: 260 seconds]
dermoth has joined #bitcoin-core-dev
SpellChecker_ has joined #bitcoin-core-dev
NorrinRadd has quit [Ping timeout: 255 seconds]
SpellChecker has quit [Ping timeout: 255 seconds]
NorrinRadd has joined #bitcoin-core-dev
ziggie has quit [Quit: Connection closed for inactivity]
NorrinRadd has quit [Remote host closed the connection]
NorrinRadd has joined #bitcoin-core-dev
cmirror has quit [Remote host closed the connection]
cmirror has joined #bitcoin-core-dev
dviola has quit [Quit: WeeChat 3.7.1]
b_101 has joined #bitcoin-core-dev
b_101 has quit [Ping timeout: 272 seconds]
jrayhawk has quit [Ping timeout: 260 seconds]
jrayhawk has joined #bitcoin-core-dev
PaperSword has joined #bitcoin-core-dev
<PaperSword>
Why does 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140 and 0x0000000000000000000000000000000000000000000000000000000000000001 generate the same public key under SECP256K1? both of those values exist at the end of the valid input range for the function.
<real_or_random>
PaperSword you mean *xonly* pubkey?
<real_or_random>
elliptic curves such as secp256k1 are cyclic groups. so the input is taken modulo the group order, which is 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364140.... your first value is -1 mod the group order and 1 is 1 mod the group order.
<real_or_random>
So these generate different elliptic curve points P1 = -G and and P2 = G, where G is the generator. Since P1 = -P2, that means that P1 and P2 happen to have the same x-coordinate but their y-coordinate add up to 0 and have different signs. (You negate a point simply by negating its y-coordinate.)
<real_or_random>
If you look at the *xonly* pubkeys (which have only the x-coordinate), then yes, those two generate the same pubkey