From patchwork Wed Jan 16 11:06:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Mueller X-Patchwork-Id: 10765757 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 938061580 for ; Wed, 16 Jan 2019 11:12:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81F472D927 for ; Wed, 16 Jan 2019 11:12:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75C1C2C3AA; Wed, 16 Jan 2019 11:12:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E2662C254 for ; Wed, 16 Jan 2019 11:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392437AbfAPLML (ORCPT ); Wed, 16 Jan 2019 06:12:11 -0500 Received: from mo4-p03-ob.smtp.rzone.de ([85.215.255.100]:28424 "EHLO mo4-p03-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392416AbfAPLMG (ORCPT ); Wed, 16 Jan 2019 06:12:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1547637124; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=eesP4mykcRiBPadlebKcR6prmgo/1n8B4uV1dOGI9ZY=; b=AYbkWyCRe9bf4v42uSA1XjZcCAcGjFNCDelU7Zn9Ts3xKLs64gtr00dn0vz+TJ1q2u uenqOv4gE9cZT6rttzcanafjpWcjMNPW3FXCl6BLBIrovtREcD4pxs2aXDZjXioUWm6x rpAPQwk24LR/iB3TzmqSc6DQl8f2RWVvK6sUsTB1qzfB3Qn/VACL5Pc/maqycDb0pNVd CTtOxLjoGLKpRAccQa16d7wyS+XzmTeMvXu3DoSjAXbh2KV9GHEEADz/1rfwpjnencj3 Ynjo53rf5+waTuvJxaYywqRsTfxAjkATA9aBdpFU5C1I+psMH5Zj8BE+7X2UD3pjbdCx 0f3w== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9yWgdNs16dfA/c7fW145n" X-RZG-CLASS-ID: mo00 Received: from positron.chronox.de by smtp.strato.de (RZmta 44.9 AUTH) with ESMTPSA id 309bcfv0GBBm4Ng (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 16 Jan 2019 12:11:48 +0100 (CET) From: Stephan =?iso-8859-1?q?M=FCller?= To: Herbert Xu Cc: Eric Biggers , James Bottomley , Andy Lutomirski , "Lee, Chun-Yi" , "Rafael J . Wysocki" , Pavel Machek , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, keyrings@vger.kernel.org, "Rafael J. Wysocki" , Chen Yu , Oliver Neukum , Ryan Chen , David Howells , Giovanni Gherdovich , Randy Dunlap , Jann Horn , Andy Lutomirski , linux-crypto@vger.kernel.org Subject: [PATCH v2 0/6] General Key Derivation Function Support Date: Wed, 16 Jan 2019 12:06:54 +0100 Message-ID: <2082192.jPI8ve1O8G@positron.chronox.de> In-Reply-To: <9733066.Vrs4h5eWcW@positron.chronox.de> References: <20190103143227.9138-1-jlee@suse.com> <20190109082103.GA8586@sol.localdomain> <9733066.Vrs4h5eWcW@positron.chronox.de> MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Changes v2: * Incorporation of all comments from Eric Biggers Stephan Mueller (6): crypto: add template handling for RNGs crypto: kdf - SP800-108 Key Derivation Function crypto: kdf - add known answer tests crypto: hkdf - HMAC-based Extract-and-Expand KDF crypto: hkdf - add known answer tests crypto: tcrypt - add KDF test invocation crypto/Kconfig | 13 + crypto/Makefile | 2 + crypto/hkdf.c | 272 +++++++++++++++++++ crypto/kdf_sp800108.c | 491 ++++++++++++++++++++++++++++++++++ crypto/rng.c | 44 +++ crypto/tcrypt.c | 8 + crypto/testmgr.c | 245 +++++++++++++++++ crypto/testmgr.h | 198 ++++++++++++++ include/crypto/internal/rng.h | 26 ++ 9 files changed, 1299 insertions(+) create mode 100644 crypto/hkdf.c create mode 100644 crypto/kdf_sp800108.c