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

Does HMAC cover IV, padding and padding_length fields ?


1 Answer 1


Does HMAC cover IV, padding and padding_length fields ?

As stated in, for stream and block ciphers,

The MAC is generated as:

  MAC(MAC_write_key, seq_num +
                        TLSCompressed.type +
                        TLSCompressed.version +
                        TLSCompressed.length +

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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