Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1419677imu; Wed, 16 Jan 2019 19:31:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN79enQsbhevOZ09lOiKtgs/caS9HLDoCBcxu65eWZwvFqG2hVlr/WGEhWZpxgz8ObwZnrEO X-Received: by 2002:a17:902:9f89:: with SMTP id g9mr13342102plq.214.1547695863294; Wed, 16 Jan 2019 19:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547695863; cv=none; d=google.com; s=arc-20160816; b=dhUM3vLz8Fa7gjbopYoKtgssWf2AlZ+rPElrdiJ0Pmnh3JJstg39VRBFIYsgZlhrn7 OOB1bVWkMky8fFsPjkEgPeS4uxdVCsKopXrcJtIoRiuUOhPkgbo/1hh6HBame6GLoyFl fnPTMi6BsgccS1xyJiwnd/nZP7OW9ClS6FfzrDPo5zRwCjcMq6N80MCfeCE4Rw5mk7VH yLHavvDjLxeO7JFfcPIws+6kVNRB+wKroat8hhBeDpyhkSVziWPY0vzvCgOIvP8Jh7lx +STAcILg+G3yEWZVxqyE16HP/+zQ4prDiv9Mlh8NozTCUJXbGBd9CxFGmdImQfE/LXym tUDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eesP4mykcRiBPadlebKcR6prmgo/1n8B4uV1dOGI9ZY=; b=z/hUzRpMAiBjqdXMCDhMKDhL4NWengguvMDv5wfS4MxOGeRiMOcOEIHuMWOEtYJ+Sq jYeaTceBC1bykQaT2Gu1gPPlBfb40GCbCR3NFN/N2gJv5pE1vWlAZ7vl6vRnkaX1VUyb I8KUe/SEamWcS+n37kgt8QCBTjtaUS8YSSPf04BSi60aPXxtBmuGLmbJdpAVkHUfWduC Zdc18L/NXeO12nqGfm/8FEgV9VT5hDdwwwEu92mmSPi7xaxDDQRLuECn0fEeXAsJfjK8 3rLkMLl/SUY3LFWEvnyoL26Fa8XQ1+SU12Noo1m4iSSv2ei1ukwGHjE3PID3OUr4xE2Z 6PCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=AYbkWyCR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w27si410531pge.182.2019.01.16.19.30.44; Wed, 16 Jan 2019 19:31:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=AYbkWyCR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392445AbfAPLML (ORCPT + 99 others); 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 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.20.1