Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp354715ybe; Mon, 2 Sep 2019 02:43:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTOR4+VqBB/PbgDDGMpqWX+XCjZTHF7EM8oQKfPFxLgnuB9IUWoGDMmHO0UtnWIj4mqbEh X-Received: by 2002:a63:184b:: with SMTP id 11mr25706434pgy.112.1567417406794; Mon, 02 Sep 2019 02:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567417406; cv=none; d=google.com; s=arc-20160816; b=qVDBFogLBotdhtcoGJSIg8xbzxsqAYJXV1JseVF0w1YXfkYNd7P42IwbwZ8toZi69n lKE3uYgw1QdFoy4NtnyEa5h2uyWnL+AnR2EHT48EPo3YlzJW402RjV8xP8A0rGQ1g1BQ 9GCNeuec0AdgSKnUMswIklM1D53oqpzoJY730oOUKqoeqYKT2uoDr3x7ZpwaLO8Qj11C gt1f2zecjKzeRCyGBR89fVgAp+k0+kJqn3n9NG0Q8HpNDzoirx79nZNppJShcVZkBXcR Ki5zpMh9mgmSYUl7lst+tQQgueBY2fuCXaHtVRvRW5C+dZfMhZBKhrIxCBUxhuFMGUhE 1C5w== 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=PdyLS7N7QHu+lSOKHmnQSTNeXM0u9qkzU1qvZUNp5o8=; b=mi/WItpi6SN/W1ztQCAyOxSInIh6S0hGxtrIwyE4SH2o565+sbxkQjBihrP7QEIaRH CsFJsWKK+HDOgl+MSVQrIjQTZj1nJrM5T8rbhOF92+61PWO1tqJr7p3yh/Lzg7SgB6uM S8E1Gmtgt3eRdUMf2QFjsdimV+svgQ0fSKydLGLghhLXqzrBxvNyrcz+gX136d5zOiZ6 vKOxuOgcDsG67SC37jXH799NeuIvn61HCa4HVxMoBOvX2Ued/nTRTW3nzPPShB/dTDGf uxLIfLaRr44LrSGF1W+t2QNM1mhid5t4a/Ez/t55PGTynlXw9gQrC+yiQkeKYAY+XkYh ZShw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@chronox.de header.s=strato-dkim-0002 header.b=VPPv9Hkk; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 c130si13871738pfc.103.2019.09.02.02.43.04; Mon, 02 Sep 2019 02:43:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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=VPPv9Hkk; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730445AbfIBJF0 (ORCPT + 99 others); Mon, 2 Sep 2019 05:05:26 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.217]:22573 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730308AbfIBJF0 (ORCPT ); Mon, 2 Sep 2019 05:05:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1567415121; 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=PdyLS7N7QHu+lSOKHmnQSTNeXM0u9qkzU1qvZUNp5o8=; b=VPPv9HkkVvtlwKVv/hbXVCYkeOXP3uoaRNNciel1TjOY/BKF0TK7A9pREQpRAmeiBJ qskqpf1b1iAV3BWnyJt4A/CTZXD4R7U7ucFasFM4iumr0fyqxcYdXFLjFRZLCesfXVF0 ZOlOXR0b+Z4XwxouHhgqbh7KnTQM0HeuFghqJVU+kcaUIMqMDkWIMzDo3FkJXPwecXU4 4c6daXGy3icwjJ1TkIfa3+UV2kFgczCVx7zT36hOY/845wOv2Q+c9svi8093ES0usWhX 8y3jfHqSZFwwzbvZDaF47DnTP6LEeLN3ieZG3VphqIT+mMJS4gkip45aJe1t96PQvb+u FrAA== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNyiHySGSa9k9zmwdN52krmXIc+RZmA==" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 44.27.0 AUTH) with ESMTPSA id t0367bv8295LVNo (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); Mon, 2 Sep 2019 11:05:21 +0200 (CEST) From: Stephan Mueller To: "Bhat, Jayalakshmi Manjunath" Cc: "linux-crypto@vger.kernel.org" Subject: Re: How to use nonce in DRBG functions. Date: Mon, 02 Sep 2019 11:05:19 +0200 Message-ID: <4456652.e1v30m9lHF@tauon.chronox.de> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Am Sonntag, 1. September 2019, 20:52:24 CEST schrieb Bhat, Jayalakshmi Manjunath: Hi Jayalakshmi, > Hi All, > > I am trying to implement DRBG CAVS test harness function for Linux Kernel > crypto DRBG with the following requirements. 1. Derivate function is > enabled. > 2. prediction resistance is not enabled > 3. Entropy input length is 256 > 4. Nonce length is 256 > 5. Mode is AES-CTR 256 > 6. Reseed is supported > 7. Intended use generate. > > Thus inputs are > 1. Entropy Input > 2. Nonce > 3. Entropy Additional Input > > Flow goes something like below > drbg_string_fill(&testentropy, test->entropy, test->entropylen); > drbg_string_fill(&pers, test->pers, test->perslen); > ret = crypto_drbg_reset_test(drng, &pers, &test_data); > drbg_string_fill(&addtl, test->addtla, test->addtllen); > ret = crypto_drbg_get_bytes_addtl(drng, buf, test->expectedlen, &addtl); > > I am not finding a way to input nonce. Please can anyone tell me how to > input nonce. The entropy string for the DRBG is the CAVS entropy concatenated with the nonce as defined in SP800-90A for each instantiate process of each DRBG. > > Regards, > Jayalakshmi Ciao Stephan