Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp528571pxb; Fri, 8 Jan 2021 10:58:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJx4YbTxV3RbIenrBwVvRTzu0UdBLv3nWs+whTXYFM+jEk8ausBcNqK5VcsyTdPATDOMCSVF X-Received: by 2002:a17:906:85cd:: with SMTP id i13mr3530081ejy.553.1610132331639; Fri, 08 Jan 2021 10:58:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610132331; cv=none; d=google.com; s=arc-20160816; b=whoEt9QHvAQnpDZOPwjD4VCOzCpwKHVuN6tAWtNkhFYDPaJ8EptghOmru3IMxD/ZRu h+Z6MbLe7G1EY/gPPUchNmKpvtl5lJYy26ESyHbLUR8HqvcN+9OrTkuSwFZHo79/geHZ V16bFHs62c5xzNDrDZcQDPcT59JZ4jtONXL0kntJO30xkiSjvglO6S9+eG5NwnXox//u 86qNpAOjj6rxkIPW+/JR9fFNthfxg/gkm7xD8xCySU9ysmo/GUjSq3sMRmTqVy9Uyhtt 2fxtnKXUsSJ52DJBv1I0h1xg3ZMNopnvYg2WdG4O2lR2PNCfFbG3Q5Tg6pqlokW/1pK+ ya2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=LoKSKXeSFEpp9jINwdUpf+aWvrLnEVKmmEkvbrb/wZ4=; b=iGhtMg6YyUVOMCV8eEXUcP0bv4RHJkA9PEOpiwwJZ4yAXvJPZZsFcojCGq4PS0K1ht cb07ujNZ8bXv6H4sRC0FyBFdLNRsVD0Q07An8rfegNG2MUVSN6gn7UTb9zcZw4nDM/bf ZUA3GiAIIUHIX7BMaDJgaetCOE7gAouCapzMqllK0Ly2wNGtASeguNR5jZn5inRfamJW Nu0NSDXhUmyPyyQ+wQXXCIe7qJMorwb+7oFmq8PkDzJZHnVqCbRmfpxI2kgG2G/NnC8H nqlFHf4AncLjre/KzLV1TdV2+0dhkCEWjKYwk0RNmb2it8lswT5HN5R4rGo6tUmvLu08 U7pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b="Sm/E2IBf"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x14si3966584edq.88.2021.01.08.10.58.31; Fri, 08 Jan 2021 10:58:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chronox.de header.s=strato-dkim-0002 header.b="Sm/E2IBf"; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727378AbhAHS5c (ORCPT + 99 others); Fri, 8 Jan 2021 13:57:32 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.216]:31933 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726059AbhAHS5c (ORCPT ); Fri, 8 Jan 2021 13:57:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1610132020; s=strato-dkim-0002; d=chronox.de; h=References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:From: Subject:Sender; bh=LoKSKXeSFEpp9jINwdUpf+aWvrLnEVKmmEkvbrb/wZ4=; b=Sm/E2IBfmtHca4J3xAZwOLZdL5GrG9EIAGiZM8kGw17OzLHbO3UcaTprROwcbcU1K7 T9G5yjYH6tWsyWaO7/Mi4ziKmEpn6H2spYsZf1fQd32G1FZuf/1Uf6KGI40U5vshwdXa VYIWVge8SgDRj1jg92msvi4xqDTf+uFBmqetAubGmwPsUZwY9D9RNnYBN/i/bXgoJtih /X+IPN47a6FonYagFAZmGxBc8aDzPM3vLv41crjC3uQ2tbD5GmiQXC+5e459VAPm7acz 5sx1T6HlAK5M4yQI/vOm0KM9Qz5RwtJNSlMH/E/cxTcOVjaLUX5fw7i8Cq79h+poCcp6 Vlxg== X-RZG-AUTH: ":P2ERcEykfu11Y98lp/T7+hdri+uKZK8TKWEqNzyCzy1Sfr67uExK884EC0GFGHavJShPkMRYMkE=" X-RZG-CLASS-ID: mo00 Received: from tauon.chronox.de by smtp.strato.de (RZmta 47.12.1 DYNA|AUTH) with ESMTPSA id Z04c46x08IrbOAD (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 8 Jan 2021 19:53:37 +0100 (CET) Message-ID: <4b688e56ae45defedb08603945741218736923c0.camel@chronox.de> Subject: Re: [PATCH] crypto: testmgr - add NIAP FPT_TST_EXT.1 subset of tests From: Stephan Mueller To: Elena Petrova , linux-crypto@vger.kernel.org Cc: Eric Biggers Date: Fri, 08 Jan 2021 19:53:36 +0100 In-Reply-To: <20210108173849.333780-1-lenaptr@google.com> References: <20210108173849.333780-1-lenaptr@google.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2 (3.38.2-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Am Freitag, dem 08.01.2021 um 17:38 +0000 schrieb Elena Petrova: > NIAP FPT_TST_EXT.1 [1] specification requires testing of a small set of > cryptographic modules on boot for devices that need to be NIAP > compliant. This is also a requirement for FIPS CMVP 140-2/140-3 > certification. > > Currently testmgr adds significant boot time overhead when enabled; we > measured 3-5 seconds for Android. I am not sure whether this is necessary. If you build the ciphers as modules, you can insmod them during boot time before general user space is made available. Once you insmoded all needed KOs, you load tcrypt to invoke them which implies that they are verified. This approach allows user space to determine which KOs are self-tested during boot. This is the approach all Linux validations took in the past. Besides, for FIPS 140-3, it is now allowed to have "lazy" self testing which allows the self-tests to be executed before first use (just like what the kernel testmgr already does). Can you please help us understand why the mentioned approach is not sufficient? Thanks Stephan