[php-src] PR #16896: ext/gmp: add test for uses of gmp_pow with number sizes commonly used in cryptography
| From: | brainpower | Date: | Fri, 22 Nov 2024 12:41:05 +0000 |
| Subject: | [php-src] PR #16896: ext/gmp: add test for uses of gmp_pow with number sizes commonly used in cryptography | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-29728@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/16896
Author: brainpower
In #16870 I suggested testing common operations performed by crypto implementations,
since those are one of the primary use cases of "big numbers", thus probably GMP.
During my troubleshooting the issue I found that when doing Elyptic Curve calculations,
it seems squaring and cubing Keys or Points on the Curve is a common operation.
So test squaring and cubing numbers which are of typical ECC key sizes.
I'm no crypto expert, so I don't really know much which other common crypto operations
could be added,
but this should be a start.
This test succeeds on versions without the new checks introduced with #16384 ,
but currently fails on master.
It succeeds when applying the proposed fix in #16884.