4
$\begingroup$

I understand that a cipher suite should contain the MAC algorithm at the end.

So ECDHE-RSA-AES128-SHA256 should use SHA256 in HMAC for the MAC.

But what about the PRF? From the RFC this is what I understand: new cipher suites need to include the PRF at the end. The only "new" cipher suites I can think of is AES-GCM: ECDHE-ECDSA-AES128-GCM-SHA256 and here if I understand correctly, since no MAC is used SHA256 refers to the PRF p_SHA256?

I'm confused

$\endgroup$

1 Answer 1

4
$\begingroup$

HMAC is the underlying primitive used to construct the PRF. The cryptographic hash is used to construct the HMAC.

It is (at least) used to derive the session keys. The only thing that changes is that records that transport the data do not rely on the HMAC function anymore.

The PRF (and therefore the underlying HMAC) has one configuration parameter: the underlying hash function. This is what is specified at the end of the ciphersuite.

$\endgroup$
2
  • 1
    $\begingroup$ ah I see, so if I see 256, it is used as HMAC_256 for both the HMAC and the HMAC in the PRF. Except for AEAD ciphers where it is only used in the PRF. $\endgroup$ Commented Mar 7, 2016 at 20:02
  • 1
    $\begingroup$ Yes, although there is no such thing as HMAC_256. There is only HMAC_SHA256. HMAC requires a specific hash (you could for instance also construct HMAC_SHA3_256 although the HMAC construction isn't really required for SHA-3. In other words, the hash is the configuration parameter, not the output size. $\endgroup$
    – Maarten Bodewes
    Commented Mar 7, 2016 at 20:43

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.