[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6581107.6MsbyqD4B1@positron.chronox.de>
Date: Fri, 14 Jul 2017 17:50:06 +0200
From: Stephan Müller <smueller@...onox.de>
To: Eric Biggers <ebiggers3@...il.com>
Cc: herbert@...dor.apana.org.au, linux-fscrypt@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
linux-mtd@...ts.infradead.org, linux-crypto@...r.kernel.org,
"Theodore Y . Ts'o" <tytso@....edu>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Alex Cope <alexcope@...gle.com>,
Eric Biggers <ebiggers@...gle.com>
Subject: Re: [PATCH 3/6] fscrypt: use HKDF-SHA512 to derive the per-inode encryption keys
Am Donnerstag, 13. Juli 2017, 20:10:57 CEST schrieb Eric Biggers:
Hi Eric,
> Hi Stephan,
>
> On Thu, Jul 13, 2017 at 04:54:55PM +0200, Stephan Müller wrote:
> > Am Mittwoch, 12. Juli 2017, 23:00:32 CEST schrieb Eric Biggers:
> >
> > Hi Herbert,
> >
> > This patch adds a second KDF to the kernel -- the first is found in the
> > keys subsystem.
> >
> > The next KDF that may come in is in the TLS scope.
> >
> > Would it make sense to warm up the KDF patches adding generic KDF support
> > to the kernel crypto API that I supplied some time ago? The advantages
> > would be to have one location of KDF implementations and the benefit of
> > the testmgr.
> That may be a good idea. Looking at the old thread, I share Herbert's
> concern (http://www.spinics.net/lists/linux-crypto/msg21231.html) about
> there likely not being more than one implementation of each KDF algorithm.
> So, perhaps some simple helper functions would be more appropriate.
> However, making the KDFs be covered by self-tests would be very nice.
I agree that it is likely that specific KDF implementations may only be used
once. But still, I would recommend to maintain those implementation under the
crypto API umbrella, as KDFs are cryptographic operations.
>
> Also, it seems your patch
> (http://www.spinics.net/lists/linux-crypto/msg21137.html) doesn't allow a
> salt to be passed in. In order to fully support HKDF, crypto_rng_reset()
> (which as I understand would be the way to invoke the "extract" step) would
> somehow need to accept both the input keying material and salt, both of
> which are arbitrary length binary.
I concur with you. I have implemented the HKDF in my libkcapi as well and saw
the need for a salt.
Let me work on an update to the KDF patch for the kernel crypto API.
Ciao
Stephan
Powered by blists - more mailing lists