News for hackers. Stuff that matters.
Re:We Don't Generate Elliptic Curves Every Day by phkahler on Tuesday October 24, 2023 @12:47PM (#38001782)
The author never addresses the issue of trusting standard parameters. I agree with them on the rest, but standard parameters need evidence that they were not specially selected for reasons unknown to everyone else.
Re:We Don't Generate Elliptic Curves Every Day by FiloSottile on Tuesday October 24, 2023 @01:12PM (#38002119)
Footnote [1] is about different strategies to select trustworthy standard parameters. I believe they are all good enough to make it so that if someone can still "backdoor" the result, they are so far ahead of the outside world that they might as well have broken the whole scheme, without influencing the parameters.

[1] https://words.filippo.io/dispatches/parameters/#fn1

(Yes, I hide too much stuff in the footnotes.)

Re:We Don't Generate Elliptic Curves Every Day by comex on Tuesday October 24, 2023 @01:37PM (#38002498)
Out of curiosity, have people considered rigidly defining requirements, but rather than picking the simplest/lowest value that satisfies the requirements, instead having a public “parameter choice ceremony” using a multiparty random number generation protocol to pick a random value that satisfies the requirements? That seems like it would make it much harder to manipulate the value by changing the requirements.
Re:We Don't Generate Elliptic Curves Every Day by woodruffw on Tuesday October 24, 2023 @06:52PM (#38006782)
This probably leads to regress (why trust the multiparty scheme?), and would only be convincing to a tiny fraction of skeptics (asymptotically, the ones who are least likely to be cranks and therefore the least noisy ones).

Meanwhile, a big part of current cryptographic design is recognizing that many of our current primitives have far larger margins than we really need, and that we can squeeze performance out of our schemes by taking a more evidence-based approach to parameter selection/round counts/etc.[1].

[1]: https://eprint.iacr.org/2019/1492

Re:We Don't Generate Elliptic Curves Every Day by tptacek on Tuesday October 24, 2023 @01:50PM (#38002675)
You're never going to get a satisfactory answer. The world's foremost proponent of not trusting standardized parameters wrote and repeatedly submitted a paper demonstrating a model attack that targeted curves built from mathematical constants; when you've "backdoored pi", there's really no place to go from there.

That author's subtext, as I understood it, was that curves should be selected by functional optimization; pick the curve parameters that best solve the engineering problems. It was a useful argument given their preferred curve, 25519, which does indeed have a lot of attractive engineering features! But it's not hard to see that engineering excellence is a selection principle with even more degrees of freedom than mathematical constants; moreover, you're only ever considering optimality at a fixed point in time, but the optimums change over time --- cofactors might be less important when we lack complete additional formulae for a Weierstrass curves, which makes them hard to implement in constant time, but much more important once we do (as is the case now).

There's really no way around just doing the computer science and cryptological work of working out curve attacks. That's the Menezes and Koblitz argument from the "Enigma" paper: that the reason to trust the NIST P-curves is that we'd know by now if they were weak (not because NSA doesn't have secret attacks, but because the mechanism by which they were generated would result in whole large classes of broken curves that academic cryptography and mathematics would have caught by now).

If you don't find Alfred Menezes and Neil Koblitz persuasive surveyors of elliptic curve security, that's fine, but my response would be that you can't really trust any parameters at all at that point. Certainly, investing trust in the cryptographers best known to the generalist programmer audience seems like a bad alternative strategy.

Re:We Don't Generate Elliptic Curves Every Day by throw0101c on Tuesday October 24, 2023 @02:10PM (#38002990)
> That's the Menezes and Koblitz argument from the "Enigma" paper […]

PDF:

> In August 2015 the U.S. National Security Agency (NSA) released a major policy statement on the need for post-quantum cryp- tography (PQC). This announcement will be a great stimulus to the development, standardization, and commercialization of new quantum- safe algorithms. However, certain peculiarities in the wording and tim- ing of the statement have puzzled many people and given rise to much speculation concerning the NSA, elliptic curve cryptography (ECC), and quantum-safe cryptography. Our purpose is to attempt to evaluate some of the theories that have been proposed.

* https://eprint.iacr.org/2015/1018.pdf

Then-coverage:

* https://blog.cryptographyengineering.com/2015/10/22/a-riddle...

Re:We Don't Generate Elliptic Curves Every Day by oh_sigh on Tuesday October 24, 2023 @02:16PM (#38003057)
Hell, even picking seeds like "the text of the NYT headline from [future date]", since the FBI or some other shadowy governmental organization could lean on the NYT editor to construct the headline in a manner that is useful to them
Re:We Don't Generate Elliptic Curves Every Day by capitainenemo on Tuesday October 24, 2023 @02:41PM (#38003395)
That seems solvable by picking things about the future that are a lot harder to influence, like the hashes of future bitcoin blocks, or the exact value of all stocks on the NYSE at a given moment in time.

... ok. stock one is probably easier to influence by suborning the exchange :) - all world exchanges?

Re:We Don't Generate Elliptic Curves Every Day by rainsford on Tuesday October 24, 2023 @04:02PM (#38004623)
It's an interesting thought experiment, but it feels a little like trying to come up with the best defense against alien invaders. We're already talking about attackers able to craft cryptographic weaknesses decades of peer review can't discover or explain. Trying to figure out how to usefully constrain their algorithm design choices does not seem like a winning strategy.

The bitcoin block hash thing is interesting, but if you're talking about an attacker with that kind of unknown but sophisticated capability, how do you know it actually thwarts their plans? Maybe all they need is any large number with high entropy or maybe the leading zeros characteristic of bitcoin block hashes is actually key to their attack? Once you imbue your adversary with unknown powers, it's by definition difficult to know what helps or hurts them.

Re:We Don't Generate Elliptic Curves Every Day by capitainenemo on Tuesday October 24, 2023 @06:29PM (#38006564)
heh. well, could drop the leading zeros :)

But, yeah, magic powers, sure, anything goes. I was just thinking there must be something more reliable than NYT headlines.

Re:We Don't Generate Elliptic Curves Every Day by nextaccountic on Tuesday October 24, 2023 @06:29PM (#38006566)
It's way harder to fake physical measurements (like weather, solar activity, etc) published by international bodies, You could maybeeee influence the least significant digit but even this would be hard without cooking up experimental data.

Maybe get physical measurements, stock exchange data, newspaper headlines, and bitcoin blocks, all in 6 months in the future, and XOR all of them.

Re:We Don't Generate Elliptic Curves Every Day by quesera on Tuesday October 24, 2023 @09:01PM (#38007870)
Hmm. How about asking all members of the UN to produce 8 "random" bytes. Concatenate in ISO alpha order, hash the result.
Re:We Don't Generate Elliptic Curves Every Day by nmadden on Tuesday October 24, 2023 @03:58PM (#38004569)
> cofactors might be less important when we lack complete additional formulae for a Weierstrass curves, which makes them hard to implement in constant time, but much more important once we do (as is the case now).

If I remember correctly, part of the reason for the cofactor in 25519 is because Montgomery curves have to have a cofactor and only those curves have the nice x-only Montgomery Ladder, which basically rules out invalid curve attacks (so long as the curve is twist-secure — not all the NIST curves are IIRC). Do the complete addition formulas for short Weierstrass curves also fix this? Invalid curve attacks are a major danger for NIST curves.

I know you can use compressed point representation to get the same benefit, but that seems very rare in NIST curve implementations (because old now-expired patents). The landscape of NIST prime-order curve implementations is not great. If all those libraries were going to actually switch to complete addition formulas and compressed public keys then I might feel better about them enjoying a renaissance.

Re:We Don't Generate Elliptic Curves Every Day by tptacek on Tuesday October 24, 2023 @04:38PM (#38005196)
I agree with you, and am reassured by cryptosystems that use 25519 and put on edge by those that use the P-curves (not because of backdoor conspiracy theories, which are silly, but because the P-curves are easy to mess up). But cryptography engineers increasingly disagree with me.
Re:We Don't Generate Elliptic Curves Every Day by tptacek on Wednesday October 25, 2023 @05:15PM (#38018497)
(oh, also: yes, that's my understanding too, that you're still stuck validating incoming curve points in ECDH, but I think the anti-cofactor people have a corresponding argument for signature schemes.)
Re:We Don't Generate Elliptic Curves Every Day by nmadden on Thursday October 26, 2023 @10:11AM (#38025834)
Yeah, and that’s totally reasonable. I’m one of those people that thinks signatures should be used for software updates and nothing else though.
Re:We Don't Generate Elliptic Curves Every Day by tptacek on Thursday October 26, 2023 @11:29AM (#38026878)
Yes, my brain sort of shuts off and buckets signature cryptography into cryptocurrency, which is where the cofactor issues crop up anyways.
Re:We Don't Generate Elliptic Curves Every Day by flaghacker on Tuesday October 24, 2023 @06:48PM (#38006746)
Could you share the paper(s) about "backdoors" in physical constants? That doesn't make much sense at first sight.
Re:We Don't Generate Elliptic Curves Every Day by UncleMeat on Tuesday October 24, 2023 @07:53PM (#38007364)
Re:We Don't Generate Elliptic Curves Every Day by bmulcahy on Tuesday October 24, 2023 @08:42PM (#38007748)
>but because the mechanism by which they were generated would result in whole large classes of broken curves that academic cryptography and mathematics would have caught by now

Might such discoveries by academics be forcibly suppressed by government agencies?

Re:We Don't Generate Elliptic Curves Every Day by mattsan on Tuesday October 24, 2023 @09:03PM (#38007883)
I would argue that suppression of public individuals would be much more difficult than say the NSA just scooping up the best mathematicians in that field
Re:We Don't Generate Elliptic Curves Every Day by tptacek on Tuesday October 24, 2023 @11:48PM (#38008933)
No.
Re:We Don't Generate Elliptic Curves Every Day by phkahler on Monday October 30, 2023 @09:35AM (#38069303)
>> The world's foremost proponent of not trusting standardized parameters wrote and repeatedly submitted a paper demonstrating a model attack that targeted curves built from mathematical constants; when you've "backdoored pi", there's really no place to go from there.

That sounds like an argument against standard parameters. Even if we trust an algorithm, we can't trust others to choose parameters for them? The solution seems obvious - find a better way to choose (non-standard) parameters.

Re:We Don't Generate Elliptic Curves Every Day by EGreg on Tuesday October 24, 2023 @06:34PM (#38006618)
That's why the Bitcoin and Ethereum crowd trust the Koblitz curves like secp256k1 instead of secp256r1 which is the only curve that is in widespread use in browsers, operating systems, secure enclaves etc.

The k1 curve has parameters like 15, whereas the "standard" one has curves with parameters chosen as an "arbitrary" number in the billions for some reason. People believe the NSA may have iterated through the previous ones until they found a vulnerable curve, and NIST recommended that. Take a look:

https://cointelegraph.com/news/this-researcher-says-bitcoins...

“(1) The Koblitz curve is specially designed for faster scalar multiplications. Hence the (signing, verifying and key generation) operations on Secp256k1 are faster than those on Secp256r1. (2) Although the Secp256r1 curve was announced to be randomly selected, there could still exist some suspicion that some backdoor might be secretly set up in the curve parameters. In contrast, the Koblitz curve parameters are mathematically determined, and there is little possibility for setting such a backdoor.”

However, given the prevalence of the r1 curve, Ethereum devs might want to add a precompiled contract so that people can sign into the blockchain without trusting web sites and wallet software:

https://ethereum-magicians.org/t/eip-7212-precompiled-for-se...

https://security.stackexchange.com/questions/256088/is-the-e...

Re:We Don't Generate Elliptic Curves Every Day by uxp8u61q on Wednesday October 25, 2023 @01:05AM (#38009332)
Whereas parameters generated on the fly don't?
Re:We Don't Generate Elliptic Curves Every Day by teekert on Wednesday October 25, 2023 @04:18AM (#38010505)
Sounds like one has to prove "a negative" https://youtu.be/n-kXok4tznU?t=26