News for hackers. Stuff that matters.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by janmo on Saturday October 09, 2021 @07:05PM (#28814145)
The article basically says that Satoshi went for secp256k1 because for secp256r1 the constants were defined by the NIST under the possible influence of the NSA.

I don't think it is a good argument, I invite every one to take a look at the DES S-Box constants. Many people believed that those were backdoor constants that the NSA planted into the algorithm as there was no explanation on how and why they were chosen. Many years later it turned out that they were picked carefully to protect against differential-linear attacks. An attack only the NSA knew back then. So they gave out safe S-Box constants, and all those who distrusted them and picked random/other S-Boxes were actually screwed, this is really ironic.

https://en.wikipedia.org/wiki/S-box

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by dan-robertson on Saturday October 09, 2021 @07:40PM (#28814338)
Right except on the other hand, look at the whole Dual_EC_DRBG fiasco where the NSA gave instructions for how one could pick parameters, but also offered their own suggestion (in some standards, one had to use the suggested parameters.)

The bit about choosing parameters suggests that the NSA didn’t have a benevolent reason to choose those parameters, and the evidence of that algorithm being exploited in the wild suggests that the NSA may have chosen their parameters with that exploit in mind.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by janmo on Saturday October 09, 2021 @07:52PM (#28814410)
The way the Dual_EC_DRBG backdoor worked is that only they (the NSA) could exploit it, they had the equivalent of a master private key.

The NSA has a track record of never putting out Cryptography that could be broken by any other actor than the NSA itself.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by dan-robertson on Saturday October 09, 2021 @08:14PM (#28814550)
The Juniper hack (where their firewall product had a backdoor injected) was enabled by someone breaking into the company and modifying the parameters for Dual_EC_DRBG. It was sufficient for the algorithm to allow for a backdoor for there to be problems. Presumably it would have been caught sooner had the hack required a backdoor to be hidden in the source code and not some bytes that looked like a magic constant.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by ryanlol on Sunday October 10, 2021 @07:08AM (#28817475)
Dual_EC_DRBG is bad because someone with access to Junipers source repos was able to backdoor their implementation? Do you realise how preposterous that sounds?

> Presumably it would have been caught sooner had the hack required a backdoor to be hidden in the source code and not some bytes that looked like a magic constant.

Have you seen what real life bugdoors look like?

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by sillysaurusx on Saturday October 09, 2021 @09:41PM (#28815027)
… but that’s exactly the reason Satoshi distrusted the NSA. All else being equal, what possible incentive is there to design Bitcoin in a way that might theoretically be vulnerable to the NSA?
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by uap on Sunday October 10, 2021 @04:02AM (#28816662)
Lots of money? If you can short cut mining, it's cleaner black money than dealing drugs or people, probably. And if you can steal from someone else's address, maybe that's even better... You can seize funds with no red tape. Or mete out that capability to allies etc. Why wouldn't the NSA want to support a parallel financial system that criminals flock to? Just like why wouldn't the NSA want to covertly support encrypted messaging apps or the FBI do that...
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by tinus_hn on Sunday October 10, 2021 @06:55AM (#28817407)
If the Bitcoin ecosystem is broken like that, the coins are worthless. You can use an attack like that only once.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by hutzlibu on Saturday October 09, 2021 @08:10PM (#28814528)
"of never putting out Cryptography that could be broken by any other actor than the NSA itself. "

If the only obstacle for others is "unknown Math" - then surely you can rule the script kiddies out, but I believe there are quite some other clever people with strong Math background around, who do not work exclusively for the NSA.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by dan-robertson on Saturday October 09, 2021 @08:21PM (#28814601)
The Dual_EC exploit was possible not because the NSA were cleverer than everyone else but because they wrote the standard and chose the parameters. The parameters involved two points, P and Q, on an elliptic curve group with rank 1 and prime order. Because of these properties there must be some number e such that P = Q^e (written P = e * Q in the common elliptic curve group notation) but it is hard to find e from only P and Q (this is the discrete log problem for this EC group and it, or its close relative the Diffie–Hellman, problem being hard is a common foundation for security in cryptography.) However if you are choosing the parameters, you can just choose Q and e and compute P = Q^e yourself.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by spoonjim on Sunday October 10, 2021 @03:39AM (#28816549)
There is no such thing. Russia and China have state mathematical capabilities just as good as the US has.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by dan-robertson on Sunday October 10, 2021 @07:05AM (#28817464)
If the standard is that you attach a copy of your message encrypted with an NSA-provided public key, and only the NSA has access to the private key, then being good at math won’t help Russia or China.

Obviously the NSA couldn’t get people to use such a standard but they managed to slip something like that into Dual_EC and had success in getting people to use it.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by matja on Saturday October 09, 2021 @08:13PM (#28814547)
The r-curve parameters were apparently chosen by picking a random number, and hashing it, which somehow "proves" no nefarious play. Problem is that one could keep picking random numbers, hashing them, to get curve parameters vulnerable to an attack not commonly known. There is no attempt to explain how these numbers were chosen, or to use a nothing-up-my-sleeve number.

From "SEC 2: Recommended Elliptic Curve Domain Parameters":

"... one type being parameters associated with a Koblitz curve and the other type being parameters chosen verifiably at random"

"Verifiably random parameters offer some additional conservative features. These parameters are chosen from a seed using SHA-1 as specified in ANSI X9.62 [X9.62]. This process ensures that the parameters cannot be predetermined."

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by rocqua on Sunday October 10, 2021 @04:30AM (#28816775)
The trick here is to not use a random number as the input. Instead you pick some meaningful input. Say the string "secure random 256 bit curve parameters". You then hash that meaningful string to get a random number that is much harder to manipulate by brute force.

Parameters generated this way are called "nothing up your sleeve" numbers.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by sgtnoodle on Sunday October 10, 2021 @04:54AM (#28816892)
Couldn't you generate an arbitrarily large number of variations of vaguely human meaningful sentences, until one of them ended up with a convenient hash? The sentence you wrote as an example sounds like something an ML model would spit out.

Yesterday I texted my coworker a suggestion to dockerize his yocto build so that it would work better in vagrant on a lambda server in the cloud. It's borderline these days, but he realized I was being facetious. He retorted with a serious comment about 500 lines of typescript to run 5 lines of bash.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by mattalex on Sunday October 10, 2021 @11:49AM (#28819322)
With "meaningful input" one usually means some prime number or the eg. first X digits of a constant like pi. (and if you chose a strange prime or constant, people would also ask questions)

This generally narrows down the options to something were relatively little trickery is possible: keep in mind that the eg. hashes used to break some encryption would have to be very specific so that the algorithm isn't trivially broken to begin with.

The more important part about nothing-up-my-sleeve is really the justification for choosing a particular hash/number. If, let's say your algorithm needs a prime with at least 10 digits and you pick the first prime with 10 digits nobody asks questions. If you picked the 16th, then people would ask questions.

Similarly, if you can pick any arbitrary ten digit number and you pick the first 10 digits of pi, nobody will ask questions. If you picked the million'th to million-and-tenth digit of pi people would asks questions.

"meaningful" has to be understood more as "from a pool of constants that leave little room for (mallicious) adjustment". The abstracter the number, the higher the potentially used searchspace.

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by kadoban on Sunday October 10, 2021 @10:43AM (#28818807)
You could, theoretically, yes. Ideally it should be short and low entropy and you're a bit relying on laws of big numbers and a small amount of trust.

"aes" is better than "aes is the best!" which is better than "aes123884586314745"

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by egberts1 on Saturday October 09, 2021 @08:48PM (#28814765)
with a precomputed value comes with an enormous “strain”bow table.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by SV_BubbleTime on Saturday October 09, 2021 @07:55PM (#28814430)
The right thing to do then was to disclose the attack, explain their choices, and further cryptography.

Instead they seemingly wanted to exploit anyone who didn’t use their constants, I guess?

Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by ethanbond on Saturday October 09, 2021 @08:23PM (#28814620)
Uh, their job isn’t to “further cryptography”. It’s to further America’s interests.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by janmo on Saturday October 09, 2021 @08:06PM (#28814503)
This was during the cold war. They didn't wanted the soviets to know, but apparently they already knew the attack as well.
Re:Why Did Satoshi Decide to Use Secp256k1 Instead of Secp25... by SV_BubbleTime on Saturday October 09, 2021 @08:20PM (#28814594)
Thanks for the context. I’m still pessimistic about them as unelected ultra powerful blameless immortal all seeing eyes - but I get that good people might make the same decisions with the same info.