4
$\begingroup$

My question is related to another question in Cryptography about TLS 1.1 and 1.2. I have read both RFC 2246 The TLS Protocol Version 1.0 and RFC 4346 The TLS Protocol Version 1.1. What I know is that one of their differences is TLS 1.0 uses implicit initialization IV (from the key_block) and TLS 1.1 uses explicit IV, which can be generated with either of the three ways specified in Section 6.2.3.2 of RFC 4346. In the same section, it is stated that

The decryption operation for all three alternatives is the same. The receiver decrypts the entire GenericBlockCipher structure and then discards the first cipher block, corresponding to the IV component.

The above statement is not clear to me. For example, if I have an encrypted message consisting of blocks

[Encrypted Block 1], [Encrypted Block 2], ..., [Encrypted Block n]
, does that mean that when decrypting, I should discard
[Encrypted Block 1]
from the other blocks and decrypt
[Encrypted Block 2], ..., [Encrypted Block n]
using
[Encrypted Block 1]
as IV?

  1. Is the above example correct? If not, how can the IV to be used for decryption be determined?
  2. Is the decryption for TLS 1.1 the same as TLS 1.2?
$\endgroup$
  • $\begingroup$ Yes, this is true if we have a CBC cipher (or even an AEAD cipher, which also has a nonce/IV and is supported in 1.2), not for stream ciphers, of course. 1.2 works the same way. $\endgroup$ – Henno Brandsma Mar 2 '15 at 19:10
2
$\begingroup$
  1. Is the above example correct? If not, how can the IV to be used for decryption be determined?

Yes, it is correct. The vector/mask in CBC mode is generally the previous ciphertext block. The algorithms in 2a and 2b simply extends this notion to the IV so that the CBC mode encryption doesn't have to be re-initialized. The outcome of the IV decryption won't have any meaning, it's the ciphertext block itself that is reused.

In dumb implementations of CBC / block ciphers the re-initialization may take time because it may replay the subkey derivation for the cipher. In general though using the first block directly as IV will be more efficient because it skips one block decrypt.

  1. Is the decryption for TLS 1.1 the same as TLS 1.2?

Yes, see below:

opaque IV[SecurityParameters.record_iv_length];
          block-ciphered struct {
              opaque content[TLSCompressed.length];

although described somewhat differently the IV length is the same as the size of the block for CBC. It is directly followed by the "opaque" (encrypted) content.

$\endgroup$
  • 1
    $\begingroup$ As this question was only answered in the comments, I've tried and expand the answer a bit here. Please do not answer questions in the comments as the question will remain open. $\endgroup$ – Maarten Bodewes Nov 28 '15 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.