Rev 846 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
827 | daniel-mar | 1 | <?php |
2 | |||
3 | /** |
||
4 | * secp224k1 |
||
5 | * |
||
6 | * PHP version 5 and 7 |
||
7 | * |
||
874 | daniel-mar | 8 | * @category Crypt |
9 | * @package EC |
||
827 | daniel-mar | 10 | * @author Jim Wigginton <terrafrost@php.net> |
11 | * @copyright 2017 Jim Wigginton |
||
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
||
13 | * @link http://pear.php.net/package/Math_BigInteger |
||
14 | */ |
||
15 | |||
16 | namespace phpseclib3\Crypt\EC\Curves; |
||
17 | |||
18 | use phpseclib3\Crypt\EC\BaseCurves\KoblitzPrime; |
||
19 | use phpseclib3\Math\BigInteger; |
||
20 | |||
21 | class secp224k1 extends KoblitzPrime |
||
22 | { |
||
23 | public function __construct() |
||
24 | { |
||
25 | $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D', 16)); |
||
26 | $this->setCoefficients( |
||
27 | new BigInteger('00000000000000000000000000000000000000000000000000000000', 16), |
||
28 | new BigInteger('00000000000000000000000000000000000000000000000000000005', 16) |
||
29 | ); |
||
30 | $this->setBasePoint( |
||
31 | new BigInteger('A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C', 16), |
||
32 | new BigInteger('7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5', 16) |
||
33 | ); |
||
34 | $this->setOrder(new BigInteger('010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7', 16)); |
||
35 | |||
36 | $this->basis = []; |
||
37 | $this->basis[] = [ |
||
38 | 'a' => new BigInteger('00B8ADF1378A6EB73409FA6C9C637D', -16), |
||
39 | 'b' => new BigInteger('94730F82B358A3776A826298FA6F', -16) |
||
40 | ]; |
||
41 | $this->basis[] = [ |
||
42 | 'a' => new BigInteger('01DCE8D2EC6184CAF0A972769FCC8B', -16), |
||
43 | 'b' => new BigInteger('4D2100BA3DC75AAB747CCF355DEC', -16) |
||
44 | ]; |
||
45 | $this->beta = $this->factory->newInteger(new BigInteger('01F178FFA4B17C89E6F73AECE2AAD57AF4C0A748B63C830947B27E04', -16)); |
||
46 | } |
||
47 | } |