Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2363015rdh; Tue, 26 Sep 2023 23:30:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3r42/3mFlUQdLuj3ptnZSQ5K4TUL03+OhgijnRfnUv40XLsMucP3YBR+p2BQ5QVrGHpQD X-Received: by 2002:a17:902:82c1:b0:1c6:d1f:514d with SMTP id u1-20020a17090282c100b001c60d1f514dmr928230plz.45.1695796258733; Tue, 26 Sep 2023 23:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695796258; cv=none; d=google.com; s=arc-20160816; b=xqH95mc36X57s6rkijJ6BKZtbWDrX4B/zEZGmxsfsz38fzIVvo1oBGqcw/K5+YZeIe /7xbtE2uS7+yj8U1GmXBtx4AilOV4zcDuyqhrjuJVvuOwtY4f/C2zvrH884sAYBBzgbM CWy+5cRakeaEGUwSRbg4fqTq1d9DbqkIXtpUltUZCkinM7nxEHA5TA/6gnj+doq8+uJV SEMMF/gQAZFQS3/m2khXnFg/xo3o0IdG7x4BxqQTfOUqa3/usPfVEi9NB68n1h1wc9NQ xGwuo24Qzj3ezbu1so6AYMIOtaWhy16WusJA7T02NvSLF1bLnkenYU5u3kRWOL7efsmy TF5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=e/2T+kTv/JcuflJsGd2CXCzB7+oY7taYM7m20LJ70dY=; fh=skGkSKAiziMWcDgxnrG4majkPUa+1f46BTRluEnim3g=; b=Sa9cbEtN/Dp3WjIzZo8EyuOHItpssD3WgEUEPJd28huGb6yENbIbzwIl5+V5jhOcQq VYyCsp0elhEVK+eTQDyPg3h+9m7/xQmgEJbl8rYpEPm8lmRWogXl0Hp3CVCjpHofE6km jecbwiA2Vk2on86EadW61xLdme4nI7GhnA+PGHhGyzHedSmSqokowwkMDKmWXziyLZbA /StY5rgoZIWyPE/NAQnA4duYiE0kTeghmtVUtsUI+okuVjKZPkJCoil18CNhKLE9x4Dc 41ioM0a95ybEHxbq8EOLYN/eW+qapn/pJQOEZ0AscrkHgRt785tBjslLcb2x+q4gbmxe Sx/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sigma-star.at header.s=google header.b=VFohLm3h; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sigma-star.at Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l13-20020a170902f68d00b001c6083dbfe9si10535540plg.593.2023.09.26.23.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 23:30:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@sigma-star.at header.s=google header.b=VFohLm3h; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sigma-star.at Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id CDC52807123E; Tue, 26 Sep 2023 23:25:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229703AbjI0GZt (ORCPT + 99 others); Wed, 27 Sep 2023 02:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229555AbjI0GZq (ORCPT ); Wed, 27 Sep 2023 02:25:46 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD007D6 for ; Tue, 26 Sep 2023 23:25:39 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9b281a2aa94so716913066b.2 for ; Tue, 26 Sep 2023 23:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigma-star.at; s=google; t=1695795938; x=1696400738; darn=vger.kernel.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=e/2T+kTv/JcuflJsGd2CXCzB7+oY7taYM7m20LJ70dY=; b=VFohLm3h8u7dS+QaCKcE42bLOQ/JXYcZgbCLmSPA2AKaeJeuC0qbjbrpzY25wtEPlU LsmHessL1mPfqJCozBlq21GBXroG4lOnvFulV+UbHlRCIR51TfOsXT2bcKVQbCw/fGRQ o8nBmAS2zizgTzM+IKWSGNO6cSgRYstk7C2huu56I3A+r+AG+xH5twZpKPEJcTv/ZSER 9t5IqKPranxIkGfqQcjaHl8NtsmJoerix+U2rZtqWEyPBaFF9qy9YS1fyEjvH+yjOqVK b/hcCb3oIHm4PG/xcw9/igv3krje/tVe5G7mkgN786PcZgayZKPcet4zXk+uwcgBsYj5 60dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695795938; x=1696400738; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e/2T+kTv/JcuflJsGd2CXCzB7+oY7taYM7m20LJ70dY=; b=qn0/g4zPQz/fFebFtlvaCzJ+/fKebP7v4xRRWNHVk6AcLxfGlkD4RlXGc/GPw1/ayf AY0+rHzqmDQ92GBLGnMB7xnjey4ceBWPsayNCNxJT7u4Dvk8Bhq57H8MLBKKbVKU8TCa 7UzDnYKLfHOiqezZhg6ySjtUxr2W7ipxxC4IywUbEJbUL/jswd5/ZiFs6G85okE88X6+ KTP89rzepDCXTIvG0bTkm8WoFz5vZDmeeZSn8BLh5mxr/ZuDQg6MQxB/FAir8m+o382l q2U0D0J69Z8dbNaPZ4vxaCR/xq3FEC/0Q10GooRTN9GVti9GxOF+T2q53dFjWf/Efc/q rz0Q== X-Gm-Message-State: AOJu0YyICVM5W8BwNs/i7DEearm3hDxo9JMDvAsswrAmOsA/xSSCYXnd 46TY6RKbO3Wwjmy7oU7FAXKRDw== X-Received: by 2002:a17:907:7858:b0:98e:26ae:9b07 with SMTP id lb24-20020a170907785800b0098e26ae9b07mr860495ejc.35.1695795937865; Tue, 26 Sep 2023 23:25:37 -0700 (PDT) Received: from smtpclient.apple (213-225-13-130.nat.highway.a1.net. [213.225.13.130]) by smtp.gmail.com with ESMTPSA id rh27-20020a17090720fb00b009930c80b87csm8868973ejb.142.2023.09.26.23.25.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Sep 2023 23:25:37 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: [PATCH v3 1/3] crypto: mxs-dcp: Add support for hardware provided keys From: David Gstir In-Reply-To: Date: Wed, 27 Sep 2023 08:25:24 +0200 Cc: Mimi Zohar , James Bottomley , Herbert Xu , "David S. Miller" , Shawn Guo , Jonathan Corbet , Sascha Hauer , "kernel@pengutronix.de" , 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)" , linux-doc@vger.kernel.org, "linux-kernel@vger.kernel.org" , "linux-integrity@vger.kernel.org" , "keyrings@vger.kernel.org" , "linux-crypto@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, "linux-security-module@vger.kernel.org" , Richard Weinberger , David Oberhollenzer Content-Transfer-Encoding: quoted-printable Message-Id: <88FFAB6B-10A8-4732-A901-50859E22352D@sigma-star.at> References: <20230918141826.8139-1-david@sigma-star.at> <20230918141826.8139-2-david@sigma-star.at> To: Jarkko Sakkinen X-Mailer: Apple Mail (2.3731.700.6) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 26 Sep 2023 23:25:51 -0700 (PDT) Jarkko, > On 25.09.2023, at 17:22, Jarkko Sakkinen wrote: >=20 > 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. >>=20 >> 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. >=20 > Not sure what the action of feeding key into DCP even means if such > action does not exists. >=20 > What you probably would want to describe here is how keys get created > and how they are referenced by the kernel. >=20 > For the "use" part please try to avoid academic paper style long > expression starting with "we" pronomine. >=20 > 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? >=20 > When using too much prose there can be surprsingly little digestable > information, thus this nitpicking. Thanks for reviewing that in detail! I=E2=80=99ll rephrase the commit messages on all patches to get rid of the academic paper style. >=20 >> 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. >>=20 >> Using these keys is restricted to in-kernel users that use them as = building >> 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 = security >> risk, because there is no access control mechanism. >=20 > 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. >=20 > This description also lacks actions taken by the code changes below, > which is really the beef of any commit description. You=E2=80=99re right. I=E2=80=99ll add that. Thanks, - David