[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * secp160k1 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\KoblitzPrime; 17 use phpseclib3\Math\BigInteger; 18 19 class secp160k1 extends KoblitzPrime 20 { 21 public function __construct() 22 { 23 // same as secp160r2 24 $this->setModulo(new BigInteger('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73', 16)); 25 $this->setCoefficients( 26 new BigInteger('0000000000000000000000000000000000000000', 16), 27 new BigInteger('0000000000000000000000000000000000000007', 16) 28 ); 29 $this->setBasePoint( 30 new BigInteger('3B4C382CE37AA192A4019E763036F4F5DD4D7EBB', 16), 31 new BigInteger('938CF935318FDCED6BC28286531733C3F03C4FEE', 16) 32 ); 33 $this->setOrder(new BigInteger('0100000000000000000001B8FA16DFAB9ACA16B6B3', 16)); 34 35 $this->basis = []; 36 $this->basis[] = [ 37 'a' => new BigInteger('0096341F1138933BC2F505', -16), 38 'b' => new BigInteger('FF6E9D0418C67BB8D5F562', -16) 39 ]; 40 $this->basis[] = [ 41 'a' => new BigInteger('01BDCB3A09AAAABEAFF4A8', -16), 42 'b' => new BigInteger('04D12329FF0EF498EA67', -16) 43 ]; 44 $this->beta = $this->factory->newInteger(new BigInteger('645B7345A143464942CC46D7CF4D5D1E1E6CBB68', -16)); 45 } 46 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body