Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: vjudeu on March 21, 2024, 05:49:54 AM



Title: Pairs of matching n-values in secp256k1 with changed b-values
Post by: vjudeu on March 21, 2024, 05:49:54 AM
Recently, I was quite surprised, when I saw that there are six different n-values, matching different b-values in secp256k1:
Code:
+-----+---------------------------------------------------------------------+
| b   | n                                                                   |
+-----+---------------------------------------------------------------------+
| 0x1 |  0xfffffffffffffffffffffffffffffffe06f23032560e83e138ea6fc857fb4794 |
| 0x2 | 0x1000000000000000000000000000000014551231950b75fc4402da1712fc9b71f |
| 0x3 |  0xffffffffffffffffffffffffffffffff4c43534ba6c5e3a57918113a87c50283 |
| 0x4 | 0x100000000000000000000000000000000b3bcacb4593a1c5a86e7eec3783af5dd |
| 0x6 | 0x100000000000000000000000000000001f90dcfcda9f17c1ec7159035a804b0cc |
| 0x7 |  0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 |
+-----+---------------------------------------------------------------------+
They are repeating over and over again, as b-value is incremented. However, it also seems they can be connected in pairs, each giving the same sum:
Code:
+-----+---------------------------------------------------------------------+
| b   | n                                                                   |
+-----+---------------------------------------------------------------------+
| 0x1 |  0xfffffffffffffffffffffffffffffffe06f23032560e83e138ea6fc857fb4794 |
| 0x6 | 0x100000000000000000000000000000001f90dcfcda9f17c1ec7159035a804b0cc |
| sum | 0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffff860 |
+-----+---------------------------------------------------------------------+
| 0x2 | 0x1000000000000000000000000000000014551231950b75fc4402da1712fc9b71f |
| 0x7 |  0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 |
| sum | 0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffff860 |
+-----+---------------------------------------------------------------------+
| 0x3 |  0xffffffffffffffffffffffffffffffff4c43534ba6c5e3a57918113a87c50283 |
| 0x4 | 0x100000000000000000000000000000000b3bcacb4593a1c5a86e7eec3783af5dd |
| sum | 0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffff860 |
+-----+---------------------------------------------------------------------+
The question is: does it mean that there is some kind of connection between y^2=x^3+7, and for example y^2=x^3+2? Or maybe there is another connection, where points on curves with identical p-value and n-value can be mapped? Does it mean, that if we have b=0x7, where there are "n" points, and for example b=0xc curve also has the same amount of points, then does it mean we can map them 1:1?


Title: Re: Pairs of matching n-values in secp256k1 with changed b-values
Post by: satashi_nokamato on March 21, 2024, 11:32:18 PM
If there is any 2 points on different curves mapping with each other then there will be no cryptography. imagine if you could identify only 1 point from one curve on another curve, then due to different n values you could solve any key. To understand this better you could divide any scalar mod n on 2 curves and compare the results.

After that you'll realize why it can break crypto systems if that ever happened.


Title: Re: Pairs of matching n-values in secp256k1 with changed b-values
Post by: herecomesjohnny on March 23, 2024, 03:38:03 PM
One possible explanation for this phenomenon could be related to the modular arithmetic used in elliptic curve cryptography. Since all operations (addition, multiplication, etc.) are performed modulo a prime number
p


Title: Re: Pairs of matching n-values in secp256k1 with changed b-values
Post by: iceland2k14 on March 23, 2024, 05:33:11 PM
Recently, I was quite surprised, when I saw that there are six different n-values, matching different b-values in secp256k1:
Code:
+-----+---------------------------------------------------------------------+
| b   | n                                                                   |
+-----+---------------------------------------------------------------------+
| 0x7 |  0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 |
+-----+---------------------------------------------------------------------+

The question is: does it mean that there is some kind of connection between y^2=x^3+7, and for example y^2=x^3+2? Or maybe there is another connection, where points on curves with identical p-value and n-value can be mapped? Does it mean, that if we have b=0x7, where there are "n" points, and for example b=0xc curve also has the same amount of points, then does it mean we can map them 1:1?

Not very sure about the 1:1 mapping although, previously i saw when b = 0x0, it leads to a very simplified loop which allowed to map from Pubkey to Privatekey. However I could not find any way to map b = 0x7 curve pubkey into a b = 0x0 curve pubkey.


Title: Re: Pairs of matching n-values in secp256k1 with changed b-values
Post by: cassondracoffee on March 24, 2024, 06:20:56 AM
Recently, I was quite surprised, when I saw that there are six different n-values, matching different b-values in secp256k1:
Code:
+-----+---------------------------------------------------------------------+
| b   | n                                                                   |
+-----+---------------------------------------------------------------------+
| 0x1 |  0xfffffffffffffffffffffffffffffffe06f23032560e83e138ea6fc857fb4794 |
| 0x2 | 0x1000000000000000000000000000000014551231950b75fc4402da1712fc9b71f |
| 0x3 |  0xffffffffffffffffffffffffffffffff4c43534ba6c5e3a57918113a87c50283 |
| 0x4 | 0x100000000000000000000000000000000b3bcacb4593a1c5a86e7eec3783af5dd |
| 0x6 | 0x100000000000000000000000000000001f90dcfcda9f17c1ec7159035a804b0cc |
| 0x7 |  0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 |
+-----+---------------------------------------------------------------------+
How come from this n value?
Where do you get this n value?

edit:
What is the base value. Those 1to7 values come from N