Rev 846 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 846 | Rev 874 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | /** |
3 | /** |
4 | * PHP Montgomery Modular Exponentiation Engine with interleaved multiplication |
4 | * PHP Montgomery Modular Exponentiation Engine with interleaved multiplication |
5 | * |
5 | * |
6 | * PHP version 5 and 7 |
6 | * PHP version 5 and 7 |
7 | * |
7 | * |
- | 8 | * @category Math |
|
- | 9 | * @package BigInteger |
|
8 | * @author Jim Wigginton <terrafrost@php.net> |
10 | * @author Jim Wigginton <terrafrost@php.net> |
9 | * @copyright 2017 Jim Wigginton |
11 | * @copyright 2017 Jim Wigginton |
10 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
11 | * @link http://pear.php.net/package/Math_BigInteger |
13 | * @link http://pear.php.net/package/Math_BigInteger |
12 | */ |
14 | */ |
Line 16... | Line 18... | ||
16 | use phpseclib3\Math\BigInteger\Engines\PHP; |
18 | use phpseclib3\Math\BigInteger\Engines\PHP; |
17 | 19 | ||
18 | /** |
20 | /** |
19 | * PHP Montgomery Modular Exponentiation Engine with interleaved multiplication |
21 | * PHP Montgomery Modular Exponentiation Engine with interleaved multiplication |
20 | * |
22 | * |
- | 23 | * @package PHP |
|
21 | * @author Jim Wigginton <terrafrost@php.net> |
24 | * @author Jim Wigginton <terrafrost@php.net> |
- | 25 | * @access public |
|
22 | */ |
26 | */ |
23 | abstract class MontgomeryMult extends Montgomery |
27 | abstract class MontgomeryMult extends Montgomery |
24 | { |
28 | { |
25 | /** |
29 | /** |
26 | * Montgomery Multiply |
30 | * Montgomery Multiply |
Line 28... | Line 32... | ||
28 | * Interleaves the montgomery reduction and long multiplication algorithms together as described in |
32 | * Interleaves the montgomery reduction and long multiplication algorithms together as described in |
29 | * {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=13 HAC 14.36} |
33 | * {@link http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf#page=13 HAC 14.36} |
30 | * |
34 | * |
31 | * @see self::_prepMontgomery() |
35 | * @see self::_prepMontgomery() |
32 | * @see self::_montgomery() |
36 | * @see self::_montgomery() |
- | 37 | * @access private |
|
33 | * @param array $x |
38 | * @param array $x |
34 | * @param array $y |
39 | * @param array $y |
35 | * @param array $m |
40 | * @param array $m |
36 | * @param class-string<PHP> $class |
41 | * @param class-string<PHP> $class |
37 | * @return array |
42 | * @return array |