0

Assume I encrypt byte array A, resulting in encrypted byte array E. I next split E into two smaller arrays, E1 and E2.

If I ONLY have either E1 and E2, can they be decrypted, or do both E1 AND E2 need to be present, in the correct sequence, in order for the data to be successfully decrypted? Can any useful information (i.e. some subset of A) be extracted from either E1 or E2 independently?

I realize this may depend on the encryption algorithm. I am primarily curious about common key pair algorithms such as RSA.

arosca
  • 469
  • 7
  • 15

1 Answers1

3

It depends mostly on the mode used by the encryption, though it depends on the algorithm as to what modes are possible.

Using a streaming mode (CTR or CFB or OFB) the answer is generally 'yes' -- you can decrypt whatever part of the stream you receive, though with feedback modes, some may be lost.

Using a block mode (ECB or CBC) the answer is 'somewhat' -- you can decode any complete blocks you get, but any partial blocks will be unrecoverable.

Using a cross-block mode (not a standard term), the answer will be 'no', as these modes are designed specifically for that property.

RSA has a large block size and is generally used in block mode to encrypt a single block (which contains a symmetric session key), so having only part of the one block will generally mean you won't get anything.

Chris Dodd
  • 119,907
  • 13
  • 134
  • 226
  • There's also a special case if one of the arrays `E1` and `E2` is very small, and you retain the larger array. In that case one could conceivably brute force the missing portion. – lockcmpxchg8b Dec 20 '17 at 03:07