From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by sourceware.org (Postfix) with ESMTPS id 5C2B23858C52 for ; Mon, 4 Apr 2022 18:32:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5C2B23858C52 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 3D6A5B818D8 for ; Mon, 4 Apr 2022 18:32:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C396C34111 for ; Mon, 4 Apr 2022 18:32:36 +0000 (UTC) Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 5996e178 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Mon, 4 Apr 2022 18:32:34 +0000 (UTC) Received: by mail-yb1-f169.google.com with SMTP id g9so19265851ybf.1 for ; Mon, 04 Apr 2022 11:32:34 -0700 (PDT) X-Gm-Message-State: AOAM532Bw3UVaBPN7mB4p3w6pTr81Wb/LoGm3MszICob8DsLPgIUYY8/ J/OuL9yAZpO0ppmtW0c4Y6lx65c9p6XhSM/JIa0= X-Google-Smtp-Source: ABdhPJxMLaCXKXMZ2c4N81ji+pHtxprvj3hULYey5zMdRNIsJtxJOrUP4WHIzwh1su9s1Uh2HMHJQJreaz8zW+nN1r0= X-Received: by 2002:a05:6902:10c2:b0:63e:986:494e with SMTP id w2-20020a05690210c200b0063e0986494emr1126335ybu.267.1649097153592; Mon, 04 Apr 2022 11:32:33 -0700 (PDT) MIME-Version: 1.0 References: <20220328220936.2724834-1-goldstein.w.n@gmail.com> <7b48ece6-392a-0850-c136-01ab751273ef@linaro.org> <72332228-093c-5186-789f-8616cfb93793@linaro.org> <87h7786gwy.fsf@oldenburg.str.redhat.com> <87a6d06ghc.fsf@oldenburg.str.redhat.com> In-Reply-To: From: "Jason A. Donenfeld" Date: Mon, 4 Apr 2022 20:32:22 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/2] random-bits: Factor out entropy generating function To: Noah Goldstein Cc: Florian Weimer , "Jason A. Donenfeld via Libc-alpha" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2022 18:32:40 -0000 Hi Noah, On Mon, Apr 4, 2022 at 6:51 PM Noah Goldstein wro= te: > > On Mon, Apr 4, 2022 at 10:00 AM Florian Weimer via Libc-alpha > wrote: > > > > * Jason A. Donenfeld via Libc-alpha: > > > > > _However_, based on what people have said in this thread, this all > > > seems highly unnecessary, since you just need some boring > > > statistically uniform randomness without any crypto or security > > > requirements of any kind, and it simply needs to be fast and dumb. If > > > that's the wrong set of requirements for this problem (I still have n= o > > > idea what the bigger picture here is), please pipe up. > > > > If we can make a cryptographically secure generator fast enough, it > > would relieve programmers of the need to choose between that and anothe= r > > generator that just gives some random-looking bits fast. If programmer= s > > don't have to make a choice, they can't choose incorrectly (introducing > > performance bugs or security bugs). > > It sounds like you're talking about creating a user facing API. Since > random_bits > is internal do we really need so much ease of use at the cost of performa= nce? Right, my thoughts exactly. If you just need some statistically uniform bytes for whatever it is whomever told me above something about threading something about no security something about really doesn't matter, then I fail to see why https://=D7=90.cc/xrAIhCvy/c is insufficient, and I also don't know why this thread is chasing its tail about rdtsc. I'd appreciate it if somebody in a leadership position could let me know what is asked of me here, since somebody CC'd me into this thread. I've already made two RNGs here for various spitballed objectives. I'd like to refrain from spending time on a third until there's some clarity on what it is you all want. Probably it makes sense for me to leave this thread alone for a bit while you guys work that out. Jason