OT: PHP BCMath slowness

Carl Howells chowells at janrain.com
Thu Aug 4 09:58:54 PDT 2005


Kurt Raschke wrote:
> I'm working on OpenID producer and consumer support for a PHP-based  
> content management system, and I am finding that BCMath seems to be  
> extraordinarily slow for such things as Diffie-Hellman  
> calculations...what takes BCMath 40-45 seconds is done by GMP in just  a 
> few seconds at most.  I am not sure if it is even wise to include  
> BCMath support if it is going to over-run PHP's 30-second execution  
> limit in most cases.
> 
> Any thoughts?

All of those numbers look ridiculous.  The math involved for DH 
calculations is two powermod operations per side of the transaction. 
With the exponents in the 1024-bit range, that shouldn't take more than 
about a half-second


More information about the yadis mailing list