Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751456AbdFFRaj (ORCPT ); Tue, 6 Jun 2017 13:30:39 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:38181 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbdFFRai (ORCPT ); Tue, 6 Jun 2017 13:30:38 -0400 MIME-Version: 1.0 In-Reply-To: <20170606172643.GC88445@gmail.com> References: <20170606005108.5646-1-Jason@zx2c4.com> <20170606005108.5646-5-Jason@zx2c4.com> <20170606030004.4go6btmobrsmqiwz@thunk.org> <20170606044404.GA3469@zzz> <20170606172643.GC88445@gmail.com> From: "Jason A. Donenfeld" Date: Tue, 6 Jun 2017 19:30:33 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [kernel-hardening] Re: [PATCH v3 04/13] crypto/rng: ensure that the RNG is ready before using To: Eric Biggers Cc: David Howells , "Theodore Ts'o" , Linux Crypto Mailing List , LKML , kernel-hardening@lists.openwall.com, Greg Kroah-Hartman , David Miller , Herbert Xu , Stephan Mueller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 782 Lines: 15 On Tue, Jun 6, 2017 at 7:26 PM, Eric Biggers wrote: > I agree that the use of ECB mode in big_key is broken, and thanks for trying to > fix it! I think using GCM is good, but please leave a very conspicuous comment > where the nonce is being set to 0, noting that it's safe only because a unique > key is used to encrypt every big_key *and* the big_keys are not updatable (via > an .update method in the key_type), resulting in each GCM key being used for > only a single encryption. Good idea. I'll make a large comment about this. > > Also, I think you should send this to the keyrings mailing list and maintainer > so it can be discussed and merged separately from your RNG changes. Yea, that seems like a good idea. I'll separate things out right now.