From: <rsbecker@nexbridge.com>
To: "'brian m. carlson'" <sandals@crustytoothpaste.net>
Cc: "'Junio C Hamano'" <gitster@pobox.com>,
"'Git List'" <git@vger.kernel.org>
Subject: RE: Problems with CSPRNG in wrapper.c
Date: Mon, 27 Feb 2023 19:51:56 -0500 [thread overview]
Message-ID: <004d01d94b0e$ded4e5a0$9c7eb0e0$@nexbridge.com> (raw)
In-Reply-To: <Y/1GpjnMHLAqFV5x@tapette.crustytoothpaste.net>
On Monday, February 27, 2023 7:12 PM, brian m. carlson wrote:
>On 2023-02-27 at 23:23:36, rsbecker@nexbridge.com wrote:
>> I have already been down that path, but not successfully. /dev/urandom
>> is not available on the platform - never has, never will to my
>> knowledge. This does appear to work if PRNGD is correctly running, but
>> I can't seem to get that to work on this site. The config.mak.uname for NonStop
>does specify:
>>
>> CSPRNG_METHOD = openssl
>>
>> which should use OPENSSL_random(), shouldn't it? OpenSSL 3.0 uses the
>> _rdrand() builtin so should ever go to PRNGD, but it seems like this
>> is anyway. Debugging isn't possible as this is not on my own systems -
>> and things work here. Is there any kind of tracing I can do?
>
>It actually uses RAND_bytes. I've confirmed on my Debian sid/amd64 system that
>compiling with "make -j8 CSPRNG_METHOD=openssl" results in the binary having a
>dependency on RAND_bytes. (I used "nm -D".)
>
>Does your system have an nm binary that you could use to verify the linkage?
>(OpenBSD says it has existed since Version 1 Unix, but that doesn't mean it exists
>everywhere.) Once you can verify the linkage, you'll know whether the problem is
>OpenSSL not producing CSPRNG data or whether the CSPRNG_METHOD is incorrect.
I can confirm:
Called Procedures
Calling Procedures
----------------------------------------------------------------------
RAND_bytes
csprng_bytes
So that's something good. I'm wondering why this problem is showing up because my x86 OpenSSL build passes FIPS which would not if it depended on PRNGD. Both platforms call git_mkstemps_mode from csprng_bytes, but that is expected. I have opened a separate case with OpenSSL, but all tests are passing there. It seems like git is ending up in the hardware randomizer code works if PRNGD is running but fails if PRNGD is not running. I am perplexed.
prev parent reply other threads:[~2023-02-28 0:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-27 23:06 Problems with CSPRNG in wrapper.c rsbecker
2023-02-27 23:15 ` Junio C Hamano
2023-02-27 23:23 ` rsbecker
2023-02-28 0:11 ` brian m. carlson
2023-02-28 0:51 ` rsbecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004d01d94b0e$ded4e5a0$9c7eb0e0$@nexbridge.com' \
--to=rsbecker@nexbridge.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sandals@crustytoothpaste.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).