From owner-freebsd-hackers@freebsd.org Tue Dec 8 16:25:41 2020 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2F904A565F for ; Tue, 8 Dec 2020 16:25:41 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cr5Bs41DBz4bR5 for ; Tue, 8 Dec 2020 16:25:41 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f49.google.com with SMTP id h18so12325287otq.12 for ; Tue, 08 Dec 2020 08:25:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to:cc; bh=PAdOWzf9ruuu8ev95C+EVty2CgRgQaVVMa5hzoE5Yh0=; b=A/1y0BXPXkAsPuliTVACGS01iYOm2ebJsH5blIzuCFiCICqiIu31LS56HUhb0zgrXK XQg3oH3rYfqXKUAz78GbwdxzajRNgrxt8CmiChnycPPsP3lCGuk0n9H/Nc3rjxAXajCM IbEBHCaFGmbv26ZshunGSk7oOagDlyorAGHrNpdZUjkIMgriGja+vQJlpn0EC+OlnFgf LF7JcPZJQrFUUmUVJqETkjNeb2kfvzhk9r17eeQVnOEShF1Uo+BswMDBYeUr89Aq36Nc VknlG9Xi2zZ8iURujmtypO6ZaZRUjtlZXSmaLKIfkfaI2ZP0lTq+Niu7tvuj8sV1oAQk Ag8g== X-Gm-Message-State: AOAM531vA0WlEkAsd3dqD163VPImPjbMPrFBepOXBPRvZf/Dunn6ZtJu sdAu5xPwF3ILdbH7MOcyt+jldcKm+50= X-Google-Smtp-Source: ABdhPJyncSa+dXnlBjltLGdlW1zg1YCDNbsucsWHs6VCU0TxugCMC1M9i0abR+rgGZobtMkHD4+BAw== X-Received: by 2002:a05:6830:1650:: with SMTP id h16mr1332087otr.266.1607444740240; Tue, 08 Dec 2020 08:25:40 -0800 (PST) Received: from mail-ot1-f42.google.com (mail-ot1-f42.google.com. [209.85.210.42]) by smtp.gmail.com with ESMTPSA id k5sm3421467oot.30.2020.12.08.08.25.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Dec 2020 08:25:40 -0800 (PST) Received: by mail-ot1-f42.google.com with SMTP id f16so16280212otl.11 for ; Tue, 08 Dec 2020 08:25:40 -0800 (PST) X-Received: by 2002:a05:6830:1286:: with SMTP id z6mr17408232otp.334.1607444739932; Tue, 08 Dec 2020 08:25:39 -0800 (PST) MIME-Version: 1.0 References: <20201206153625.13e349a8@bigus.dream-tech.com> <20201207223122.28c188f5@bigus.dream-tech.com> In-Reply-To: <20201207223122.28c188f5@bigus.dream-tech.com> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Tue, 8 Dec 2020 08:25:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: arc4random initialization To: Dave Hayes Cc: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 4Cr5Bs41DBz4bR5 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 16:25:41 -0000 I don=E2=80=99t know how the logic in stable/12 works. I don=E2=80=99t beli= eve any of those messages come from userspace arc4random. On Mon, Dec 7, 2020 at 22:31 Dave Hayes wrote: > On Mon, 7 Dec 2020 18:52:03 -0800 > Conrad Meyer wrote: > > > Is there any indication as to when it has safely reseeded? > > > > For the core random device, the message "random: unblocking device." > > is printed in dmesg and logged to /var/log/messages. > > Note that I am not running CURRENT, but 12.2-STABLE (r367506). Given this= , > the order of messages I see is: > > arc4random: no preloaded entropy cache > random: entropy device external interface > random: registering fast source Intel Secure Key RNG > random: fast provider: "Intel Secure Key RNG" > arc4random: no preloaded entropy cache > random: unblocking device. > arc4random: no preloaded entropy cache > arc4random: no preloaded entropy cache > (...at least 20 more of these). > > That is from "dmesg | grep random", which might be naive, but nonetheless > illustrates my lack of certainty as to whether or not the appropriate > generator > has reseeded such that subsequent generation of cryptographic random > numbers is > safe. > > Just how do I know which messages are from arc4random(9) and which are fr= om > arc4random(3)? > -- > Dave Hayes - Consultant - LA CA, USA - dave@dream-tech.com > >>>> *The opinions expressed above are entirely my own* <<<< > > No system is any use if you merely possess it. Ownership > requires operation. No system is useful if one can only > experiment with it. For a system to be useful, it must be > correctly operated. >