From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 476A5C4167E for ; Tue, 17 May 2022 18:21:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352044AbiEQSV3 (ORCPT ); Tue, 17 May 2022 14:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352029AbiEQSVB (ORCPT ); Tue, 17 May 2022 14:21:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A449CEE2F; Tue, 17 May 2022 11:21:00 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1F57061572; Tue, 17 May 2022 18:21:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1A66C34100; Tue, 17 May 2022 18:20:56 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="ZuGFcQ7H" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1652811655; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wrNAXMhJ8mMt1s0emycVPYEmjWKKVUxh1cIx7NgNQRA=; b=ZuGFcQ7HqjJE6N/4FKfja7HhkUhhKfJLBlFfarWuglq47CTKhYlOtPcM+KWWz8Ryujubva V75Gu2dAXANAViWkoeVd3kc+sQQf2Xv/XnwGClh3Qy+tdOxPgLV4CFLnV52WR/D3o/ATOk vh2lzem+aoZbYLqk3DGEeg1gYcgYcYM= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id daf36959 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Tue, 17 May 2022 18:20:55 +0000 (UTC) Date: Tue, 17 May 2022 20:20:49 +0200 From: "Jason A. Donenfeld" To: Jarkko Sakkinen Cc: Ahmad Fatoum , James Bottomley , 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> <0e8da958a222e5c1dccaaf1600b08bdb8705b48e.camel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0e8da958a222e5c1dccaaf1600b08bdb8705b48e.camel@kernel.org> Precedence: bulk List-ID: Hi Jarkko, On Tue, May 17, 2022 at 09:10:57PM +0300, 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 Sorry, I didn't mean to seem unrelaxed. What I meant was that as a general mechanism, it doesn't make sense, but it isn't a general mechanism, it's a particular one for trusted_keys, which led me to question why it seemed to have such a general name like "trusted.rng". Ahmad pointed out that the trusted prefix actually isn't general. It's what trusted_keys compiles its module as. So just a misunderstanding. It appears to be a module param after all. Sorry for the noise! Jason