Maximum output of HKDF I got a question with the RFC of HKDF https://tools.ietf.org/html/rfc5869.

There is a maximum specified for the output keying material. The length of the OKM shall be &lt;= 255*HashLen. What does it mean? For example there is a hashfunction with output of 32 byte. Is my maximum OKM then 255*32 = 8160 Byte? Or does it mean, my maximum repetition in the loop is smaller or equal than 8160? So that would mean, that you can generate 8160 (rounds) * 32 (per round output) 261120 Byte output.

I am a little bit confused...thanks for help.
The former. Maximum output must be &lt;= 255*HashLen. So for SHA256 which has a digest of 32 bytes, max HKDF output would be &lt;= 8160 bytes. For SHA512 which has a digest of 64 bytes, max output must be &lt;= 16320 bytes. I can't imagine you would need a key longer than 8160 bytes. If you require multiple keys you can use the 'info' parameter for different contexts/keys from the same PRK.