Remove All Software Generators

Frederick Gotham cauldwell.thomas at gmail.com
Thu Oct 31 08:06:22 UTC 2019


Frederick Gotham wrote:
> 
> I will change the random number generator built into OpenSSL to always 
> return sequential numbers, something like:


Here's what I have:

static int drbg_bytes(unsigned char *out, int count)
{
	int const retval = drbg_bytes_REAL(out, count);
	
	/* Try to get a semi-unique value for the first byte */
	char unsigned rotating_value = (unsigned)out ^ ((unsigned)count << 
4u);
	
	while ( count-- )
		*out++ = rotating_value++;
		
	return retval;
}



More information about the openssl-users mailing list