1
$\begingroup$

The RFC 5246 defines generic block cipher as follow:

struct { opaque IV[SecurityParameters.record_iv_length];

      block-ciphered struct {
          opaque content[TLSCompressed.length];
          opaque MAC[SecurityParameters.mac_length];
          uint8 padding[GenericBlockCipher.padding_length];
          uint8 padding_length;
      };
  } GenericBlockCipher;

The MAC is generated as described in Section 6.2.3.1.

Does HMAC cover IV, padding and padding_length fields ?

$\endgroup$
0
$\begingroup$

Does HMAC cover IV, padding and padding_length fields ?

As stated in 6.2.3.1, for stream and block ciphers,

The MAC is generated as:

  MAC(MAC_write_key, seq_num +
                        TLSCompressed.type +
                        TLSCompressed.version +
                        TLSCompressed.length +
                        TLSCompressed.fragment);

That is, the MAC is done on the plaintext (that's what TLSCompressed.fragment is, if you don't do compression). The TLS header is prepended, but no other modification is done. Hence, it does not include the IV, padding or padding_length.

$\endgroup$

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.