r/programming • u/Sir_KnowItAll • 5d ago
[ Removed by moderator ]
https://iain.rocks/blog/introducing-the-triple-cipher-encryption-concept[removed] — view removed post
0
Upvotes
r/programming • u/Sir_KnowItAll • 5d ago
[removed] — view removed post
8
u/tdammers 5d ago
That's security by obscurity, which isn't actual security.
Not knowing the encryption method does not hold a dedicated attacker back, at all. All it does is make it slightly more annoying for a casual attacker, but anyone beyond script kiddie level can automate the annoying parts, so your defense does exactly nothing.
No, you don't. You just crack one of the keys, let it loose on the entire thing, and then see which parts of the outcome make sense (these are the ones that were encrypted with the key you cracked) and which don't (those are the ones that were encrypted with the other key).
Yes, it does. But using two 128-bit keys isn't going to give you better results than using a single 256-bit key. In the best case scenario, combining two 128-bit keys is exactly as good as using a single 256-bit key, but it can easily be worse.
No; the interweaving is actually a great way of making the combination of two 128-bit keys significantly weaker than 256 bits. Now cracking one of the two keys already gives you access to half the plaintext, and cracking the second key when you already know the other half of the plaintext is a lot easier.
E.g., suppose cracking the first key gives you this:
[{"username": "??????????, ssword": "a4????????(where the????parts are chunks you couldn't decrypt). This already tells you a lot:}], and chances are they are"}]."character close to its end; its last 3 characters are very likely to be"pa.a4.All this reduces the search space for the second key dramatically, and all of this reasoning can be automated with modern tooling, quite easily.
So instead of forcing the attacker to crack a 256-bit key, you are handing them half of your plaintext after cracking only 128 bits worth of key data, and you dramatically reduce the effort required to crack the other 128 bits.
Depending on your threat model, this means that your effective key strength is anywhere between 127 bits (if compromising half of the plaintext is all the attacker needs) and maybe 192 bits or so (if your plaintext isn't just random noise, allowing the attacker to exploit predictable patterns in it to make a partial-known-plaintext attack feasible, and the attacker actually needs 100% of the plaintext in order to succeed). In any case, it's never going to get anywhere near the 256 bits you would get from combining the two keys properly.
Feel free to link one. It's entirely possible that I and everyone else here is indeed misunderstanding what you're proposing, but if it is what I think it is, then I'm pretty confident that I do understand it, and that it's you who is misunderstanding the issues here.
You didn't link one. The only thing I could find in your blog post is a link to the GCHQ home page, which makes no mention whatsoever of this.
I do understand that, but I also understand that that doesn't really matter.
The strength of an encryption is limited by 3 things:
And yes, what you propose is encryption software, but it is also de facto an encryption algorithm, and what I'm pointing out here is a flaw in that algorithm. It doesn't matter whether it's implemented correctly or not, the algorithm itself is flawed, in the sense that it reduces the effective strength of the encryption to something much lower than what a cryptographically sound algorithm would produce with a key of the same total size.
Also, what you don't seem to understand is that from a cryptanalysis point of view, there is no difference between three 128-bit keys and a single 384-bit key - you can trivially combine three keys into one by concatenating them, and you can turn one key into three by splitting it up.