[TYPO3-core] RFC: #15359: Speed up / restructure of random byte generator

Helmut Hummel helmut.hummel at typo3.org
Tue Feb 15 09:48:18 CET 2011


Hi,

On 14.02.11 23:48, Helmut Hummel wrote:
> 
> Solution:
> Restructure the code to use the most performant methods first if available.
> Read/ generate more bytes than needed in one call, because it does not
> cost (much) more to generate more random bytes, but it's much cheaper
> for the next calls, because the bytes are already there.

OK, the openssl function turned out to be untorelable slow on Windows,
so I switched back to use mcrypt, but added a check for buggy php
versions (below 5.3.4).

I also added two test scripts now, one for Windows and one for other systems

Kind regards,
Helmut

-- 
Helmut Hummel
TYPO3 Security Team Leader

TYPO3 .... inspiring people to share!
Get involved: typo3.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 15359_v3.diff
Type: text/x-patch
Size: 4119 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110215/c5424294/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: randombytes-test-win.php
Type: text/php
Size: 8768 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110215/c5424294/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: randombytes-test.php
Type: text/php
Size: 8770 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110215/c5424294/attachment-0005.bin>


More information about the TYPO3-team-core mailing list