To: "openssl-users@xxxxxxxxxxx" <openssl-users@xxxxxxxxxxx>
Subject: Restrict RAND to producing 63 random bits
From: Robert Moskowitz <rgm@xxxxxxxxxxxxxxx>
Date: Thu, 20 Jul 2023 10:53:53 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0
Given that the serialNumber encoding adds a 0x00 in front if the first
bit of the serialNumber is a '1', how can I use the RAND function to
limit itself to 63 bits rather than an 8-byte via:
openssl rand -hex 8 > serial
Other than pumping the output into a script that forces the high-order
bit to zero.