Nb: block_length Nh: hash_length (output length)
Formula for maximum input length for a LabeledExtract IKM: max_input_length - Nb - size_label_rfcXXXX - size_label_local
Formula for maximum input length for a LabeledExpand info: max_input_length - Nb - Nh - size_label_rfcXXXX - size_label_local - 2 - 1
Properties of Hash functions in bytes:
Hash in HKDF | max_input_length | Nb | Nh |
---|---|---|---|
SHA256 | 64 | 32 | |
SHA384 | 128 | 48 | |
SHA512 | 128 | 64 |
- max input length definitions in HACL*
- block length definitions in HACL*
- hash output length definitions in HACL*
Label sizes in bytes:
label | size_label |
---|---|
"RFCXXXX " | 8 |
"psk_hash" | 8 |
"pskID_hash" | 10 |
"info_hash" | 9 |
"sec" | 3 |
Maximum input length in bytes, inclusive bound:
SHA256 | ||
---|---|---|
psk | extract | |
pskID | extract | |
info | extract | |
exporter_context | expand |
SHA384 | ||
---|---|---|
psk | extract | |
pskID | extract | |
info | extract | |
exporter_context | expand |
SHA512 | ||
---|---|---|
psk | extract | |
pskID | extract | |
info | extract | |
exporter_context | expand |
Maximum input lengths in bytes, inclusive bounds:
SHA256 | SHA384 | SHA512 | |
---|---|---|---|
psk | |||
pskID | |||
info | |||
exporter_context |