[PATCH 04/10] nvme: add nvme_auth_derive_tls_psk()
Christoph Hellwig
hch at lst.de
Mon Feb 3 21:23:34 PST 2025
On Mon, Feb 03, 2025 at 02:37:59PM +0100, Hannes Reinecke wrote:
> On 1/28/25 09:58, Christoph Hellwig wrote:
>>> + info_len = strlen(psk_digest) + strlen(psk_prefix) + 5;
>>
>> Where does the magic 5 come from?
>>
> Two bytes for the HASH ID, two bytes for the length field from
> HKDF-Expand-Label, and one byte for the space separator.
Well, that's information that needs to go here. If at all possible
using a struct, but otherwise at least using a documented constant.
More information about the Linux-nvme
mailing list