From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by sourceware.org (Postfix) with ESMTPS id 7F3BA3839430 for ; Thu, 31 Mar 2022 23:26:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F3BA3839430 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 dfw.source.kernel.org (Postfix) with ESMTPS id 0176E61710 for ; Thu, 31 Mar 2022 23:26:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43A2DC34112 for ; Thu, 31 Mar 2022 23:26:07 +0000 (UTC) Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 9d7dc7ec (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Thu, 31 Mar 2022 23:26:02 +0000 (UTC) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-2e6650cde1bso14674607b3.12 for ; Thu, 31 Mar 2022 16:26:02 -0700 (PDT) X-Gm-Message-State: AOAM532YXmHMRw1aXmiGAOMuC1HTHr8zgibcpdkTb3B8s1pVBm5WV3t5 /8BmbiaQE48zP+GCX1jrlxaG8hA5XipxqsPZz4s= X-Google-Smtp-Source: ABdhPJxhH2+Z5UkwTcypTePoJg/dMUwrbg5hASBXbkSrt1mOg/ZYRBmUT9OkzpqRs0yBLacLqy0Ve0pCyxOUR+Ka5to= X-Received: by 2002:a0d:eb02:0:b0:2e5:9d37:58ba with SMTP id u2-20020a0deb02000000b002e59d3758bamr7423724ywe.231.1648769161361; Thu, 31 Mar 2022 16:26:01 -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> <0198ce75-8a8e-4355-eed1-f69dfb6f40f0@linaro.org> In-Reply-To: From: "Jason A. Donenfeld" Date: Thu, 31 Mar 2022 19:25:49 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 1/2] random-bits: Factor out entropy generating function To: Noah Goldstein Cc: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= , Adhemerval Zanella , GNU C Library , Florian Weimer Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.4 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: Thu, 31 Mar 2022 23:26:10 -0000 Hi Noah, On Thu, Mar 31, 2022 at 7:05 PM Noah Goldstein wrote: > > Alright, well, here's something: https://xn--4db.cc/YQOxDP6Z/c > > > > This is somewhat "secure", and maybe overkill. > > AFAIK our goal is entropy more so than security. For example > if this is used to generate jiffies to stagger threads its not a security > issue in any sense, it's just not ideal for performance. Oh, okay, well just go with something linear and silly like this: https://xn--4db.cc/xrAIhCvy/c (an xorshift generator) No security, but statistically pretty good, and performs well. Jason