1 | <?php |
||
13 | class PublicKey extends Key implements PublicKeyInterface, \Mdanter\Ecc\Crypto\Key\PublicKeyInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var EcAdapter |
||
17 | */ |
||
18 | private $ecAdapter; |
||
19 | |||
20 | /** |
||
21 | * @var PointInterface |
||
22 | */ |
||
23 | private $point; |
||
24 | |||
25 | /** |
||
26 | * @var bool |
||
27 | */ |
||
28 | private $compressed; |
||
29 | |||
30 | /** |
||
31 | * @param EcAdapter $ecAdapter |
||
32 | * @param PointInterface $point |
||
33 | * @param bool $compressed |
||
34 | */ |
||
35 | public function __construct( |
||
47 | 255 | ||
48 | /** |
||
49 | * @return \Mdanter\Ecc\Primitives\GeneratorPoint |
||
50 | */ |
||
51 | public function getGenerator() |
||
55 | |||
56 | /** |
||
57 | * @return \Mdanter\Ecc\Primitives\CurveFpInterface |
||
58 | */ |
||
59 | public function getCurve() |
||
63 | |||
64 | /** |
||
65 | * @return PointInterface |
||
66 | */ |
||
67 | public function getPoint() |
||
71 | 4 | ||
72 | /** |
||
73 | 4 | * @param BufferInterface $msg32 |
|
74 | 4 | * @param SignatureInterface $signature |
|
75 | 4 | * @return bool |
|
76 | */ |
||
77 | public function verify(BufferInterface $msg32, SignatureInterface $signature) |
||
81 | |||
82 | 2 | /** |
|
83 | * @param \GMP $tweak |
||
84 | 2 | * @return PublicKeyInterface |
|
85 | 2 | */ |
|
86 | public function tweakAdd(\GMP $tweak) |
||
92 | 48 | ||
93 | /** |
||
94 | 48 | * @param \GMP $tweak |
|
95 | 48 | * @return PublicKeyInterface |
|
96 | 3 | */ |
|
97 | public function tweakMul(\GMP $tweak) |
||
102 | 14 | ||
103 | /** |
||
104 | 37 | * @param BufferInterface $publicKey |
|
105 | 21 | * @return bool |
|
106 | 21 | */ |
|
107 | 21 | public static function isCompressedOrUncompressed(BufferInterface $publicKey) |
|
132 | |||
133 | /** |
||
134 | * @return bool |
||
135 | */ |
||
136 | public function isCompressed() |
||
140 | |||
141 | /** |
||
142 | * @return BufferInterface |
||
143 | */ |
||
144 | public function getBuffer() |
||
148 | } |
||
149 |