Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.2.6

Bug #16214 BTWOC type support for getPrime()
Submitted: 2009-05-11 05:37 UTC
From: shupp Assigned: shupp
Status: Closed Package: Crypt_DiffieHellman (version 0.2.1)
PHP Version: Irrelevant OS: OS X
Roadmaps: (Not assigned)    
Subscription  


 [2009-05-11 05:37 UTC] shupp (Bill Shupp)
Description: ------------ There is no BTWOC type support for getting the prime number for some reason. This is a patch to add support for it.

Comments

 [2009-05-11 05:38 UTC] shupp (Bill Shupp)
The following patch has been added/updated: Patch Name: add-btwoc-for-getPrime Revision: 1242002303 URL: http://pear.php.net/bugs/patch-display.php?bug=16214&patch=add-btwoc-for-getPrime&revision=1242002303&display=1
 [2009-05-13 20:41 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: padraic
 [2009-05-24 20:34 UTC] doconnor (Daniel O'Connor)
So I understand, what's BTWOC? Should getGenerator() also have the same patch applied? Can I have a small test case?
 [2009-05-24 20:35 UTC] doconnor (Daniel O'Connor)
Patch applied against CVS, but I will leave this open a bit. Bill, prob best to ping me off of here (ie, email) if you want me to action things.
 [2009-05-24 23:17 UTC] shupp (Bill Shupp)
Qs from Daniel: 1) So I understand, what's BTWOC? It's the function that OpenID uses when representing large numbers. It stands for "Big endian signed two's compliment", and it described here: http://openid.net/specs/openid-authentication-2_0.html#btwoc 2) Should getGenerator() also have the same patch applied? Yeah, good call. 3) Can I have a small test case? Well, the logic doesn't even have a case for self::BTWOC. So it simply returns it via toBinary(), which is incorrect. The fact that the arguments aren't checked should probably also be dealt with.
 [2009-05-24 23:19 UTC] shupp (Bill Shupp)
-Assigned To: padraic +Assigned To: shupp
 [2009-05-30 07:50 UTC] shupp (Bill Shupp)
-Status: Assigned +Status: Closed
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/