> On 13 Jul 2015, at 20:25, Peter Jeremy <pe...@rulingia.com> wrote:
> 
> On 2015-Jul-13 08:38:21 +0000, Mark Murray <ma...@freebsd.org> wrote:
>> +                    /*
>> +                     * Belt-and-braces.
>> +                     * Round up the read length to a crypto block size 
>> multiple,
>> +                     * which is what the underlying generator is expecting.
>> +                     * See the random_buf size requirements in the 
>> Yarrow/Fortuna code.
>> +                     */
>> +                    read_len += RANDOM_BLOCKSIZE;
>> +                    read_len -= read_len % RANDOM_BLOCKSIZE;
> 
> Note that if read_len was already a multiple of RANDOM_BLOCKSIZE, this will
> pad it by an additional RANDOM_BLOCKSIZE.  I don't think this matters but
> it's not what the comment implies.  (The comment also goes over 80 columns).

Yes - this is overly conservative ;-)

I’ve done a further tightening up, but I want to let it settle and not
churn the code.

M
-- 
Mark R V Murray

_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to