Re: [PATCH 06/11] nvme: Implement In-Band authentication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/21/21 9:08 AM, Hannes Reinecke wrote:
> On 7/20/21 10:27 PM, Vladislav Bolkhovitin wrote:
>>
>> On 7/16/21 2:04 PM, Hannes Reinecke wrote:
>>
>> [...]
>>
>>> +struct nvmet_dhchap_hash_map {
>>> +	int id;
>>> +	int hash_len;
>>> +	const char hmac[15];
>>> +	const char digest[15];
>>> +} hash_map[] = {
>>> +	{.id = NVME_AUTH_DHCHAP_HASH_SHA256,
>>> +	 .hash_len = 32,
>>> +	 .hmac = "hmac(sha256)", .digest = "sha256" },
>>> +	{.id = NVME_AUTH_DHCHAP_HASH_SHA384,
>>> +	 .hash_len = 48,
>>> +	 .hmac = "hmac(sha384)", .digest = "sha384" },
>>> +	{.id = NVME_AUTH_DHCHAP_HASH_SHA512,
>>> +	 .hash_len = 64,
>>> +	 .hmac = "hmac(sha512)", .digest = "sha512" },
>>> +};
>>
>> "hmac()" is always here, so why not to just auto-generate hmac(sha512)
>> from sha512?
>>
> 
> ... all part of the learning curve ...
> If that's true then of course I can auto-generate the hmac name.

As far as I understand, this naming convention is as stable as any other
interface in the kernel.

Vlad



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux