lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 23 Feb 2022 17:23:06 +0100
From:   Ahmad Fatoum <a.fatoum@...gutronix.de>
To:     James Bottomley <jejb@...ux.ibm.com>,
        Jarkko Sakkinen <jarkko@...nel.org>,
        Mimi Zohar <zohar@...ux.ibm.com>,
        David Howells <dhowells@...hat.com>
Cc:     kernel@...gutronix.de, Sumit Garg <sumit.garg@...aro.org>,
        David Gstir <david@...ma-star.at>,
        Tim Harvey <tharvey@...eworks.com>,
        James Morris <jmorris@...ei.org>,
        "Serge E. Hallyn" <serge@...lyn.com>,
        Horia Geantă <horia.geanta@....com>,
        Aymen Sghaier <aymen.sghaier@....com>,
        Herbert Xu <herbert@...dor.apana.org.au>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Biggers <ebiggers@...nel.org>,
        Jan Luebbe <j.luebbe@...gutronix.de>,
        Richard Weinberger <richard@....at>,
        Franck LENORMAND <franck.lenormand@....com>,
        Matthias Schiffer <matthias.schiffer@...tq-group.com>,
        Pankaj Gupta <pankaj.gupta@....com>, keyrings@...r.kernel.org,
        linux-crypto@...r.kernel.org, linux-integrity@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org
Subject: Re: [PATCH v5 3/5] KEYS: trusted: allow trust sources to use kernel
 RNG for key material

On 22.02.22 20:58, Ahmad Fatoum wrote:
> The two existing trusted key sources don't make use of the kernel RNG,
> but instead let the hardware that does the sealing/unsealing also
> generate the random key material. While a previous change offers users
> the choice to use the kernel RNG instead for both, new trust sources
> may want to unconditionally use the kernel RNG for generating key
> material, like it's done elsewhere in the kernel.
> 
> This is especially prudent for hardware that has proven-in-production
> HWRNG drivers implemented, as otherwise code would have to be duplicated
> only to arrive at a possibly worse result.
> 
> Make this possible by turning struct trusted_key_ops::get_random
> into an optional member. If a driver leaves it NULL, kernel RNG
> will be used instead.

The rebase on the change in scope of the previous commit made this
one here quite small. I would squash it into the previous commit
for v6, unless there are objections.


> 
> Acked-by: Sumit Garg <sumit.garg@...aro.org>
> Reviewed-by: David Gstir <david@...ma-star.at>
> Tested-By: Tim Harvey <tharvey@...eworks.com>
> Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
> ---
> To: James Bottomley <jejb@...ux.ibm.com>
> To: Jarkko Sakkinen <jarkko@...nel.org>
> To: Mimi Zohar <zohar@...ux.ibm.com>
> To: David Howells <dhowells@...hat.com>
> Cc: James Morris <jmorris@...ei.org>
> Cc: "Serge E. Hallyn" <serge@...lyn.com>
> Cc: "Horia Geantă" <horia.geanta@....com>
> Cc: Aymen Sghaier <aymen.sghaier@....com>
> Cc: Herbert Xu <herbert@...dor.apana.org.au>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Eric Biggers <ebiggers@...nel.org>
> Cc: Jan Luebbe <j.luebbe@...gutronix.de>
> Cc: David Gstir <david@...ma-star.at>
> Cc: Richard Weinberger <richard@....at>
> Cc: Franck LENORMAND <franck.lenormand@....com>
> Cc: Sumit Garg <sumit.garg@...aro.org>
> Cc: Tim Harvey <tharvey@...eworks.com>
> Cc: Matthias Schiffer <matthias.schiffer@...tq-group.com>
> Cc: Pankaj Gupta <pankaj.gupta@....com>
> Cc: keyrings@...r.kernel.org
> Cc: linux-crypto@...r.kernel.org
> Cc: linux-integrity@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-security-module@...r.kernel.org
> ---
>  include/keys/trusted-type.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/keys/trusted-type.h b/include/keys/trusted-type.h
> index d89fa2579ac0..4eb64548a74f 100644
> --- a/include/keys/trusted-type.h
> +++ b/include/keys/trusted-type.h
> @@ -64,7 +64,7 @@ struct trusted_key_ops {
>  	/* Unseal a key. */
>  	int (*unseal)(struct trusted_key_payload *p, char *datablob);
>  
> -	/* Get a randomized key. */
> +	/* Optional: Get a randomized key. */
>  	int (*get_random)(unsigned char *key, size_t key_len);
>  
>  	/* Exit key interface. */


-- 
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 |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ