Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4150305iob; Tue, 17 May 2022 15:23:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy12CT8wV9QF0YRnnGq472TOv27a8vEi163+CN6FQMywjgkcLM+T6STrrg7wsig07NSbkA7 X-Received: by 2002:a17:907:608e:b0:6fe:12f8:7967 with SMTP id ht14-20020a170907608e00b006fe12f87967mr17032477ejc.441.1652826202215; Tue, 17 May 2022 15:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652826202; cv=none; d=google.com; s=arc-20160816; b=RkjEnPt87TUVd6aoGlbwlH5hjFUYf20G8dKpi6r2P6zPM0aNF4Gycw9/IP/cX9QPiu FME9rCiB8b4hw0k8C0ndGNsWBfOCndbdLy2HdNtBKs38eSlLVILk7TOnSXf6HVU6r70/ bhX7Y6QItlotEw/ak07xetN5xPIVpSNpWIkYQDti3zJ/xofXUXkPTdClY3ja+7Tyy/Mi CDffgeEntYyrxzY0+paosod+1+MkKbA21nhHAm/NpefsEriSf678NJGVQAGo6TCSo3H/ 4tp5ER7UkixV/nblWQolLqjsOdLSbrfAr0vXCnT/bZE3Kn6ylt22XjFZHOyJF6Evc2tK hlVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GLxfMRWlDqJCqVnB0IaJbPRiH8haTaUzhJXTGYbu2uE=; b=UPnBtHtEnmv892qBNhjaVgn7zfJgWmgjPJoM9PQ8efER6D6B5CzqruCdvE/3GTlBtp 6ouaNI6iesiohdRojLKYcP5aWk2Q3b/D7h6RouJAWja8mXGTX81AOauZugdl9sfFU1hQ rbZYdtMQvfKYsJb56EN/QvphIFtyySlRRnyf1cQLGbnxYtp39/f6mzuWTDKlNjdNN1pT EQiltFgFX4DJtg4kWdaV77NOXs4FtEY586Bh6/fdtYb1ErDy4uPgcyEsz7O+yPguqABi LjkwRyq+n8CgWvsrgjWEKqn+HBnWDJKgdi8nAM6NBjHfdo5KChooAsNf5jFMFXSIQV05 4T9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=IilJz4sq; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w20-20020a05640234d400b00428166ac085si619620edc.41.2022.05.17.15.22.54; Tue, 17 May 2022 15:23:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=IilJz4sq; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351471AbiEQR1c (ORCPT + 99 others); Tue, 17 May 2022 13:27:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235136AbiEQR13 (ORCPT ); Tue, 17 May 2022 13:27:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6709A396BA; Tue, 17 May 2022 10:27:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0E2FAB81B1B; Tue, 17 May 2022 17:27:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B5C1C385B8; Tue, 17 May 2022 17:27:22 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="IilJz4sq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1652808440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GLxfMRWlDqJCqVnB0IaJbPRiH8haTaUzhJXTGYbu2uE=; b=IilJz4sqEicgZI5OMVtdivcdVlHTq1Rg6Pu7qkgijtuhKRntgRQ8i3VUQ7g1H+Hy9wFAeX rouEE4G/g0bPt2ghx/3eHUBc+McioIILlhtegmi3ETQ/lA/PZDVVnYhOCTWMJSAb7RVdGG gnm4HIjm1SSDp1eh2n3DcZqmuG9qC34= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id be7946cb (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 17 May 2022 17:27:19 +0000 (UTC) Date: Tue, 17 May 2022 19:27:08 +0200 From: "Jason A. Donenfeld" To: Ahmad Fatoum Cc: James Bottomley , Jarkko Sakkinen , Mimi Zohar , David Howells , kernel@pengutronix.de, Sumit Garg , Pankaj Gupta , David Gstir , Michael Walle , John Ernberg , James Morris , "Serge E. Hallyn" , Horia =?utf-8?Q?Geant=C4=83?= , Herbert Xu , "David S. Miller" , Jan Luebbe , Eric Biggers , Richard Weinberger , Franck LENORMAND , Matthias Schiffer , keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v10 2/7] KEYS: trusted: allow use of kernel RNG for key material Message-ID: References: <20220513145705.2080323-1-a.fatoum@pengutronix.de> <20220513145705.2080323-3-a.fatoum@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220513145705.2080323-3-a.fatoum@pengutronix.de> X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, May 13, 2022 at 04:57:00PM +0200, Ahmad Fatoum wrote: > + trusted.rng= [KEYS] > + Format: > + The RNG used to generate key material for trusted keys. > + Can be one of: > + - "kernel" > + - the same value as trusted.source: "tpm" or "tee" > + - "default" > + If not specified, "default" is used. In this case, > + the RNG's choice is left to each individual trust source. > + As a general mechanism, I object to this. The kernel's RNG must be trusted in the first place for key material. That's the whole point of it. However, it sounds like you're not proposing a general mechanism, but just something particular to this "trusted keys" business. In that case, this should be a module flag, and thus not documented here, but rather some place namespaced to your trusted keys stuff. "trusted_keys.preferred_rng={whatever}" Jason