If a wise person was unsure about which commercial cryptography standards are truly secure from the fascist powers that be, it would seem the obvious option for companies and individuals is to now use two independent algorithms to encrypt. To be clear I am not talking about a cascade cipher in CBC mode e.g. $Encryption_2$($Encryption_1$($plaintext$)), where an attacker can unravel one layer of encryption at a time because they have direct access to the resulting ciphertext from each algorithm.
I am talking about using two unique keys and two block cipher algorithms in Counter Mode (or stream cipher algorithms) to generate two unique keystreams, then XORing (⊕) them together with the plaintext. For example:
- $Key_1$ = 256 bit random key
- $Key_2$ = different 256 bit random key
- $IV$ = 128 bit random initialization vector for AES
$Nonce$ = 192 bit random nonce for XSalsa20
$Keystream_1$ = $AES$$_C$$_T$$_R$$(Key_1, IV, Counter)$
$Keystream_2$ = $XSalsa20(Key_2, Nonce, Counter)$
Ciphertext = $Keystream_1$ ⊕ $Keystream_2$ ⊕ $Plaintext$
- Decryption = $Keystream_1$ ⊕ $Keystream_2$ ⊕ $Plaintext$
- Data sent over wire = $IV$ | $Nonce$ | $Ciphertext$
The key exchange, MAC and transport protocol are out of scope for the question, I want to focus on the encryption part.
- It would appear that an attacker's methods of cryptanalysis for each individual algorithm would not work as they do not have access to the plain ciphertext of either algorithm because the keystreams from each algorithm are XORed together.
- Known plaintext cryptanalysis would not work either. For example the first 5 bytes are
hello
, and they have a resulting ciphertext ofxAi3z
. With a single keystream they could get those 5 bytes of the keystream which would be the plaintext ⊕ the ciphertext. Then over the course of multiple ciphertexts/known plaintexts there might be a weakness to deduce the original key which generated the keystream. However with two independent keystreams, a cryptanalyst can't know which combination of bits make up the combined keystream. For example: they know plaintext bit0
and ciphertext bit1
, but do not know whether the keystream bits were definitively a1
or a0
bit, nor which bit came from which keystream.
Advantages:
- Protection from non-public flaws or weaknesses in either encryption algorithm.
- Cryptanalysis is almost impossible?
- Decryption requires breaking both algorithms.
- Brute force required to find two random keys instead of one ($2^{256} + 2^{256}$) or $2^{128} + 2^{128}$ (on a quantum computer).
Minor disadvantages:
- Generating and exchanging two keys instead of one.
- Slightly more network traffic required to send an extra IV or nonce with each transmission.
- Slower encryption and decryption.
My questions:
Assuming both algorithms are implemented properly, the random number generators produce truly random data and there is an attacker in a privileged network position intercepting multiple ciphertexts, how or what kind of cryptanalysis could the attacker perform against this scheme to break the confidentiality of messages?
Is there a faster method than brute force to find the two encryption keys or break the confidentiality of messages?