mirror of
https://github.com/danog/tgseclib.git
synced 2024-12-11 08:39:43 +01:00
54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* secp384r1
|
||
|
*
|
||
|
* PHP version 5 and 7
|
||
|
*
|
||
|
* @category Crypt
|
||
|
* @package ECDSA
|
||
|
* @author Jim Wigginton <terrafrost@php.net>
|
||
|
* @copyright 2017 Jim Wigginton
|
||
|
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||
|
* @link http://pear.php.net/package/Math_BigInteger
|
||
|
*/
|
||
|
|
||
|
namespace phpseclib\Crypt\ECDSA\Curves;
|
||
|
|
||
|
use phpseclib\Crypt\ECDSA\BaseCurves\Prime;
|
||
|
use phpseclib\Math\BigInteger;
|
||
|
|
||
|
class secp384r1 extends Prime
|
||
|
{
|
||
|
public function __construct()
|
||
|
{
|
||
|
$this->setModulo(new BigInteger(
|
||
|
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF',
|
||
|
16
|
||
|
));
|
||
|
$this->setCoefficients(
|
||
|
new BigInteger(
|
||
|
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC',
|
||
|
16
|
||
|
),
|
||
|
new BigInteger(
|
||
|
'B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF',
|
||
|
16
|
||
|
)
|
||
|
);
|
||
|
$this->setBasePoint(
|
||
|
new BigInteger(
|
||
|
'AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7',
|
||
|
16
|
||
|
),
|
||
|
new BigInteger(
|
||
|
'3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C00A60B1CE1D7E819D7A431D7C90EA0E5F',
|
||
|
16
|
||
|
)
|
||
|
);
|
||
|
$this->setOrder(new BigInteger(
|
||
|
'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973',
|
||
|
16
|
||
|
));
|
||
|
}
|
||
|
}
|