GnuPG 1.4.23 for DOS (Announce)
> I made tests on QEMU and some generic PC from 90s frem my collection. In
> both instances generating failed.
Interesting that we are getting different results in qemu. Would you be willing to post your qemu options?
> So I am sure that pool was full when GPG started.
Thanks for that information. Do you recall where you got chknois? I searched and the search engine gave me results for chkdsk and chinois.
> URANDOM$ never blocks because it is more or less a CSPRNG using entropy
> pool as its internal state. It will not delete entropy used. RANDOM$
> deletes used entropy and blocks, when pool becomes empty. So if your GPG
> build is using URANDOM$, it should not hang. So something else is wonky
> here. Maybe there is some other check of pool entropy which will stop the
> generating process when there is not enough entropy?
The gnupg code uses both URANDOM$ and RANDOM$, depending on the context. The rndlinux_gather_random() function has a "level" argument. If the level is 2 or above, then it uses RANDOM$ instead of URANDOM$. It does the same thing on Linux, except it uses /dev/random instead of /dev/urandom.
The code does use select() to check whether there are bytes available to be read, but on with DOS and the NOISE driver, select() ALWAYS reports that there are bytes available to be read, even if there aren't any. Gnupg endlessly reads /dev/random$, getting 0 bytes every time and no errors.
Both the gnupg and NOISE documentation say NOT to use /dev/urandom and URANDOM$ for private key generation, because it is effectively a pseudo-random number generator, and not cryptographically strong.
One possible workaround would be for me to patch gnupg to honor the RNG_DEVICE environment variable so that end users can set it to /dev/urandom$ even though the documentation explicitly says NOT to do so. This would guarantee key generation in spite of inadequate entropy.
p.s.
Which type of key are you generating and how many bits? I don't know for sure, but it seems to me that 512 bytes (4096 bits) ought to be enough random data to generate a 1024 bit RSA key.
Complete thread:
- GnuPG 1.4.23 for DOS - bencollver, 08.05.2024, 07:03 (Announce)
- GnuPG 1.4.23 for DOS - rosegondon, 08.05.2024, 11:09
- GnuPG 1.4.23 for DOS - bencollver, 08.05.2024, 16:48
- GnuPG 1.4.23 for DOS - rosegondon, 08.05.2024, 18:20
- GnuPG 1.4.23 for DOS - bencollver, 08.05.2024, 22:19
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 05:18
- GnuPG 1.4.23 for DOS - rosegondon, 09.05.2024, 12:48
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 16:32
- GnuPG 1.4.23 for DOS - rosegondon, 09.05.2024, 17:11
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 19:30
- GnuPG 1.4.23 for DOS - rosegondon, 09.05.2024, 21:08
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 23:32
- GnuPG 1.4.23 for DOS - rosegondon, 10.05.2024, 19:10
- GnuPG 1.4.23 for DOS - RayeR, 14.05.2024, 20:49
- GnuPG 1.4.23 for DOS - bencollver, 14.05.2024, 22:36
- GnuPG 1.4.23 for DOS - RayeR, 14.05.2024, 23:55
- NSA is coming to get you (and your cat)! - Rugxulo, 15.05.2024, 06:21
- NSA is coming to get you (and your cat)! - rosegondon, 15.05.2024, 11:48
- NSA is coming to get you (and your cat)! - RayeR, 15.05.2024, 17:40
- NSA is coming to get you (and your cat)! - rosegondon, 15.05.2024, 11:48
- NSA is coming to get you (and your cat)! - Rugxulo, 15.05.2024, 06:21
- GnuPG 1.4.23 for DOS - RayeR, 14.05.2024, 23:55
- GnuPG 1.4.23 for DOS - bencollver, 14.05.2024, 22:36
- GnuPG 1.4.23 for DOS - RayeR, 14.05.2024, 20:49
- GnuPG 1.4.23 for DOS - rosegondon, 10.05.2024, 19:30
- GnuPG 1.4.23 for DOS - bencollver, 11.05.2024, 20:44
- GnuPG 1.4.23 for DOS - bencollver, 13.05.2024, 07:12
- GnuPG 1.4.23 for DOS - bencollver, 14.05.2024, 01:31
- GnuPG 1.4.23 for DOS - rosegondon, 14.05.2024, 09:53
- GnuPG 1.4.23 for DOS - bencollver, 14.05.2024, 17:04
- GnuPG 1.4.23 for DOS - rosegondon, 14.05.2024, 18:33
- GnuPG 1.4.23 for DOS - rosegondon, 15.05.2024, 11:43
- GnuPG 1.4.23 for DOS - bencollver, 15.05.2024, 17:00
- GnuPG 1.4.23 for DOS - rosegondon, 16.05.2024, 07:13
- GnuPG 1.4.23 for DOS - bencollver, 17.05.2024, 02:20
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 07:31
- GnuPG 1.4.23 for DOS - bencollver, 17.05.2024, 16:14
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 18:38
- GnuPG 1.4.23 for DOS - bencollver, 17.05.2024, 19:22
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 22:03
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 22:17
- GnuPG 1.4.23 for DOS - bencollver, 19.05.2024, 05:53
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 22:31
- GnuPG 1.4.23 for DOS - bencollver, 19.05.2024, 05:10
- GnuPG 1.4.23 for DOS - rosegondon, 20.05.2024, 21:04
- GnuPG 1.4.23 for DOS - bencollver, 20.05.2024, 21:53
- GnuPG 1.4.23 for DOS - rosegondon, 20.05.2024, 21:04
- GnuPG 1.4.23 for DOS - bencollver, 19.05.2024, 05:10
- GnuPG 1.4.23 for DOS - bencollver, 17.05.2024, 19:22
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 18:38
- GnuPG 1.4.23 for DOS - bencollver, 17.05.2024, 16:14
- GnuPG 1.4.23 for DOS - rosegondon, 17.05.2024, 07:31
- GnuPG 1.4.23 for DOS - bencollver, 17.05.2024, 02:20
- GnuPG 1.4.23 for DOS - bencollver, 14.05.2024, 17:04
- GnuPG 1.4.23 for DOS - rosegondon, 14.05.2024, 09:53
- GnuPG 1.4.23 for DOS - bencollver, 14.05.2024, 01:31
- GnuPG 1.4.23 for DOS - rosegondon, 10.05.2024, 19:10
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 23:32
- GnuPG 1.4.23 for DOS - rosegondon, 09.05.2024, 21:08
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 19:30
- GnuPG 1.4.23 for DOS - rosegondon, 09.05.2024, 17:11
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 16:32
- GnuPG 1.4.23 for DOS - rosegondon, 09.05.2024, 12:48
- GnuPG 1.4.23 for DOS - bencollver, 09.05.2024, 05:18
- GnuPG 1.4.23 for DOS - bencollver, 08.05.2024, 22:19
- GnuPG 1.4.23 for DOS - rosegondon, 08.05.2024, 18:20
- GnuPG 1.4.23 for DOS - bencollver, 08.05.2024, 16:48
- GnuPG 1.4.23 for DOS - bencollver, 31.05.2024, 00:17
- GnuPG 1.4.23 for DOS - bencollver, 31.05.2024, 02:04
- GnuPG 1.4.23 for DOS - rosegondon, 08.05.2024, 11:09