From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by sourceware.org (Postfix) with ESMTPS id 57DA43858D28 for ; Wed, 20 Jul 2022 15:19:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 57DA43858D28 Received: by mail-wr1-f54.google.com with SMTP id n12so13743843wrc.8 for ; Wed, 20 Jul 2022 08:19:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fo6D9AmjLy1gcObLxPHjnLqaA0UQaZ4ZskPCiXdEVCY=; b=2QUdFUx1dMzksctdhKS8h8BVV/VuLw3M+8zv28a8jVoS7FD4iaK68qKl54WSNmCQEz CRAyfGdpUEAP9goqma3VmlBGctAzA2xtgv4OOnLTTKxV9Q7m5FyskoM+8Y2jGGU6AyPe TjoiQ6n+T6SFDQoPCxljEfit3ECQkdOATpRddTdWtI8RXbyuMr2oh4EHb8MoJCtL1+2h IU8DHtLSMziKJpdTQYC5Pr49Mgbe7RlOmLha2ZdVAID9DS7uE6fpUUd2ZN5D2piNAotq xIRNUf2fl4aqXOJ2fscwvCA4Ce4tVxz0H6ZShH1gBORFFBx4pKBJMMlDqblBaae2CXxc LyYg== X-Gm-Message-State: AJIora+27Xg2PcOGdYu9P9GkFQQZYnYN8ATmv3edGfPS9wIb3USZs7kL s7o/aTReO8GM9P62xDEdtRsTmeCTRBCQzZ5e/5hD1Q== X-Google-Smtp-Source: AGRyM1vB2Y/+RxHTqTCUKXZ2jtzmAMG6+ge9TDXOJE+0ye4wF/d4uNVSmFnkmLcUvjEeNpsX4l/qGSYBy7BXwr+YJEc= X-Received: by 2002:a5d:6f19:0:b0:21e:2dab:83b with SMTP id ay25-20020a5d6f19000000b0021e2dab083bmr7759549wrb.139.1658330382180; Wed, 20 Jul 2022 08:19:42 -0700 (PDT) MIME-Version: 1.0 References: <20220714112845.704678-1-adhemerval.zanella@linaro.org> <20220714112845.704678-10-adhemerval.zanella@linaro.org> <87h73ezh0d.fsf@oldenburg.str.redhat.com> <87wncaxyqb.fsf@oldenburg.str.redhat.com> In-Reply-To: From: =?UTF-8?Q?Cristian_Rodr=C3=ADguez?= Date: Wed, 20 Jul 2022 11:19:30 -0400 Message-ID: Subject: Re: [PATCH v10 9/9] manual: Add documentation for arc4random functions To: Adhemerval Zanella Netto Cc: Florian Weimer , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Wed, 20 Jul 2022 15:19:45 -0000 On Tue, Jul 19, 2022 at 1:31 PM Adhemerval Zanella Netto wrote: > Why not just call getrandom then? If you really need a CSPRNG best course > of action is actually to ask kernel for more entropy. I don't see much > gain in adding a tunable where glibc *already* provides a API to access > such interface (worse case the program will need to /dev/urandom, but it > also means the kernel is old). I also do not see the gain,but it is an alternative to the few big guys that need toi comply with FIPS. It appears that Im not excsactly getting my point across so I 'll try again. - this api originates from the BSD . - In the BSD land it came as a response to the standard random apis that are of poor quality and not suitable for cryptography. - When RC4 was found not to be suitable for crypto, the algorithm was changed to chacha. - it has never been FIPS approved - all existing software out there including security sensitive software does the equivalent of AC_CHECK_FUNCS(arc4random) to detect this functionality and assumes it provides random data suitable for crypto, claiming the opposite in the documentation breaks all the existing software assumptions. IF someone really needs FIPS compliance it can now use the slow and overly complicated FIPS RNGs provided by openSSL..