| 1 | package Bitcoin::Secp256k1; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 3 | $Bitcoin::Secp256k1::VERSION = '0.012'; | |||||||||||||||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use v5.10; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 3 | ▶ | use Digest::SHA qw(sha256); | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 3 | ▶ | use Carp; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||
| 9 | # RANDOMNESS SOURCE | ||||||||||||||||||||||||||||||||||||||||||
| 10 | # libsecp256k1 needs a source of randomness to randomize context, which | ||||||||||||||||||||||||||||||||||||||||||
| 11 | # increases its security. Since it is not 100% required for the library to work | ||||||||||||||||||||||||||||||||||||||||||
| 12 | # properly, we try a couple sources first, and may eventually give up with a | ||||||||||||||||||||||||||||||||||||||||||
| 13 | # warning. | ||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | use constant HAS_CRYPTX => eval { require Crypt::PRNG; 1; }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.1
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | use constant HAS_BYTES_RANDOM_SECURE => eval { require Bytes::Random::Secure; 1; }; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.1
| |||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||
| 18 | sub _random_bytes | ||||||||||||||||||||||||||||||||||||||||||
| 19 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_random_bytes: called CC=3 SCAR=12.3
| |||||||||||||||||||||||||||||||||||||||||||
| 20 | 7 | my ($count) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 7 | ▶ | if (HAS_CRYPTX) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | return Crypt::PRNG::random_bytes($count); | |||||||||||||||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 7 | ▶ | if (HAS_BYTES_RANDOM_SECURE) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | return Bytes::Random::Secure::random_bytes($count); | |||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | carp | ||||||||||||||||||||||||||||||||||||||||||
| 31 | 7 | 'Caution: no supported PRNG module is installed. For extra security, please install CryptX or Bytes::Random::Secure'; | |||||||||||||||||||||||||||||||||||||||||
| 32 | 7 | return undef; | |||||||||||||||||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | 3 | our $FORCED_SCHNORR_AUX_RAND; | |||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | sub _schnorr_aux_random | ||||||||||||||||||||||||||||||||||||||||||
| 38 | 4 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_schnorr_aux_random: called CC=2 SCAR=7.2
| |||||||||||||||||||||||||||||||||||||||||||
| 39 | 4 | ▶ | return $FORCED_SCHNORR_AUX_RAND // _random_bytes(32); | ||||||||||||||||||||||||||||||||||||||||
|
Condition66%2/3
$Bitcoin::Secp256k1::FORCED_SCHNORR_AUX_RAND // _random_bytes(32)
MC/DC50%1/2
$Bitcoin::Secp256k1::FORCED_SCHNORR_AUX_RAND // _random_bytes(32)
$Bitcoin::Secp256k1::FORCED_SCHNORR_AUX_RAND
_random_bytes(32)
Truth table66%2/3
A // B
A= $Bitcoin::Secp256k1::FORCED_SCHNORR_AUX_RANDB= _random_bytes(32)
| |||||||||||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||
| 42 | # LOW LEVEL API | ||||||||||||||||||||||||||||||||||||||||||
| 43 | # XS defines constructor, destructor and some general utility methods | ||||||||||||||||||||||||||||||||||||||||||
| 44 | # interacting directly with libsecp256k1. All of these methods are private and | ||||||||||||||||||||||||||||||||||||||||||
| 45 | # subject to change. They are used internally to deliver high level API below. | ||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||
| 47 | 3 | require XSLoader; | |||||||||||||||||||||||||||||||||||||||||
| 48 | 3 | XSLoader::load('Bitcoin::Secp256k1', $Bitcoin::Secp256k1::VERSION); | |||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||
| 50 | # HIGH LEVEL API | ||||||||||||||||||||||||||||||||||||||||||
| 51 | # These methods are implemented in Perl and deliver more convenient API to | ||||||||||||||||||||||||||||||||||||||||||
| 52 | # interact with. They are stable and public. | ||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||
| 54 | sub _croak_usage | ||||||||||||||||||||||||||||||||||||||||||
| 55 | 5 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_croak_usage: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 56 | 5 | my $args_str = join ', ', @_; | |||||||||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||||||||||
| 58 | 5 | my ($package) = caller; | |||||||||||||||||||||||||||||||||||||||||
| 59 | 5 | my ($calling_sub) = (caller 1)[3]; | |||||||||||||||||||||||||||||||||||||||||
| 60 | 5 | $calling_sub =~ s/^${package}:://; | |||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | 5 | croak "bad or undefined arguments, usage: \$secp256k1->$calling_sub($args_str)"; | |||||||||||||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | sub verify_private_key | ||||||||||||||||||||||||||||||||||||||||||
| 66 | 3 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_private_key: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 67 | 3 | my ($self, $private_key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 68 | |||||||||||||||||||||||||||||||||||||||||||
| 69 | 3 | ▶ | (defined $private_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 70 | or _croak_usage(qw($private_key)); | ||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||
| 72 | 3 | return $self->_verify_privkey($private_key); | |||||||||||||||||||||||||||||||||||||||||
| 73 | } | ||||||||||||||||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||||||||||||||||
| 75 | sub verify_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 76 | 3 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_public_key: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 77 | 3 | my ($self, $public_key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | 3 | ▶ | (defined $public_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 80 | or _croak_usage(qw($public_key)); | ||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||
| 82 | # scope for local $@ | ||||||||||||||||||||||||||||||||||||||||||
| 83 | { | ||||||||||||||||||||||||||||||||||||||||||
| 84 | 3 | local $@; | |||||||||||||||||||||||||||||||||||||||||
| 85 | |||||||||||||||||||||||||||||||||||||||||||
| 86 | 3 | my $success = eval { | |||||||||||||||||||||||||||||||||||||||||
| 87 | 3 | $self->_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 88 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 89 | }; | ||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||
| 91 | 3 | return !!$success; | |||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||
| 93 | } | ||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||
| 95 | sub create_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 96 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create_public_key: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 97 | 7 | my ($self, $private_key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||
| 99 | 7 | ▶ | (defined $private_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 100 | or _croak_usage(qw($private_key)); | ||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||
| 102 | 7 | $self->_create_pubkey($private_key); | |||||||||||||||||||||||||||||||||||||||||
| 103 | 3 | return $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | sub normalize_signature | ||||||||||||||||||||||||||||||||||||||||||
| 107 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
normalize_signature: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 108 | 2 | my ($self, $signature) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 2 | ▶ | (defined $signature) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | or _croak_usage(qw($signature)); | ||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||
| 113 | 2 | $self->_signature($signature); | |||||||||||||||||||||||||||||||||||||||||
| 114 | 2 | $self->_normalize; | |||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | 2 | return $self->_signature; | |||||||||||||||||||||||||||||||||||||||||
| 117 | } | ||||||||||||||||||||||||||||||||||||||||||
| 118 | |||||||||||||||||||||||||||||||||||||||||||
| 119 | sub compress_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 120 | 4 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
compress_public_key: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 121 | 4 | my ($self, $public_key, $compressed) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 122 | 4 | ▶ | $compressed //= !!1; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%2/2
$compressed //=
MC/DC100%1/1
$compressed //=
$compressed
Truth table100%2/2
A
A= $compressed
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||
| 124 | 4 | ▶ | (defined $public_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | or _croak_usage(qw($public_key [$compressed])); | ||||||||||||||||||||||||||||||||||||||||||
| 126 | |||||||||||||||||||||||||||||||||||||||||||
| 127 | 4 | return $self->_pubkey($public_key, $compressed); | |||||||||||||||||||||||||||||||||||||||||
| 128 | } | ||||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | sub sign_message | ||||||||||||||||||||||||||||||||||||||||||
| 131 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign_message: called CC=3 SCAR=12.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 132 | 1 | my ($self, $private_key, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | 1 | ▶ | (defined $private_key and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $message
MC/DC0%0/2
defined $private_key and defined $message
defined $private_key
defined $message
Truth table33%1/3
A and B
A= defined $private_keyB= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 135 | or _croak_usage(qw($private_key $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||
| 137 | 1 | return $self->sign_digest($private_key, sha256(sha256($message))); | |||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||
| 140 | sub sign_message_schnorr | ||||||||||||||||||||||||||||||||||||||||||
| 141 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign_message_schnorr: called CC=3 SCAR=12.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 142 | 2 | my ($self, $private_key, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||
| 144 | 2 | ▶ | (defined $private_key and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $message
MC/DC0%0/2
defined $private_key and defined $message
defined $private_key
defined $message
Truth table33%1/3
A and B
A= defined $private_keyB= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | or _croak_usage(qw($private_key $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||
| 147 | 2 | return $self->sign_digest_schnorr($private_key, sha256($message)); | |||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||
| 150 | sub sign_message_recoverable | ||||||||||||||||||||||||||||||||||||||||||
| 151 | 5 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign_message_recoverable: called CC=3 SCAR=12.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 152 | 5 | my ($self, $private_key, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||
| 154 | 5 | ▶ | (defined $private_key and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $message
MC/DC0%0/2
defined $private_key and defined $message
defined $private_key
defined $message
Truth table33%1/3
A and B
A= defined $private_keyB= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 155 | or _croak_usage(qw($private_key $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||
| 157 | 5 | return $self->sign_digest_recoverable($private_key, sha256(sha256($message))); | |||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||
| 160 | sub sign_digest | ||||||||||||||||||||||||||||||||||||||||||
| 161 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign_digest: called CC=3 SCAR=12.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | 2 | my ($self, $private_key, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||||||||||||||
| 164 | 2 | ▶ | (defined $private_key and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $digest
MC/DC0%0/2
defined $private_key and defined $digest
defined $private_key
defined $digest
Truth table33%1/3
A and B
A= defined $private_keyB= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 165 | or _croak_usage(qw($private_key $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 166 | |||||||||||||||||||||||||||||||||||||||||||
| 167 | 2 | $self->_sign($private_key, $digest); | |||||||||||||||||||||||||||||||||||||||||
| 168 | 2 | return $self->_signature; | |||||||||||||||||||||||||||||||||||||||||
| 169 | } | ||||||||||||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||||||||||||
| 171 | sub sign_digest_schnorr | ||||||||||||||||||||||||||||||||||||||||||
| 172 | 4 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign_digest_schnorr: called CC=3 SCAR=12.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 173 | 4 | my ($self, $private_key, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||||||||||
| 175 | 4 | ▶ | (defined $private_key and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $digest
MC/DC0%0/2
defined $private_key and defined $digest
defined $private_key
defined $digest
Truth table33%1/3
A and B
A= defined $private_keyB= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 176 | or _croak_usage(qw($private_key $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||
| 178 | 4 | $self->_sign_schnorr($private_key, $digest); | |||||||||||||||||||||||||||||||||||||||||
| 179 | 4 | return $self->_signature_schnorr; | |||||||||||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||
| 182 | sub sign_digest_recoverable | ||||||||||||||||||||||||||||||||||||||||||
| 183 | 8 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
sign_digest_recoverable: called CC=3 SCAR=12.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 184 | 8 | my ($self, $private_key, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 185 | |||||||||||||||||||||||||||||||||||||||||||
| 186 | 8 | ▶ | (defined $private_key and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $digest
MC/DC0%0/2
defined $private_key and defined $digest
defined $private_key
defined $digest
Truth table33%1/3
A and B
A= defined $private_keyB= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 187 | or _croak_usage(qw($private_key $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||
| 189 | 8 | $self->_sign_recoverable($private_key, $digest); | |||||||||||||||||||||||||||||||||||||||||
| 190 | 8 | return $self->_signature_recoverable; | |||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||
| 193 | sub recover_public_key_message | ||||||||||||||||||||||||||||||||||||||||||
| 194 | 5 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
recover_public_key_message: called CC=3 SCAR=12.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 195 | 5 | my ($self, $recoverable_signature, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 196 | |||||||||||||||||||||||||||||||||||||||||||
| 197 | 5 | ▶ | (defined $recoverable_signature and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $recoverable_signature and defined $message
MC/DC0%0/2
defined $recoverable_signature and defined $message
defined $recoverable_signature
defined $message
Truth table33%1/3
A and B
A= defined $recoverable_signatureB= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 198 | or _croak_usage(qw($signature $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||||||||||||||||||
| 200 | 5 | return $self->recover_public_key_digest($recoverable_signature, sha256(sha256($message))); | |||||||||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||||||||||
| 203 | sub recover_public_key_digest | ||||||||||||||||||||||||||||||||||||||||||
| 204 | 8 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
recover_public_key_digest: called CC=3 SCAR=11.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 205 | 8 | my ($self, $recoverable_signature, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||||||||||||||||||
| 207 | 8 | ▶ | (defined $recoverable_signature and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $recoverable_signature and defined $digest
MC/DC0%0/2
defined $recoverable_signature and defined $digest
defined $recoverable_signature
defined $digest
Truth table33%1/3
A and B
A= defined $recoverable_signatureB= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 208 | or _croak_usage(qw($signature $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 209 | |||||||||||||||||||||||||||||||||||||||||||
| 210 | 8 | $self->_signature_recoverable($recoverable_signature); | |||||||||||||||||||||||||||||||||||||||||
| 211 | 6 | $self->_recover_pubkey_recoverable($digest); | |||||||||||||||||||||||||||||||||||||||||
| 212 | 6 | return $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 213 | } | ||||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||||
| 215 | sub verify_message | ||||||||||||||||||||||||||||||||||||||||||
| 216 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_message: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 217 | 7 | my ($self, $public_key, $signature, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 218 | |||||||||||||||||||||||||||||||||||||||||||
| 219 | 7 | ▶ | (defined $public_key and defined $signature and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
defined $public_key and defined $signature and defined $message
defined $public_key and defined $signature
MC/DC100%3/3
defined $public_key and defined $signature and defined $message
defined $public_key
defined $signature
defined $message
Truth table100%4/4
A and B and C
A= defined $public_keyB= defined $signatureC= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 220 | or _croak_usage(qw($public_key $signature $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 221 | |||||||||||||||||||||||||||||||||||||||||||
| 222 | 4 | return $self->verify_digest($public_key, $signature, sha256(sha256($message))); | |||||||||||||||||||||||||||||||||||||||||
| 223 | } | ||||||||||||||||||||||||||||||||||||||||||
| 224 | |||||||||||||||||||||||||||||||||||||||||||
| 225 | sub verify_message_schnorr | ||||||||||||||||||||||||||||||||||||||||||
| 226 | 3 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_message_schnorr: called CC=4 SCAR=17.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 227 | 3 | my ($self, $public_key, $signature, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 228 | |||||||||||||||||||||||||||||||||||||||||||
| 229 | 3 | ▶ | (defined $public_key and defined $signature and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $public_key and defined $signature and defined $message
defined $public_key and defined $signature
MC/DC0%0/3
defined $public_key and defined $signature and defined $message
defined $public_key
defined $signature
defined $message
Truth table25%1/4
A and B and C
A= defined $public_keyB= defined $signatureC= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 230 | or _croak_usage(qw($public_key $signature $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 231 | |||||||||||||||||||||||||||||||||||||||||||
| 232 | 3 | return $self->verify_digest_schnorr($public_key, $signature, sha256($message)); | |||||||||||||||||||||||||||||||||||||||||
| 233 | } | ||||||||||||||||||||||||||||||||||||||||||
| 234 | |||||||||||||||||||||||||||||||||||||||||||
| 235 | sub verify_message_recoverable | ||||||||||||||||||||||||||||||||||||||||||
| 236 | 3 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_message_recoverable: called CC=4 SCAR=17.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 237 | 3 | my ($self, $public_key, $signature, $message) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||
| 239 | 3 | ▶ | (defined $public_key and defined $signature and defined $message) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $public_key and defined $signature and defined $message
defined $public_key and defined $signature
MC/DC0%0/3
defined $public_key and defined $signature and defined $message
defined $public_key
defined $signature
defined $message
Truth table25%1/4
A and B and C
A= defined $public_keyB= defined $signatureC= defined $message
| |||||||||||||||||||||||||||||||||||||||||||
| 240 | or _croak_usage(qw($public_key $signature $message)); | ||||||||||||||||||||||||||||||||||||||||||
| 241 | |||||||||||||||||||||||||||||||||||||||||||
| 242 | 3 | return $self->verify_digest_recoverable($public_key, $signature, sha256(sha256($message))); | |||||||||||||||||||||||||||||||||||||||||
| 243 | } | ||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||
| 245 | sub verify_digest | ||||||||||||||||||||||||||||||||||||||||||
| 246 | 10 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_digest: called CC=4 SCAR=15.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 247 | 10 | my ($self, $public_key, $signature, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 248 | |||||||||||||||||||||||||||||||||||||||||||
| 249 | 10 | ▶ | (defined $public_key and defined $signature and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $public_key and defined $signature and defined $digest
defined $public_key and defined $signature
MC/DC0%0/3
defined $public_key and defined $signature and defined $digest
defined $public_key
defined $signature
defined $digest
Truth table25%1/4
A and B and C
A= defined $public_keyB= defined $signatureC= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 250 | or _croak_usage(qw($public_key $signature $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 251 | |||||||||||||||||||||||||||||||||||||||||||
| 252 | 10 | $self->_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 253 | 9 | $self->_signature($signature); | |||||||||||||||||||||||||||||||||||||||||
| 254 | 8 | $self->_normalize; | |||||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||||||
| 256 | 8 | return $self->_verify($digest); | |||||||||||||||||||||||||||||||||||||||||
| 257 | } | ||||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||||
| 259 | sub verify_digest_schnorr | ||||||||||||||||||||||||||||||||||||||||||
| 260 | 7 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_digest_schnorr: called CC=4 SCAR=15.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 261 | 7 | my ($self, $public_key, $signature, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||||||||||||||||||
| 263 | 7 | ▶ | (defined $public_key and defined $signature and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $public_key and defined $signature and defined $digest
defined $public_key and defined $signature
MC/DC0%0/3
defined $public_key and defined $signature and defined $digest
defined $public_key
defined $signature
defined $digest
Truth table25%1/4
A and B and C
A= defined $public_keyB= defined $signatureC= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 264 | or _croak_usage(qw($public_key $signature $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||||||||||||||||||
| 266 | 7 | $self->_xonly_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 267 | 6 | $self->_signature_schnorr($signature); | |||||||||||||||||||||||||||||||||||||||||
| 268 | |||||||||||||||||||||||||||||||||||||||||||
| 269 | 6 | return $self->_verify_schnorr($digest); | |||||||||||||||||||||||||||||||||||||||||
| 270 | } | ||||||||||||||||||||||||||||||||||||||||||
| 271 | |||||||||||||||||||||||||||||||||||||||||||
| 272 | sub verify_digest_recoverable | ||||||||||||||||||||||||||||||||||||||||||
| 273 | 5 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
verify_digest_recoverable: called CC=4 SCAR=15.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 274 | 5 | my ($self, $public_key, $signature, $digest) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||||||||||||||||||
| 276 | 5 | ▶ | (defined $public_key and defined $signature and defined $digest) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%2/6
defined $public_key and defined $signature and defined $digest
defined $public_key and defined $signature
MC/DC0%0/3
defined $public_key and defined $signature and defined $digest
defined $public_key
defined $signature
defined $digest
Truth table25%1/4
A and B and C
A= defined $public_keyB= defined $signatureC= defined $digest
| |||||||||||||||||||||||||||||||||||||||||||
| 277 | or _croak_usage(qw($public_key $signature $digest)); | ||||||||||||||||||||||||||||||||||||||||||
| 278 | |||||||||||||||||||||||||||||||||||||||||||
| 279 | 5 | $self->_signature_recoverable($signature); | |||||||||||||||||||||||||||||||||||||||||
| 280 | 5 | $self->_recover_pubkey_recoverable($digest); | |||||||||||||||||||||||||||||||||||||||||
| 281 | 5 | my $recovered_pubkey = $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 282 | |||||||||||||||||||||||||||||||||||||||||||
| 283 | 5 | return $recovered_pubkey eq $self->_pubkey($public_key, !!1); | |||||||||||||||||||||||||||||||||||||||||
| 284 | } | ||||||||||||||||||||||||||||||||||||||||||
| 285 | |||||||||||||||||||||||||||||||||||||||||||
| 286 | sub negate_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 287 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
negate_public_key: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 288 | 1 | my ($self, $public_key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||||||||||||||||||
| 290 | 1 | ▶ | (defined $public_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 291 | or _croak_usage(qw($public_key)); | ||||||||||||||||||||||||||||||||||||||||||
| 292 | |||||||||||||||||||||||||||||||||||||||||||
| 293 | 1 | $self->_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 294 | 1 | $self->_pubkey_negate; | |||||||||||||||||||||||||||||||||||||||||
| 295 | |||||||||||||||||||||||||||||||||||||||||||
| 296 | 1 | return $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 297 | } | ||||||||||||||||||||||||||||||||||||||||||
| 298 | |||||||||||||||||||||||||||||||||||||||||||
| 299 | sub negate_private_key | ||||||||||||||||||||||||||||||||||||||||||
| 300 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
negate_private_key: called CC=2 SCAR=7.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 301 | 2 | my ($self, $private_key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||
| 303 | 2 | ▶ | (defined $private_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 304 | or _croak_usage(qw($private_key)); | ||||||||||||||||||||||||||||||||||||||||||
| 305 | |||||||||||||||||||||||||||||||||||||||||||
| 306 | 2 | return $self->_privkey_negate($private_key); | |||||||||||||||||||||||||||||||||||||||||
| 307 | } | ||||||||||||||||||||||||||||||||||||||||||
| 308 | |||||||||||||||||||||||||||||||||||||||||||
| 309 | sub xonly_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 310 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
xonly_public_key: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 311 | 1 | my ($self, $public_key) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 312 | |||||||||||||||||||||||||||||||||||||||||||
| 313 | 1 | ▶ | (defined $public_key) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 314 | or _croak_usage(qw($public_key)); | ||||||||||||||||||||||||||||||||||||||||||
| 315 | |||||||||||||||||||||||||||||||||||||||||||
| 316 | 1 | $self->_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 317 | 1 | $self->_convert_pubkey_xonly; | |||||||||||||||||||||||||||||||||||||||||
| 318 | |||||||||||||||||||||||||||||||||||||||||||
| 319 | 1 | return $self->_xonly_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 320 | } | ||||||||||||||||||||||||||||||||||||||||||
| 321 | |||||||||||||||||||||||||||||||||||||||||||
| 322 | sub add_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 323 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_public_key: called CC=3 SCAR=11.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 324 | 1 | my ($self, $public_key, $tweak) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 325 | |||||||||||||||||||||||||||||||||||||||||||
| 326 | 1 | ▶ | (defined $public_key and defined $tweak) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $public_key and defined $tweak
MC/DC0%0/2
defined $public_key and defined $tweak
defined $public_key
defined $tweak
Truth table33%1/3
A and B
A= defined $public_keyB= defined $tweak
| |||||||||||||||||||||||||||||||||||||||||||
| 327 | or _croak_usage(qw($public_key $tweak)); | ||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||
| 329 | 1 | $self->_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 330 | 1 | $self->_pubkey_add($tweak); | |||||||||||||||||||||||||||||||||||||||||
| 331 | |||||||||||||||||||||||||||||||||||||||||||
| 332 | 1 | return $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 333 | } | ||||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||
| 335 | sub add_private_key | ||||||||||||||||||||||||||||||||||||||||||
| 336 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_private_key: called CC=3 SCAR=12.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 337 | 2 | my ($self, $private_key, $tweak) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 338 | |||||||||||||||||||||||||||||||||||||||||||
| 339 | 2 | ▶ | (defined $private_key and defined $tweak) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $tweak
MC/DC0%0/2
defined $private_key and defined $tweak
defined $private_key
defined $tweak
Truth table33%1/3
A and B
A= defined $private_keyB= defined $tweak
| |||||||||||||||||||||||||||||||||||||||||||
| 340 | or _croak_usage(qw($private_key $tweak)); | ||||||||||||||||||||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||||||||||||||||||
| 342 | 2 | return $self->_privkey_add($private_key, $tweak); | |||||||||||||||||||||||||||||||||||||||||
| 343 | } | ||||||||||||||||||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||||||||||||||||||
| 345 | sub multiply_public_key | ||||||||||||||||||||||||||||||||||||||||||
| 346 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
multiply_public_key: called CC=3 SCAR=11.8
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 347 | 2 | my ($self, $public_key, $tweak) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||
| 349 | 2 | ▶ | (defined $public_key and defined $tweak) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $public_key and defined $tweak
MC/DC0%0/2
defined $public_key and defined $tweak
defined $public_key
defined $tweak
Truth table33%1/3
A and B
A= defined $public_keyB= defined $tweak
| |||||||||||||||||||||||||||||||||||||||||||
| 350 | or _croak_usage(qw($public_key $tweak)); | ||||||||||||||||||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||||||||||||||||||
| 352 | 2 | $self->_pubkey($public_key); | |||||||||||||||||||||||||||||||||||||||||
| 353 | 2 | $self->_pubkey_mul($tweak); | |||||||||||||||||||||||||||||||||||||||||
| 354 | |||||||||||||||||||||||||||||||||||||||||||
| 355 | 1 | return $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 356 | } | ||||||||||||||||||||||||||||||||||||||||||
| 357 | |||||||||||||||||||||||||||||||||||||||||||
| 358 | sub multiply_private_key | ||||||||||||||||||||||||||||||||||||||||||
| 359 | 1 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
multiply_private_key: called CC=3 SCAR=12.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 360 | 1 | my ($self, $private_key, $tweak) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 361 | |||||||||||||||||||||||||||||||||||||||||||
| 362 | 1 | ▶ | (defined $private_key and defined $tweak) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $private_key and defined $tweak
MC/DC0%0/2
defined $private_key and defined $tweak
defined $private_key
defined $tweak
Truth table33%1/3
A and B
A= defined $private_keyB= defined $tweak
| |||||||||||||||||||||||||||||||||||||||||||
| 363 | or _croak_usage(qw($private_key $tweak)); | ||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||
| 365 | 1 | return $self->_privkey_mul($private_key, $tweak); | |||||||||||||||||||||||||||||||||||||||||
| 366 | } | ||||||||||||||||||||||||||||||||||||||||||
| 367 | |||||||||||||||||||||||||||||||||||||||||||
| 368 | sub combine_public_keys | ||||||||||||||||||||||||||||||||||||||||||
| 369 | 5 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
combine_public_keys: called CC=4 SCAR=13.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 370 | 5 | my ($self, @public_keys) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 371 | |||||||||||||||||||||||||||||||||||||||||||
| 372 | 5 | ▶ | (@public_keys > 0) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 373 | or _croak_usage(qw($public_key [@more_public_keys])); | ||||||||||||||||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||||||||||||||||
| 375 | 4 | $self->_pubkey(undef); | |||||||||||||||||||||||||||||||||||||||||
| 376 | 4 | foreach my $pub (@public_keys) { | |||||||||||||||||||||||||||||||||||||||||
| 377 | 8 | ▶ | (defined $pub) | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 378 | or _croak_usage(qw($public_key [@more_public_keys])); | ||||||||||||||||||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||||||||||||||||||
| 380 | 7 | $self->_push_pubkey($pub); | |||||||||||||||||||||||||||||||||||||||||
| 381 | } | ||||||||||||||||||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||||||||||||||||||
| 383 | 2 | $self->_pubkey_combine; | |||||||||||||||||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||||||||||||||||
| 385 | 2 | return $self->_pubkey; | |||||||||||||||||||||||||||||||||||||||||
| 386 | } | ||||||||||||||||||||||||||||||||||||||||||
| 387 | |||||||||||||||||||||||||||||||||||||||||||
| 388 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||
| 390 | __END__ | ||||||||||||||||||||||||||||||||||||||||||