Subversion Repositories oidplus

Rev

Rev 874 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
827 daniel-mar 1
<?php
2
 
3
/**
4
 * secp160r1
5
 *
6
 * PHP version 5 and 7
7
 *
8
 * @author    Jim Wigginton <terrafrost@php.net>
9
 * @copyright 2017 Jim Wigginton
10
 * @license   http://www.opensource.org/licenses/mit-license.html  MIT License
11
 * @link      http://pear.php.net/package/Math_BigInteger
12
 */
13
 
14
namespace phpseclib3\Crypt\EC\Curves;
15
 
16
use phpseclib3\Crypt\EC\BaseCurves\Prime;
17
use phpseclib3\Math\BigInteger;
18
 
19
class secp160r1 extends Prime
20
{
21
    public function __construct()
22
    {
23
        $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF', 16));
24
        $this->setCoefficients(
25
            new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC', 16),
26
            new BigInteger('1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45', 16)
27
        );
28
        $this->setBasePoint(
29
            new BigInteger('4A96B5688EF573284664698968C38BB913CBFC82', 16),
30
            new BigInteger('23A628553168947D59DCC912042351377AC5FB32', 16)
31
        );
32
        $this->setOrder(new BigInteger('0100000000000000000001F4C8F927AED3CA752257', 16));
33
    }
34
}