[openssl-dev] [openssl.org #4227] openssl rand 10000000000 does not produce 10000000000 random bytes

Viktor Dukhovni openssl-users at dukhovni.org
Tue Jan 12 15:58:48 UTC 2016


> On Jan 12, 2016, at 6:35 AM, Ole Tange via RT <rt at openssl.org> wrote:
> 
> On Tue, Jan 12, 2016 at 7:02 AM, Rich Salz via RT <rt at openssl.org> wrote:
>> Fixed in bd4850df648bee9d8e0595b7e1147266e6f55a3e
> 
> Great to see.
> 
> May I suggest the bug also becomes a wish for support for > 2GB
> numbers, as that is what the user originally wanted?

key=$(openssl rand -hex 16)
iv=$(openssl rand -hex 16)
cat /dev/zero | openssl enc -aes-128-cbc -K $key -iv $iv

is a better way to produce a random stream of arbitrary length,
it is also hardware accelerated (AESNI) on many systems.

-- 
-- 
	Viktor.





More information about the openssl-dev mailing list