Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1297642rdh; Mon, 25 Sep 2023 08:35:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVAGUUE0JdPJ8TK2WN3hPP7BjJwoBJoyGmbtydvQ1w9Go67fnymfWVfcOGd64oWpHFvMRM X-Received: by 2002:a05:6358:5c0b:b0:145:68c1:4007 with SMTP id x11-20020a0563585c0b00b0014568c14007mr2981255rwe.27.1695656122176; Mon, 25 Sep 2023 08:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695656122; cv=none; d=google.com; s=arc-20160816; b=R19Wm3qXgqbeFUWBfCvkyEq05L2cBsZ4nXSmdNSXxkFYZqS1iGNlusFs/mxxONKqAg 6NDENCeyIIisjD+Dzrac/H/3WwIQgllvnB+/InNKU8idlZ3VzuABxR0SSCohhGXhtshE t6gAosZFClDAXBOU6IGTLECQvVyT6M+47eRP197POcZ5CEoNH7fKiNHFrJ57CancC9KT hJVECSzBsYVN7l/bpOPBae+gwVEkVdT0ljwAdt/+/MdHWfoYeUBBQYCHyXoq+YqVcvJJ SGXv4c4+cFWWY1yGxsrnlXkU17vKv8E+jDfB5bI/4nE2Q1Qx/1OCBScyIMINF7ss4pil Zp1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:to:from:subject:cc :message-id:date:content-transfer-encoding:mime-version :dkim-signature; bh=OGt2FOw6lDFFBJRltNV7eb25Y3RCJfPYVc/8wsDj+lM=; fh=nKAep/XDSMl8dj3CYRaqsln016/c4yXm8P0CkNLe6Pk=; b=ZZrf/uqvooHH6Zxpo9kuiE7V6z+J+c2tGkpnBn1PiPYY27OwdD4HPMR3lcgrKJpH9L viAWRTg09a/g1nW/KGmSNtvTYHdN7lsjT1J8S1Z5ltos9xadt8a2E/BNlveDLAF3FlRs RtMXkCgt/sQaKJkCRk3qwShvxmx695lI9e8SqiAfCjPM9wzDGD0NRikaA8NGh9r0s71p yei1UsqVZZlCuLI07veLs/0ZG6JN92Sh9fPGd0nEAAPYYnhxX/iGE9yP6bqUQ6wxFwVC I2/D4q9Lvy9/Az+b202U7Kcbengy41zvUZfYS41YvBe8As3vQdlOQeXVNbkb5XRuh/qS EzpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kp0VVt1I; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t12-20020a6549cc000000b00577f7b6e7b4si9978159pgs.624.2023.09.25.08.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:35:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Kp0VVt1I; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id A8A7E8079B71; Mon, 25 Sep 2023 08:22:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232553AbjIYPWj (ORCPT + 99 others); Mon, 25 Sep 2023 11:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232287AbjIYPWh (ORCPT ); Mon, 25 Sep 2023 11:22:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 838BB9C; Mon, 25 Sep 2023 08:22:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F12DC433C8; Mon, 25 Sep 2023 15:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695655351; bh=OGt2FOw6lDFFBJRltNV7eb25Y3RCJfPYVc/8wsDj+lM=; h=Date:Cc:Subject:From:To:References:In-Reply-To:From; b=Kp0VVt1IVmvLWEfHcZ2kGDvXU/kqTSlU+zkPCXYtz6OOHZKhyu9V5NSp0G4CcW036 DQ9LCiRXD6Q490pl7u8169h7tTEUAz8V7ziRXZiOnxF5dDnpKDrQj68Gjg0adng4T5 EC3+inaGcrSbVlkKIJs09PWUwziCRokB4AboyUs2UgQ2pt7Zy2tOwb59ADnu4WpGap yRdxENwoFnqspD1+SNBWaf1kvwgaAh2yycGM8qQMtVXclYdN2nIeGugErrwJvR4YEl H9OHYREey3oOXKbuXZV2mFLTFooU8OLOf/hOR2Asgxbi05opItQVsGdjANQ69Zqjb3 L4QCoe2YqHFVQ== Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 25 Sep 2023 18:22:22 +0300 Message-Id: Cc: "Shawn Guo" , "Jonathan Corbet" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Fabio Estevam" , "NXP Linux Team" , "Ahmad Fatoum" , "sigma star Kernel Team" , "David Howells" , "Li Yang" , "Paul Moore" , "James Morris" , "Serge E. Hallyn" , "Paul E. McKenney" , "Randy Dunlap" , "Catalin Marinas" , "Rafael J. Wysocki" , "Tejun Heo" , "Steven Rostedt (Google)" , , , , , , , , , "Richard Weinberger" , "David Oberhollenzer" Subject: Re: [PATCH v3 1/3] crypto: mxs-dcp: Add support for hardware provided keys From: "Jarkko Sakkinen" To: "David Gstir" , "Mimi Zohar" , "James Bottomley" , "Herbert Xu" , "David S. Miller" X-Mailer: aerc 0.14.0 References: <20230918141826.8139-1-david@sigma-star.at> <20230918141826.8139-2-david@sigma-star.at> In-Reply-To: <20230918141826.8139-2-david@sigma-star.at> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 25 Sep 2023 08:22:45 -0700 (PDT) On Mon Sep 18, 2023 at 5:18 PM EEST, David Gstir wrote: > DCP is capable to performing AES with hardware-bound keys. > These keys are not stored in main memory and are therefore not directly > accessible by the operating system. > > So instead of feeding the key into DCP, we need to place a > reference to such a key before initiating the crypto operation. > Keys are referenced by a one byte identifiers. Not sure what the action of feeding key into DCP even means if such action does not exists. What you probably would want to describe here is how keys get created and how they are referenced by the kernel. For the "use" part please try to avoid academic paper style long expression starting with "we" pronomine. So the above paragraph would normalize into "The keys inside DCP are referenced by one byte identifier". Here of course would be for the context nice to know what is this set of DCP keys. E.g. are total 256 keys or some subset? When using too much prose there can be surprsingly little digestable information, thus this nitpicking. > DCP supports 6 different keys: 4 slots in the secure memory area, > a one time programmable key which can be burnt via on-chip fuses > and an unique device key. > > Using these keys is restricted to in-kernel users that use them as buildi= ng > block for other crypto tools such as trusted keys. Allowing userspace > (e.g. via AF_ALG) to use these keys to crypt or decrypt data is a securit= y > risk, because there is no access control mechanism. Unless this patch has anything else than trusted keys this should not be an open-ended sentence. You want to say roughly that DCP hardware keys are implemented for the sake to implement trusted keys support, and exactly and only that. This description also lacks actions taken by the code changes below, which is really the beef of any commit description. BR, Jarkko