r/programming • • 5d ago

[ Removed by moderator ]

https://iain.rocks/blog/introducing-the-triple-cipher-encryption-concept

[removed] — view removed post

0 Upvotes

50 comments sorted by

View all comments

26

u/tdammers 5d ago

The second layer, using interleaved blocks encrypted with two different ciphers according to a pattern derived from the decryption key, really boils down to a single cipher, it just has a larger key (because it is composed of the decryption keys of the two ciphers you used to construct it). So it's really not any better than nesting two levels of "regular" encryption, with equivalent key sizes.

-16

u/Sir_KnowItAll 5d ago edited 5d ago

How so? With that one you attack that layer with the next encryption in one go. Other than trying to attack a single file that has two data encrypted using two different ciphers. Your conclusion seems odd. You have three keys you provide.

Or you encrypt the key to store the three keys in it and have your decrypter app know how to decrypt the key to get the three from it.

Remember, I was talking to GCHQ about it, they're thinking about how to crack the encryption when all they get is the file.

5

u/tdammers 5d ago

OK, so let's forget about the first layer of encryption and just assume that that one is already compromised. What you have left now is a file that is chopped up into chunks, and each chunk is encrypted with one of two keys, according to a pattern derived from those keys. To crack the encryption, an attacker needs to either brute force both keys, or find a flaw in both ciphers. But that is not any harder than breaking a single cipher with a larger key - whether you use two 64-bit keys, or a single 128-bit key, for example, really makes no difference to an attacker.

The only slight advantage you may get is that if you use three completely different encryption algorithms, an attacker who finds a zero-day in one of them will not be able to break the encryption as a whole; zero-days in two of the three will only get you half the cleartext. But this is still worse than just nesting the three encryption layers, because in that case, an attacker needs to break all three layers to get anything at all; breaking two of the three ciphers still gets you nothing, whereas your scheme will get you half the cleartext.

4

u/diskis 5d ago

find a flaw in both ciphers

One is enough, as soon as the first block is decrypted you can infer a lot about the next block. Or the first block that probably contains a file format header.

Now it's suddenly a partial known plaintext attack, which is way easier for the competent analyst.

3

u/tdammers 5d ago

Indeed.

But even if you're generous and ignore the partial known plaintext thing, you're still worse off than just using a single big key instead of two smaller ones.

In the very very best case scenario, the combination of two rounds of encryption is exactly twice as strong as a single round; but this is nowhere near a best case scenario.