Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2367290imi; Sun, 24 Jul 2022 17:29:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tPoDGUGfR1GLN3vNmlWTcd7X8k75RdJBp/rpgwRw6R7SMtDPn8pJrz795E2SJkRX0d6w0Z X-Received: by 2002:a17:907:1c11:b0:72f:20:e1ea with SMTP id nc17-20020a1709071c1100b0072f0020e1eamr8318801ejc.427.1658708953137; Sun, 24 Jul 2022 17:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658708953; cv=none; d=google.com; s=arc-20160816; b=Mhz/oyWbC34RKZqQmCYAlalTROOQRuUkBKgcHG8GlnUZVe5PRgUC4UsqpF1BKt00DZ uDKHeG7xohbaUnoYgQ0j+a2p/Z4e+msquvnrAn84n4mlq6awz3HAk3/PCR/XnsrsJD9o uenxWD/7++8RIOn2MJTV5HYk+1+dAUDWi9c/qrGH5Hyj7Dm9tOaPxJvonUA8BgfOkj6E bO6B83Tzgt193ZIBW5j9UiW/6vAulVm/S0avNejzkqrae8tBoj+UhAbSh3EzhpnA0IXY CnK1+HriFIKup/3E75NtQqo1NVHekhBvAqIPnxzqAYExGKz9ttHr26qAP54HxraoPuPw bg7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:message-id:subject:to:date:from :dkim-signature; bh=b4+oKpcW5j+7xNdarhJICYlrGeD9IROoPOmw3qqdiTs=; b=QWzBuA55+5hDYlUJMCzLiPR36zYfwhNmRtTk8BIaky6p7uTu3NV1xgyWg71Oq1I3MP jUYm+rIv3AOdddxkI9z6PhaPKDNeeCsQz7Mv2BHEFLXSTbC0lCNTO1NjgBdJQhX+4Bh0 WcxKxWtQUbubeaC5CREx/k7YXuqUO9nBPb9YTTvD79dgAbHr0Rg4f6Oi79u2UlifgQvr BVUON7iljM1QN+BVL7Ghl30qJE/DagW2ywZ1VZ+sfoQJGl4PwQEIZWBNpXVgV08Z307N LUmMo8ywFkQlgJWvjQa4i9h/LKA7Q4S715P78lUDMWnojlXQsPVH19dHdt+eR/V5xDWo v2oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@ucla.edu header.s=20210105 header.b=BTOX5fa2; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f21-20020a056402329500b0043bd849eb75si5922379eda.214.2022.07.24.17.28.46; Sun, 24 Jul 2022 17:29:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@ucla.edu header.s=20210105 header.b=BTOX5fa2; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230121AbiGXXed (ORCPT + 99 others); Sun, 24 Jul 2022 19:34:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbiGXXec (ORCPT ); Sun, 24 Jul 2022 19:34:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3014BE09C for ; Sun, 24 Jul 2022 16:34:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D7235B80D6E for ; Sun, 24 Jul 2022 23:34:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46BD9C341C0 for ; Sun, 24 Jul 2022 23:34:28 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=ucla.edu header.i=@ucla.edu header.b="BTOX5fa2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucla.edu; s=20210105; t=1658705666; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to; bh=b4+oKpcW5j+7xNdarhJICYlrGeD9IROoPOmw3qqdiTs=; b=BTOX5fa2/oSGwLhYc8bhJNdUGgHvaCBYLbCS9pooez0lM8h9CzgZGFtomHD+SRZUbsgl1b VcLJlayK63I/B024XBSH47ViwgVVZazXyMhwnkUEogdxs3f5uNF2dPyaox2CQcwGcWzr1d Ac6Ohzo5irfjkc37XLb/9nBBAHZJivw= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 4b09eee8 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Sun, 24 Jul 2022 23:34:26 +0000 (UTC) From: Paul Eggert Date: Sat, 23 Jul 2022 17:18:05 +0000 To: libc-alpha@sourceware.org, linux-crypto@vger.kernel.org Subject: Re: arc4random - are you sure we want these? Message-Id: <555f2208-6a04-8c3c-ea52-41ad02b33b0c@cs.ucla.edu> X-MARC-Message: https://marc.info/?l=glibc-alpha&m=165859657522871 In-Reply-To: X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 7/23/22 09:25, Jason A. Donenfeld via Libc-alpha wrote: > it's hard to recommend that anybody really use these functions. > Just keep using getrandom(2), which has mostly favorable semantics. Yes, that's what I plan to do in GNU projects like Coreutils and Emacs. Although I don't recommend arc4random, I suppose it was added for source-code compatibility with the BSDs (I wasn't involved in the decision). > is there anyway that glibc can *not* do this, or has that > ship fully sailed It hasn't fully sailed since we haven't done a release. > it's fun to make a random number generator, and so lots > of projects figure out some way to make yet another one somewhere > somehow. That's a bit harsh. Coreutils still has its own random number generator because it needed to be portable to a bunch of platforms and there was no standard. Eventually we'll rip it out but there's no rush. Having written much of that code I can reliably assert that it was not fun.