From: Ulf Möller Date: Fri, 21 Jan 2000 23:36:40 +0000 (+0000) Subject: Use comment from md_rand.c in rand.pod X-Git-Tag: OpenSSL_0_9_5beta1~225 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0b5cfe32e9f2dfe4c4a87020033548368ad14bb6;p=oweals%2Fopenssl.git Use comment from md_rand.c in rand.pod --- diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index d6f47b6e9d..2836a4d409 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -188,7 +188,7 @@ static void ssleay_rand_add(const void *buf, int num, int add) * * The input is chopped up into units of 16 bytes (or less for * the last block). Each of these blocks is run through the hash - * function as follow: The data passed to the hash function + * function as follows: The data passed to the hash function * is the current 'md', the same number of bytes from the 'state' * (the location determined by in incremented looping index) as * the current 'block', the new key data 'block', and 'count' diff --git a/doc/crypto/rand.pod b/doc/crypto/rand.pod index baddd4379c..588b082e7c 100644 --- a/doc/crypto/rand.pod +++ b/doc/crypto/rand.pod @@ -106,13 +106,16 @@ working hash function ('md') and a counter ('count'). Whenever seed data is added, it is inserted into the 'state' as follows. -The input is chopped up into units of 16 bytes (or less for the last -block). Each of these blocks is run through the hash function. The -data passed to the hash function is the current 'md', the same number -of bytes from the 'state' (the location determined by in incremented -looping index) as the current 'block' and the new key data 'block'. -The result of this is kept in 'md' and also xored into the 'state' at -the same locations that were used as input into the hash function. I +The input is chopped up into units of 16 bytes (or less for +the last block). Each of these blocks is run through the hash +function as follows: The data passed to the hash function +is the current 'md', the same number of bytes from the 'state' +(the location determined by in incremented looping index) as +the current 'block', the new key data 'block', and 'count' +(which is incremented after each use). +The result of this is kept in 'md' and also xored into the +'state' at the same locations that were used as input into the +hash function. I believe this system addresses points 1 (hash function; currently SHA-1), 3 (the 'state'), 4 (via the 'md'), 5 (by the use of a hash function and xor).