Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4146922iob; Tue, 17 May 2022 15:17:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJws987YJZUJl4fb5N3HPHLKzatZhkyGj8EN2mewBu/Sff0f3gbdVhvLIseDjqK0AW1KJcUj X-Received: by 2002:a17:903:2443:b0:161:bc26:825 with SMTP id l3-20020a170903244300b00161bc260825mr1689807pls.32.1652825842096; Tue, 17 May 2022 15:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652825842; cv=none; d=google.com; s=arc-20160816; b=EySgb1BGXzqLgFZlIkTbFvSxGiM9PQVJKqZapWnllOZoJbrNfF/joAnH0kPjbrqhe8 V6hkV/dU22ZaSbyHKnRNRCFs4MXrpBZGspnyMq/UlXYQDRsEuyglpxIbrKp/t24GHdgE W/S2Qv2O1fLtyJjZ0wS7o+fPdSuKkrIrz8B5jabaSWKcGWNxtT2aLLFhQOYEsaBXRelI SkjWBUmTUd+bzRRCabzr+QXgxiK8ua+kal9Ie8oUD3WC8+37an9zwzIbgzw9id23blUo nIMLDl28vBAEzBKCoib6KqJWhcT6ItGaIevyJjwStDOhZ1J/WwEVU8x6zqi85sXNjwwK S2GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=lj3Sip4nzgFO/pZuszV1sneXMi0AaiCMCYwShe8813A=; b=kC6o7/TDOUur8WfmR+JenezzN12qVayNjwIjaP37Rkm+ZI3aC2MEJF6eB3j00CmCJL DoYOZDLMv62KjN1FpX03eqAxfS9j7p7T498LuBhM1ZOjI0/pGVJqVdpvFVwM8qB9k/1I 3Z+Wzbi+SjtVq1LaTpP+f89piK+WvdxSpwDRsV8jNwPJUoE1LdwSSP7Ba4exd6hRoZLw CW8D3krTRrFRHTKla9CzOH8fjrpFFZpjsHp9iVLRFmZokqfXeeORTmV4Dvpb/vaQXiCL iMe4OvgcfBl/LvjBMtWGL01igkiAxogBJVxS3DWol+y2miU/fv4JFF1kT8TEExxUBWRo BROQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f14-20020a63de0e000000b00398df5b29a7si116359pgg.878.2022.05.17.15.16.49; Tue, 17 May 2022 15:17: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352032AbiEQSV2 (ORCPT + 99 others); Tue, 17 May 2022 14:21:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352057AbiEQSVI (ORCPT ); Tue, 17 May 2022 14:21:08 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 598EC1209F for ; Tue, 17 May 2022 11:21:07 -0700 (PDT) Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1nr1oL-0004tm-Pf; Tue, 17 May 2022 20:20:45 +0200 Message-ID: <53d39f27-e245-d9d3-12a2-755b4863b40d@pengutronix.de> Date: Tue, 17 May 2022 20:20:36 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH v10 2/7] KEYS: trusted: allow use of kernel RNG for key material Content-Language: en-US To: Jarkko Sakkinen , "Jason A. Donenfeld" Cc: James Bottomley , Mimi Zohar , David Howells , kernel@pengutronix.de, Sumit Garg , Pankaj Gupta , David Gstir , Michael Walle , John Ernberg , James Morris , "Serge E. Hallyn" , =?UTF-8?Q?Horia_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 References: <20220513145705.2080323-1-a.fatoum@pengutronix.de> <20220513145705.2080323-3-a.fatoum@pengutronix.de> <0e8da958a222e5c1dccaaf1600b08bdb8705b48e.camel@kernel.org> From: Ahmad Fatoum In-Reply-To: <0e8da958a222e5c1dccaaf1600b08bdb8705b48e.camel@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: a.fatoum@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hello Jarkko, On 17.05.22 20:10, Jarkko Sakkinen wrote: > On Tue, 2022-05-17 at 19:27 +0200, Jason A. Donenfeld wrote: >> 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. > > I would relax this a bit: kernel's RNG must be implicitly must be > trusted. If the parameter is used, you make an explicit choice that > you are aware of the trust. > > If this was opt-out parameter, instead of opt-in, I would get your > argument. > >> 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}" > > However, I think this a good proposal. Let's make it a module parameter > instead. It's already a module parameter. > >> Jason > > BR, Jarkko -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |