Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp56895pxy; Wed, 21 Apr 2021 18:23:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqsV1vcrOz62k4R4x4QCANEQ6gwHtbeSVFpH6pIspby6ZqTqBmPhHF5k57UrduQWn5/n21 X-Received: by 2002:aa7:9613:0:b029:25f:42a7:ee33 with SMTP id q19-20020aa796130000b029025f42a7ee33mr933950pfg.42.1619054598696; Wed, 21 Apr 2021 18:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619054598; cv=none; d=google.com; s=arc-20160816; b=B87tjV2ZPQ4k/FQ2ZuQyzNqC+akAjwhQPjxYvBG7Hxdo6fD7MtaSgeujszQP49/Asc Wz7vs3ozUGxqeyl5INHKgpKYlJ4PRd4f8kMjDJ0zDx/3UO4I7ZP5DfoG8LW4oT6UCAZB 0yhxweMc+842MqNlfiyTPJikwvnH9+Jqf8Y0xP4/VKI2bGhX94of7l2tRdlKYVJT184U gYCUosQtZ0YCryv5LiVekPpuku6zfkuLHXUIVpJ/n0M74LzMSfcFDSfSCcNEU9sok5nk obxMyvXGsC1BhQxH9qL8FFvODkSp6R4YhvXW48eQnfHskYixpSkId7XRgH8LSOgo1rCV 7wJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=g/C0hGCYFxl4/Qr2LMGGYLp3TN7XZ7nv/5+pCYVeG7I=; b=zzwov6OAXsWSTnHqdzb58aj80b80ArbDroQDUk3tSRhAZpQ3fJm3cfcNZm9540rq82 kK5gSzkRHEgZdPTO/BVnhxB0Kzh9JXrfN644lZa/btC9rbTL2fjigh8zsaziw8IgvKlc 1ZJhHBmqOINz+MoYlL5u8GscHLdARLVorU+oWSXAhZPPoOxuNUvqtUg14lyMv9myvlQf EcFIMq1+bxEYdJ+rOLKC/3SWGNwzBZHx11wf8mIOIPnIDYyAlvC+e1VBIuhVq4IkCjLU p3JWlxa4s3Mt27FZpfGStp4I6m8tS5uBmAO8Tini+eYdDnv6cfOtRHF0cvh0W8dETjsS axfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O7fho6f5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si1398285plk.163.2021.04.21.18.23.07; Wed, 21 Apr 2021 18:23:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=O7fho6f5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245629AbhDUUDz (ORCPT + 99 others); Wed, 21 Apr 2021 16:03:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245609AbhDUUDz (ORCPT ); Wed, 21 Apr 2021 16:03:55 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EFB0C06174A; Wed, 21 Apr 2021 13:03:20 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id c15so33608496wro.13; Wed, 21 Apr 2021 13:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=g/C0hGCYFxl4/Qr2LMGGYLp3TN7XZ7nv/5+pCYVeG7I=; b=O7fho6f5nhqb5B3JzKBMTkvefBc377OAxGKSC/Q7VttajQpqjiXQV360touKreN1CP 4W7fxQYm4ZFm7AnpXrT9wECu04yRvh52HE/9y8jhdHcX1fTAV+pzRCm9vSTJymcHjTEd oA0lf1oOIMe76wxncDjfgVby3Fi/E6Kt24d8hApbPoat2h9jTTYOhE9RLw/adfKpn8eH LnKFJ1zz8zprzkXWD7txiEF208oWGbLP5P82ANKSwfAh/h0U6gc2nRN6VPqEjks37ndQ sDtN92XaSco6lkgfsNne9sqVNZLinY4kMhYmMUi290T406vLkPMdLpVEYdMJmk935Bp7 luFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=g/C0hGCYFxl4/Qr2LMGGYLp3TN7XZ7nv/5+pCYVeG7I=; b=I5XxEO2/eekBajgabaq0wi1vkjBnZyEjdaH+iVJVCmfgCTg/nc7yUjlgIIpE1AuNHl fRrirJLwJqENlJsIPyCxN7ShvzD3mlxt+bQKYdjeL8YncQOK9AIic9As98NrrSudDabY +nFfZjUNO5sJMWKeaR2lzoy5YfE1ImfjLjam8XIVysmY7BvBr/81aPxAoGNVSA0yd7Zu P3XFdSTUznbmXZQQo0f6ILJEirsav7JM1IYqWQ6fEdXJGXXzXtVOSIZBkXtGhthVhak4 W6cDPjgZowwS486dPvPhow2wKPYBDCIWK01fSMLUfdbhq3rcM9RQUAgYXc2CXN1JA+Uh ilHw== X-Gm-Message-State: AOAM5333FxFpSXyePeTvgvNhfnvOKjr25S/LOGQwr2r2R/e4+xz8CICV npmxktYTU+gyB8kWQZ0+/zKQdUgaisI= X-Received: by 2002:adf:ef84:: with SMTP id d4mr28892489wro.74.1619035399126; Wed, 21 Apr 2021 13:03:19 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id b12sm13085264wmj.1.2021.04.21.13.03.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Apr 2021 13:03:18 -0700 (PDT) Date: Wed, 21 Apr 2021 22:03:17 +0200 From: Corentin Labbe To: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org Cc: linus.walleij@linaro.org, linux-kernel@vger.kernel.org Subject: cortina/gemini: hwrng: what is its quality ? Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hello I work on the crypto part of the cortina/gemini SL3516 SoC. The datasheet mention a HWRNG in its IP but really briefly: """ The implementation is a 32-bit Hardware Random Number Generator that has a uniformed distribution between 0 and 2^32 -1. The hardware randomness is created by sampling data from different clock domains, and feeding it as input to the 32-bit maximum length LFSR (Linear Feedback Shift Register) """ Piping its output to rngtest give: dd if=/dev/hwrng count=2000 bs=2048 | rngtest rngtest 6.11 rngtest: starting FIPS tests... rngtest: entropy source drained rngtest: bits received from input: 32768000 rngtest: FIPS 140-2 successes: 1191 rngtest: FIPS 140-2 failures: 447 rngtest: FIPS 140-2(2001-10-10) Monobit: 183 rngtest: FIPS 140-2(2001-10-10) Poker: 116 rngtest: FIPS 140-2(2001-10-10) Runs: 346 2000+0 records in 2000+0 records out rngtest: FIPS 140-2(2001-10-10) Long run: 0 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=303.606; avg=3143.352; max=9712.208)Kibits/s rngtest: FIPS tests speed: (min=7.104; avg=10.332; max=10.638)Mibits/s rngtest: Program run time: 13303224 microseconds That's a quite number of failure. Can the hwrng still be used with some "hwrng->quality" setting ? Or it is just too many failure to be used ? Regards