Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5421675pxv; Wed, 21 Jul 2021 05:12:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUd1wVM+oUD3yVRvMzh3r8e4Ih602Wfijiwpw1o59RNobH0n+n8dAiaE2/DAxgSh7hEBOr X-Received: by 2002:a05:6402:1d37:: with SMTP id dh23mr47021855edb.360.1626869538966; Wed, 21 Jul 2021 05:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626869538; cv=none; d=google.com; s=arc-20160816; b=lcWmNLETYScwydiGX04KYVAylgDT/tt3mq5EnBklYoQux9SLG/2CitxwF1uiBK/28h a58RJFKmPZMx35iTlpNue3GLqXdxPl7BWt/w0kVg2eQvHD0DfmG8NPvz9ovxBCLAAyV9 38eyGuNIU/XW6rEC8tTZNxDVj70ScfxzIokuCKDLv0UaJ3dmCxBlJoaWtFy7sJOGPcqh wkl9bLBvBr/X3tXfloxmYQKZSkvo2Sx4WFQ2zQYxZleHj4skvdPiWO6yISwHLy9S3tV9 1Kcj9EZ0vYwC/2oIso7Ux851xONzOKIRTrwVOd1v6O1wHdeKhViMTNOdVfllCF8mo91a qATg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=L52jYYLWPZ6HasoQoandc7tA3Uliqo9zZsmZoRzrbYY=; b=Nnd8T3ETY/OfYdGsbs0tfKsMvBVexP1EIxCqA4VrmoxKB2amEpBFHIEUIb8zdDwb5V 3pcj8kiJZau62WZCENCv8jJB+mmaGIALgo9jBPXzSePPTEgmTzS87KivHIm0f6g7ZPSK mKENG7JVOOFTG1z/me1MhiMg7+ZT+fmzN/DpnyXxeyuu0kluTN9OqX6H/rm6didtwonA Fjzszy4T60N+UFk9SdBPSBu1b5w5xNqGRT/fzjwiJ1l22UQ1gCb5XZdUJHAqlaDgOF2j iqmq1GMisN7zMzTYCK8kEyvv7+D3o1mltus7RGgjBu/eGb1i1EdgUV8vw9+C2dR3cwPm BugQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd9si6258798ejc.348.2021.07.21.05.11.40; Wed, 21 Jul 2021 05:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237042AbhGULad (ORCPT + 99 others); Wed, 21 Jul 2021 07:30:33 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:51649 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236765AbhGULac (ORCPT ); Wed, 21 Jul 2021 07:30:32 -0400 Received: from [192.168.0.113] ([178.252.67.224]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.163]) with ESMTPSA (Nemesis) id 1MIMKq-1lu7qu2Piu-00EQ2C; Wed, 21 Jul 2021 14:10:48 +0200 Subject: Re: [PATCH 06/11] nvme: Implement In-Band authentication To: Hannes Reinecke , Christoph Hellwig Cc: Sagi Grimberg , Keith Busch , linux-nvme@lists.infradead.org, Herbert Xu , "David S . Miller" , linux-crypto@vger.kernel.org References: <20210716110428.9727-1-hare@suse.de> <20210716110428.9727-7-hare@suse.de> <2946f3ff-bfa5-2487-4d91-c5286e3a7189@vlnb.net> From: Vladislav Bolkhovitin Message-ID: <2bbd7b78-df4c-a106-06ec-5b0ee409f2b6@vlnb.net> Date: Wed, 21 Jul 2021 15:10:28 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:8fX40Evi9CjcPavknM2HmotvQNm6H4z0k8Rcorz30fdwby9lg+q MBL3+ytramcbxWZvPWJCoj+wcPCZ6EdnfidB+3G8MFXnYeD6Myl9zQOkmN3De95yV2HQ4Xi Pj5Sn5ffdjwAvZGRFzZqmKmfATv0rMHHvGTY+hDO4Fg0qYOSNsy5uEsmpui9cd3pv8EWcO6 Dnvv6SJjEovvz+ls9xFVQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:vOA8wUJZz58=:VEPtDi2xoanYA1CmMIxfp9 NZjrXWZiOQEGkkLCOANcAF8FwiZQvT0uoVWpKxVW/3JskXAmQyueXLzxb1ffml0aqKN4kd/ew Wv4Pt4cBe+tyrURTtqJyaEUOl1CcAJI6SYhCu1FKnX1o6chAto7YBTwiLfkXkryDpuVw6eBg4 RR4yyGVeysZ3TxsXlHp64cOJzcq4CBhNRS2huLnw7LGQi17pFyh9DJRZpWc5Boz3BfQQz5w5n 6YB3zEz4nZUK0IcSkoT8vuh+PnbTn1TxlYm+D19mR5qPJGpi6qpR6BF0k1Xo4wCIByL51cG+p KSNcOu1MTOzQwaVrhWtEb2cEg1Dvs+R34D0pUJeWIEn0TE20Ym7VQn5SrZze5LZjNiX+dg8fc AW9zu2kny1b7pH/QRnVBfV3TgD5FHFYL1eVlolNc9F+OzSTNGhLqAOBbDrRLfpZ3HWP5Cfeu7 E6G/W/VJhW+9LeKFFV+PmWTsKrFbn6s4m0fzrl1Y4kPOqntWcNSd+jMtQLrFOFZRjHXgvrrHB 4PK5Bf9JsIVML82qypov3+fH+KBIHYWF+vCYHXTbCcQgNj8XAQ1A/xCYIJeJu7cK+STzv2/i2 OMkhk0U+cfhQ0aPdKUu1F0/njtXfcbqZbw2i2wk30qXDVeIt6Zjim6SZB12yaYgIBrCkahxFY 6IbcqFBveSNclb3jtUGWG3q0YrZqgyDF8iXQ95IRjuUzlk2XMoKOxetU7bQuXgcCrbhbxOrVw h22J6+kVL6Y+lBBqs0eZkwnP/29/5JrBeySirrfvoXiTm+9rb7Oa598FBsChC+8dW2T+R/uwA zfA53SbOIax/zavviaQMNSf+Hqkp2Luz0tjsBTEMFVxpVmMPY9uDxWthSF0C/5DrjekMT5E Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org 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