LLMs won't break symmetric crypto
Posted by rowbin 1 day ago
Comments
Comment by zkmon 1 day ago
The first one is not similar to the mathematical breakthroughs LLMs are making recently. There is a loss of information in mods and integer computations making them one-way. The second one requires simply increasing bit-length to match the increased computer power.
Comment by mindwok 1 day ago
That's not correct. Trapdoor functions aren't one way because they destroy information, and if they were they wouldn't be very useful because you wouldn't be able to go back the other way (i.e. decrypt the text). You'd end up with many possible inputs for a given output, like a hash.
Comment by spwa4 20 hours ago
Comment by j16sdiz 1 day ago
You are describing asymmetric encryption. This article was talking about symmetric encryption.
Symmetric encryption is generally considered much harder to break than asymmetric encryption
Comment by deepsun 1 day ago
No, there's no proof that most crypto "calculations" are impossible to reverse. That's why algorithms got weakened by researchers regularly. As of now, it's totally possible someone finds an algorithm to break a next one tomorrow. They just haven't found it yet.
Comment by zkmon 1 day ago
Comment by akoboldfrying 1 day ago
Of course there isn't, nothing like that could be formally proven. But that is neither here nor there.
The important issues remain:
1. Whether some as yet unknown technique exists for efficiently breaking a code.
2. If the answer to (1) is yes, whether LLMs can find it at a reasonable cost.
TTBOMK we still don't know anything about (1). I think the answer to (2) is "probably yes".
Comment by tptacek 1 day ago
(That's not a common answer to the same question about, say, ECDLP, even leaving quantum aside).
Comment by wisty 1 day ago
Most of the breakthroughs so far have been finding counter examples. They can just search tirelessly to find one. Finding a good algorithm (maybe even one faster than people assume is possible) seems the obvious next step for them (as opposed to more conceptual proofs e.g. existance or non-existence where they still aren't quite terrifyingly good).
The phrase "for all we know some undergrad might find a counter example" is the new "it works for n<100 so I don't see why it won't continue indefinitely".
Comment by xboxnolifes 22 hours ago
That's the 3rd point. correctness of the algorithms.
Comment by inigyou 19 hours ago
A few basic things are known - for example, you can't make a symmetric cipher with just bitshifts and XOR, because then linear algebra techniques can trivially reverse it.
Comment by xboxnolifes 8 hours ago
Comment by tptacek 6 hours ago
Comment by ifwinterco 21 hours ago
Two cases: 1) you have to find a route to the middle 2) someone gives you a route to the middle and you have to validate it
It’s not proven that case 2 is necessarily easier than case 1. But logic and every case in the history of computing suggest that it is.
I don’t see how LLMs could possibly change that fact
Comment by stingraycharles 1 day ago
Most likely outcome will be that a security researcher is able to break one with assistance of / in collaboration with an LLM.
Comment by tptacek 1 day ago
Comment by stingraycharles 1 day ago
I’m very much aware of the differences between symmetric and asymmetric encryption, and realize that symmetric encryption is much simpler, but I figure that if there are weaknesses to be found in algorithms such as md5, then surely there are also potential weaknesses in symmetric encryption algorithms?
Now I’m not saying that this would be the case for battle tested algorithms like AES. But is there any particular reason why this whole category could not possibly have weaknesses?
Comment by tptacek 1 day ago
Comment by kadoban 1 day ago
There's a _lot_ hiding in that, all of the interesting stuff for security and potential breaks. So...yeah it is based on complicated math, it's just in that bit instead of the xor.
Even the xor is a bit of a fudge, but probably close enough.
Comment by tptacek 1 day ago
Comment by kadoban 1 day ago
I think you're right if your point is that we're more likely to see big breaks in asymmetric crypto, but it's kind of based on vibes to me, it's not really clear that it's provable in any way with anything like our current understanding.
Comment by tptacek 1 day ago
It's just radically different levels of exposure to mathematical theory.
I'm fond of pointing out that JP Aumasson, who is (unlike me) an academic cryptographer of some repute, believes SHA2 will never be broken.
Comment by adrian_b 21 hours ago
However, for a well-designed cipher that system of equations is non-linear and exceedingly complex and it cannot be formulated in any mathematically simple form, therefore no methods of solution are known.
The more rounds are performed inside the encryption algorithm, the more complex that system of equations becomes, and the more unlikely is to find any method to solve it.
Even for the much simpler systems of non-linear equations that occur in physics, when they cannot be linearized even in the neighborhood of each point, then there typically are no better methods of solution than searching randomly through the solution space, which in cryptography corresponds to brute-force search, which is infeasible for big enough secret keys.
Comment by xoa 14 hours ago
I know with some pre-modern ciphers like Caesar that was an issue, and it famously came up due to implementation/operator issues with systems like Enigma. But is that actually still a relevant attack context at all with modern symmetric encryption? Outside of academic interest I'm struggling to think of any time where you would ever be in that situation. I thought input got scrambled pretty well so you can't really trivially predict things like text word count (putting aside that these days the vast super majority of bits aren't text). When used to protect your own data (ie, storage encryption etc) then the "end points" are you and future-you and by definition fully trusted, including operation of the encryption system bits. If someone hostile roots it and has access the device computation they'll also have access to device data. When symmetric encryption is used between end points controlled by two different parties keys forward secrecy should be pretty standard these days right? So attackers still would have to root one trusted side or the other and at that point it's game over regardless.
On the face of it seems like it'd have to be a pretty strange situation nowadays where the attacker somehow gets to reuse the same encryption key as the trusted parties without knowing it or being able to access the secrets they're trying to keep without touching the encryption at all? DRM sorts of use-cases maybe, one of the few situations where hostile attacker and trusted user are supposed to be the same person which has always been a tension with it.
Comment by modeless 1 day ago
The only convincing argument here is that these things are battle tested (literally in most cases I would guess), with tons of research that never gets published because it's unsuccessful. A whole lot of human effort has gone into trying to break these things. A lot more than went into any of the math problems AI has solved so far. It's going to take a while before LLMs can equal and surpass that amount of human effort. And they might have to surpass it by many, many times to actually break these, if it is even possible, which is not certain.
Comment by cyberax 1 day ago
There are no reasonable attacks even on the good old DES. And by "reasonable" I mean attacks that would bring down the complexity to a practical level if the DES key size were to be extended to something like 128 bits. We can brute-force DES keys trivially, but that's not a fault of the cipher per se.
Comment by tptacek 1 day ago
Comment by adrian_b 21 hours ago
Moreover, together with RC2 it was approved for export from USA, during a time when this was prohibited, so it was included in browsers from the beginning.
When the export rules were relaxed, it was trivial to increase the key length of RC4, which could be chosen arbitrarily, so that appeared as a simple way to enhance the security of the existing Internet browsers.
This lead to its ubiquity in the early SSL.
Comment by dboreham 1 day ago
What I have seen LLMs do recently is find what turned out to be very basic bugs in encryption and ZK libraries that for some reason humans never saw. In those cases it wasn't that the encryption algorithms were broken per se, but the the implementation was.
This alone seems very worthwhile.
Comment by modeless 1 day ago
Comment by tptacek 1 day ago
A distinction a lot of comments in this thread aren't picking up on is the mechanisms that make most asymmetric cryptography work, versus those of symmetric cryptography. Asymmetric constructions like RSA and ECDH are simple mathematical objects, and their security depends on assumptions we make about advanced algebra, number theory, &c. It's plausible to imagine we could discover something about discrete logs that would destabilize DH. It's less plausible to imagine something like that happen to AES, which is deliberately designed not to have clean structure.
Comment by teravor 15 hours ago
to that end, a so-called "security margin" is guessed at and the number of rounds of the cipher is determined accordingly.
it is certainly possible for an LLM to prove that the guess was wrong and everything that it implies.
having said that, the security of symmetric cryptography relies on the fact that you cannot unwind (find initial conditions) a sufficiently chaotic system in the discrete domain. for example, SHA256 with 512 rounds will almost certainly count as sufficiently chaotic by any definition but it wouldn't be as efficient as the current 64 rounds.
it is often said that it's difficult to come up with a secure symmetric cipher on your own, but assuming you know what you are doing it's quite easy. the hard part is to have enough confidence in it to make it efficient.
Comment by smalltorch 1 day ago
Comes down to a gut feeling but I lean that this stuff is already all figured out.
Comment by arberx 1 day ago
Comment by SideQuark 5 hours ago
Comment by tptacek 1 day ago
Comment by TheDong 1 day ago
"LLMs will accelerate math research, allowing us to prove that meaningfully sized quantum computers are impossible and crypto is secure. Modern cryptographic algorithms remains unbroken until the last human is turned into a paperclip in the year 2430"
Comment by tiahura 1 day ago
Comment by coderatlarge 1 day ago
Comment by dsp_person 1 day ago
Comment by krupan 1 day ago
Comment by amingilani 1 day ago
All conjectures are until someone with the time and energy proves or disproves them.
Comment by bahmboo 1 day ago
Comment by danielmarkbruce 1 day ago
Comment by tptacek 1 day ago
Comment by danielmarkbruce 1 day ago
Comment by inigyou 19 hours ago
More classically, you can try feeding the problem into a SAT solver. People have tried that too. Doesn't work - it just grinds until you run out of memory or patience, finding no useful results.
You can also try doing it by hand and see if you get anywhere (you won't). People have tried.
This is an adversarial problem. The problem is literally designed to be resistant to all kinds of analysis. That's the point. Even real attacks, like SHAttered (different kinds of attack on a different kind of algorithm) manage to find conditions where the probability of finding a solution is raised to 2^-70 or so, and then they let it grind on their biggest compute clusters until they find one. And that problem (finding a collision in a cryptographic hash function) is one that's especially amenable to grinding. If you're mounting a known plaintext attack it's unlikely your adversary will answer 2^70 encryption requests for you.
Comment by danielmarkbruce 15 hours ago
Every encryption algorithm proposal has this property of being designed to have no patterns....
Comment by inigyou 14 hours ago
Comment by danielmarkbruce 13 hours ago
Comment by inigyou 9 hours ago
Comment by danielmarkbruce 8 hours ago
Comment by tptacek 1 day ago
Comment by danielmarkbruce 1 day ago
And, just because what I'm saying isn't especially likely to work, it's not obvious that it cannot. Very large models are doing all manner of things that very smart people thought were not possible just 6 or 7 years ago.
Comment by insanitybit 1 day ago
Comment by danielmarkbruce 1 day ago
Comment by SideQuark 5 hours ago
Comment by danielmarkbruce 58 minutes ago
You can build and train a model in about 15 lines of pytorch. And you can build and break your own 8 bit xor cipher in about 10 lines of python.
Hacker news is full of software engineers. You are unlikely to find one that hasn't built a model using pytorch these days, and an xor cipher is a common university lab exercise.
Comment by insanitybit 1 day ago
Comment by danielmarkbruce 1 day ago
If you were in a place to debate this, you would have known the above (or something similar) is what I was suggesting when i said train on plaintext, cipertext -> key, and you'd have some deep mathematical insight as to why no architecture known is likely to work. And you would also know I wouldn't be here talking to you about it if I really had a solid idea of an architecture that is likely to work.
Comment by insanitybit 17 hours ago
I think it would make sense to explain how a theoretical model could do better than SAT. Otherwise, is the idea here just "magic is possible"?
Comment by danielmarkbruce 14 hours ago
Current SOTA language and vision models, or models used to predict protein shapes are magic by the standards of 2016. As for why could it be better than a SAT? Why couldn't it be? Models are better than deterministic, logically written software for lots of situations. You can create infinite training data for this problem. The number of humans that work on encryption is tiny. The idea that because humans haven't figured out how to break some encryption schemes it can't be done is kind of absurd.
Comment by catlifeonmars 1 day ago
Comment by danielmarkbruce 1 day ago
Comment by Monarch909 1 day ago
Comment by xtajv 13 hours ago
LLMs have not changed the calculus there.
Comment by biosboiii 18 hours ago
Comment by whateveracct 1 day ago
Comment by sghiassy 1 day ago
Comment by tptacek 1 day ago
Comment by SKYNET800 1 day ago
Comment by cootsnuck 1 day ago
Comment by SKYNET800 1 day ago
Comment by ande-mnoc 1 day ago
Comment by SKYNET800 1 day ago
Comment by inigyou 19 hours ago
Very large amounts of the code are also spent on useless details like logging, and monkeypatching matplotlib, that no human would spend so much code on.
Comment by SKYNET800 4 hours ago
Comment by zparky 14 hours ago
Comment by sghiassy 1 day ago
Comment by OJFord 1 day ago
LLMs are capable not just of calculating the most likely next word from a prompt according to a corpus of training text, but of doing so & feeding back into themselves, the most likely word now based not only on the corpus but on the basic prediction, a second (nth) stage of thought.
Yes it's all still token prediction, but it's predicting conversation between let's say not experts but capable speakers with all the information at hand. Undergraduates if you like. And such conversation can yield real results.
Comment by sghiassy 1 day ago
I’ve even heard arguments that prediction is consciousness.
But using a Language-Model to break cryptography is still a stretch for me.
From the little I know, cryptography uses information theory to make sure that reversing the equation (aka finding the passowrd) is predictably impossible, given current compute standards for the foreseeable future (disregard quantum computer here though :) they’re not LLMs)
Comment by PlasmaPower 1 day ago
This is how cryptography has been broken in the past: not just advances in the amount of compute we can do, but exponential speedups in the algorithms to break them. While I agree with the author of this post that modern cryptosystems are very secure and LLMs are not currently near breaking them, I don't think it's unreasonable to consider that if LLMs continue to get exponentially smarter they may make strides in cryptanalysis that we had never considered and break cryptography in unexpected ways. After all, many past cryptography breaks have come from previously unknown methods of cryptanalysis.
Comment by sghiassy 1 day ago
I thought, that Information Theory could mathematically predict the computational challenge of factoring one massive number into its two original primes?
Is that not true? If you have just a random number (aka public key) can you just LLM your way to the private key??!?
Comment by PlasmaPower 1 day ago
And of course, many cryptosystems are reliant on primitives with much less algebraic structure.
But to be clear, LLMs would presumably break these cryptosystems by building new algorithms and writing code to break them, not by "intuiting" their way to a specific private key.
Comment by inigyou 19 hours ago
The rest of them rely on more practical considerations. Asymmetric crypto is generally based on some mathematical problem that we don't know how to solve yet (and think we never will) while symmetric crypto is generally based on brute-force-style mixing up the bits so thoroughly they seem impossible to unmix.
Comment by volkercraig 1 day ago
Comment by jerf 1 day ago
Comment by km3r 1 day ago
Comment by dadrian 1 day ago
Comment by catlifeonmars 1 day ago
Comment by sghiassy 1 day ago
I guess I only know asymmetric cryptography. I should learn more about symmetric…
Anyone care to boil it down for me :)
Edit: Isn’t this just advanced static analysis of any code base?
Comment by retrac 1 day ago
If the key is a set of truly random numbers the same size as the ciphertext, then this is a one-time pad, and it is truly secure in the information theory sense. Nothing other than knowing the original randomly selected key values can decode the ciphertext.
But of course, it's hard to come up with terabytes of random numbers at the drop of a hat, and to share them securely with the other party. So symmetric ciphers use pseudo-random generation techniques, to iterate through many pseudo-random keys based on one original key. With PRNGs the "randomness" may have patterns and that is the opening for a break in the crypto.
Comment by fluoridation 1 day ago
Comment by sghiassy 1 day ago
I wish I knew more in this domain.
It almost sounds like hashing with a salt
Comment by fluoridation 1 day ago
Comment by volkercraig 1 day ago
So the solution is to find algos that let you use a smaller key, but the side effect is that by pigeonhole principle, your keyspace is smaller than the message space, so it MUST be insecure. The trick is to make it so that it's only insecure enough that it's infeasible to break.
Comment by tptacek 1 day ago
Comment by inigyou 19 hours ago
Comment by what 1 day ago
Comment by random_mutex 1 day ago