Skip to main content
Tweeted twitter.com/StackCrypto/status/1407397994333364227
edited title
Link
kelalaka
  • 49.5k
  • 12
  • 118
  • 205

Problem with point addition about [n-1]+[2]G and [n-1]G1]+G on on Secp256k1

make the title better
Link
kelalaka
  • 49.5k
  • 12
  • 118
  • 205

Problem with point addition about [n-1]+[2]G and [n-1]G on on Secp256k1

typos
Source Link
kelalaka
  • 49.5k
  • 12
  • 118
  • 205

I apologize in advance for my question. I am trying to make my own simple secp256k1Secp256k1 calculator, just addition and subtraction, and one thing keepkeeps confusing me. When I add 2 points, and I know what result of addition should be a bigger number than $n$, and as far as I understand, the result should be 0, because it is the point at infinity.

However, my calculator shows a different result. For example, I add:

115792089237316195423570985008687907852837564279074904382605163141518161494336 + 2

and get 1 as result. The same thing happens with other points whose sum is greater than $n$.

But when I add

115792089237316195423570985008687907852837564279074904382605163141518161494336 + 1

calc shows me 0.

I can't understand, is it calculator work right, and itsit's my misunderstanding in ECC? Or its mistakea mistake in my code? What result should be when I add two points with sum, greater than $n$?

I apologize in advance for my question. I am trying to make my own simple secp256k1 calculator, just addition and subtraction, and one thing keep confusing me. When I add 2 points, and I know what result of addition should be bigger number than $n$, and as far as I understand, result should be 0, because it point at infinity.

However, my calculator shows different result. For example, I add:

115792089237316195423570985008687907852837564279074904382605163141518161494336 + 2

and get 1 as result. The same thing happens with other points whose sum is greater than $n$.

But when I add

115792089237316195423570985008687907852837564279074904382605163141518161494336 + 1

calc shows me 0.

I can't understand, is it calculator work right and its my misunderstanding in ECC? Or its mistake in my code? What result should be when I add two points with sum, greater than $n$?

I apologize in advance for my question. I am trying to make my own simple Secp256k1 calculator, just addition and subtraction, and one thing keeps confusing me. When I add 2 points, and I know what result of addition should be a bigger number than $n$, and as far as I understand, the result should be 0, because it is the point at infinity.

However, my calculator shows a different result. For example, I add:

115792089237316195423570985008687907852837564279074904382605163141518161494336 + 2

and get 1 as result. The same thing happens with other points whose sum is greater than $n$.

But when I add

115792089237316195423570985008687907852837564279074904382605163141518161494336 + 1

calc shows me 0.

I can't understand, is it calculator work right, and it's my misunderstanding in ECC? Or its a mistake in my code? What result should be when I add two points with sum, greater than $n$?

added 55 characters in body
Source Link
Maarten Bodewes
  • 94.5k
  • 13
  • 165
  • 319
Loading
Source Link
Loading