Top
Best
New

Posted by rowbin 2 days ago

LLMs won't break symmetric crypto(www.bfswa.blog)
76 points | 99 comments
zkmon 2 days ago|
Cryptographic systems are based on 1) mathematical impossibility of reversing some integer/mod calculation, 2) time required for a brute force attack, 3) correctness of algorithms and code used in implementations. The last part (algorithms and code) is where LLMs have a chance.

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.

mindwok 2 days ago||
> mathematical impossibility of reversing some integer/mod calculation > There is a loss of information in mods and integer computations making them one-way

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.

spwa4 2 days ago||
Indeed. They're based on the assumption that reversing these functions is inefficient using standard or quantum computing primitives, depending.
j16sdiz 2 days ago|||
> 1) mathematical impossibility of reversing some integer/mod calculation

You are describing asymmetric encryption. This article was talking about symmetric encryption.

Symmetric encryption is generally considered much harder to break than asymmetric encryption

deepsun 2 days ago|||
> mathematical impossibility of reversing some integer/mod calculation

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.

zkmon 2 days ago|||
Talking about proofs, there is no proof that just because AI found counter example for a conjecture, it can break math behind cryptography The belief that "if it did A and B it can do C,D,E ,,,Z" is what is driving the current AI hype.
akoboldfrying 2 days ago||
> there is no proof that just because AI found counter example for a conjecture, it can break math behind cryptography

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".

tptacek 2 days ago||
When we're talking about things like AES and SHA2, a common answer among experts to (1) is "probably no".

(That's not a common answer to the same question about, say, ECDLP, even leaving quantum aside).

wisty 2 days ago||||
Also AI seem pretty good at constructive proofs.

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".

xboxnolifes 2 days ago||||
> That's why algorithms got weakened by researchers regularly.

That's the 3rd point. correctness of the algorithms.

inigyou 1 day ago||
There is no such thing. There is just more thorough and less thorough bit-blending. Have a look at any symmetric encryption algorithm or secure hash - there's no magic there, they just do a bunch of stuff to thoroughly mix up all the bits. In the case of symmetric encryption, they constrain it to reversible mixing primitives. And cryptographic experience has shown how much mixing is enough mixing.

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.

xboxnolifes 1 day ago||
If there is no such thing, how have people found weaknesses in various cryptographic algorithms over the years? The weaknesses are incorrect algorithms.
tptacek 1 day ago||
They haven't. Excepting RC4, which is wildly different from every other mainstream cipher, the track record of practical block cipher cryptanalysis (of core algorithms) is meager. If you redesigned DES so that it had 16-byte blocks and keys and the round structure to match, but retained the rest of its core design decisions, it'd presumably be viable (if slow).
ifwinterco 2 days ago|||
You have a maze (a really, really complicated maze).

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

stingraycharles 2 days ago|||
Yeah, I wouldn’t say with certainty that LLMs will never break any symmetrical crypto algorithm. It will certainly require a lot of effort, but so does solving some hard math challenges and it has been proven successful in that in the past.

Most likely outcome will be that a security researcher is able to break one with assistance of / in collaboration with an LLM.

tptacek 2 days ago||
Symmetric cryptography isn't based on complicated math the way asymmetric cryptography it is. The right way to think about symmetric cryptography is that the core hard problem is simply making PLAINTEXT XOR KEY work, efficiently, with a key that repeats.
stingraycharles 2 days ago|||
Isn’t another aspect of it that it’s sufficiently random / unrecognizable, for example?

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?

tptacek 2 days ago||
You can certainly invent a weak block cipher, and an LLM would probably do a decent job spotting e.g. something that could be productively attacked with a SAT solver.
kadoban 2 days ago|||
> with a key that repeats

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.

tptacek 2 days ago||
There's a lot of basic computer science hiding in it that's been remarkably stable for generations of computer scientists, which is not something you can say about asymmetric cryptography.
kadoban 2 days ago||
Is there? Like...kind of, but on the face of it I'd say about the same amount in both. If you look back at DES there's a _lot_ in common with modern ciphers, but like, RSA is still in use and that's old as shit.

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.

tptacek 2 days ago||
AES doesn't reduce to a fundamental mathematical problem we're uncertain about, in the same way as discrete logs, factoring, the elliptic curve discrete log, or shortest vectors. It's a simpler idea, mathematically: rigorously understood linear operations to propagate key-driven changes quickly, disrupted by nonlinear operations to keep the cipher from being solvable with algebra, driven by a key schedule, and iterated enough times to destroy the signal that differential cryptography (and its analogs) would use to mount attacks.

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.

adrian_b 2 days ago||
For any kind of symmetric encryption method, if you are in the context of a "known-plaintext attack", i.e. where besides the cipher that was used you know both the non-encrypted text and its corresponding encrypted text, if you know a segment of text that is long enough, i.e. longer than the number of bits corresponding to the secret key and of some ancillary information that might be needed, like an initialization vector, the problem of breaking the cipher is known to have a unique solution, because it is equivalent to the solution of a system of equations that has enough equations to determine the unknowns.

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.

xoa 1 day ago||
>if you are in the context of a "known-plaintext attack", i.e. where besides the cipher that was used you know both the non-encrypted text and its corresponding encrypted text

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.

modeless 2 days ago||
I don't really find the "because it's difficult" arguments convincing at all. Especially the one claiming it's hard because it requires designing and running a large number of tests and reasoning about the results of each one. That kind of tedious grinding is exactly where LLMs should shine vs humans!

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.

cyberax 2 days ago||
There are very few computer-era symmetric ciphers that were truly broken. RC4 is probably the worst example.

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.

tptacek 2 days ago||
RC4 is a good example of what Aumasson means when he jokes about weak symmetric cryptography being a quirk of history. It's genuinely weird that RC4 was as popular as it was! DES is broken because it's small, with tiny keys and an 8-byte block. But if it had 16-byte keys and blocks, and presumably a higher round count, the only dealbreaker with it might be that it'd be slow.
adrian_b 2 days ago||
RC4 was fast in software for computers with weak CPUs (like 80286 or even 8086, which were still in use during the nineties) and no hardware assistance for cryptography. DES had been designed for computers that had a special DES hardware accelerator.

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.

dboreham 2 days ago||
I read it as "because there are no viable attacks", which is...fightin' talk I suppose.

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.

modeless 2 days ago||
Agreed, we have probably seen only the tip of the iceberg on that. I wouldn't want to be holding niche crypto coins right now.
tptacek 2 days ago||
This is JP Aumasson, the co-author of BLAKE2 and BLAKE3. Aumasson is notorious in cryptography circles for his "too much crypto" argument, that modern symmetric cryptography is overly conservative, running more rounds than are necessary given the very low likelihood that advances in computer science are going make a real dent in them.

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.

teravor 1 day ago||
symmetric crypto typically wants the eat the cake and have it too, it wants to be both secure and efficient.

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.

smalltorch 2 days ago||
Breaking modern encryption comes down to being in control of key generation rather than brute force. Other than that you'll have a hard time bute forcing 2^256 possibilities.

Comes down to a gut feeling but I lean that this stuff is already all figured out.

arberx 2 days ago||
LLMs will accelerate math research, increasing understanding in areas like quantum which will eventually lead to breakthroughs that will break most standard asymmetric encryption algorithms with the side effect of breaking crypto
tptacek 2 days ago||
Right, maybe, but Aumasson's whole point is that this prediction doesn't apply to AES, SHA2, BLAKE2, &c.
TheDong 2 days ago|||
What makes your prediction more likely than:

"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"

SideQuark 1 day ago|||
There are plenty of algorithms that quantum algorithms give no benefit to. Quantum is NOT a free for all making everything faster. It’s only faster at two very,very restricted things: hidden subgroup problem (which is used for RSA, but most problems do not rely on HSP), and Grover search, which reduces a specific search problem from O(N) to O(sqrtN).
tiahura 2 days ago|||
Arvin Krishna says 4 years
coderatlarge 2 days ago||
breaking some of these systems that humanity has been banging on for decades would be an elegant proof that the llms have outsampled us decisively. one word at a time, which is how we write too.
dsp_person 2 days ago||
What about checking crypto libraries for gaps like the coldcard situation of RNG code is correct but not in the release build somehow?
krupan 2 days ago|
That was such a stupid coding/code review/testing mistake. Finding it is not that impressive at all. It's nothing like finding a flaw in AES
amingilani 2 days ago||
> They’re time- and battle-tested

All conjectures are until someone with the time and energy proves or disproves them.

bahmboo 2 days ago|
Microsoft uses formal verification of their encryption code in production using SymCrypt.
More comments...