line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::OpenPGP::Key::Secret::DSA; |
2
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
140
|
|
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
1398
|
use Crypt::DSA::Key; |
|
4
|
|
|
|
|
12411
|
|
|
4
|
|
|
|
|
125
|
|
5
|
4
|
|
|
4
|
|
1351
|
use Crypt::OpenPGP::Key::Public::DSA; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
146
|
|
6
|
4
|
|
|
4
|
|
22
|
use Crypt::OpenPGP::Key::Secret; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
110
|
|
7
|
4
|
|
|
4
|
|
22
|
use Crypt::OpenPGP::ErrorHandler; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
95
|
|
8
|
4
|
|
|
4
|
|
18
|
use base qw( Crypt::OpenPGP::Key::Secret Crypt::OpenPGP::ErrorHandler ); |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
1518
|
|
9
|
|
|
|
|
|
|
|
10
|
20
|
|
|
20
|
0
|
92
|
sub secret_props { qw( x ) } |
11
|
|
|
|
|
|
|
*sig_props = \&Crypt::OpenPGP::Key::Public::DSA::sig_props; |
12
|
|
|
|
|
|
|
*public_props = \&Crypt::OpenPGP::Key::Public::DSA::public_props; |
13
|
|
|
|
|
|
|
*size = \&Crypt::OpenPGP::Key::Public::DSA::size; |
14
|
|
|
|
|
|
|
*keygen = \&Crypt::OpenPGP::Key::Public::DSA::keygen; |
15
|
|
|
|
|
|
|
*can_sign = \&Crypt::OpenPGP::Key::Public::DSA::can_sign; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub init { |
18
|
15
|
|
|
15
|
0
|
29
|
my $key = shift; |
19
|
15
|
|
66
|
|
|
167
|
$key->{key_data} = shift || Crypt::DSA::Key->new; |
20
|
15
|
|
|
|
|
300
|
$key; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
16
|
|
|
16
|
0
|
1305
|
sub y { $_[0]->{key_data}->pub_key(@_[1..$#_]) } |
24
|
5
|
|
|
5
|
0
|
303
|
sub x { $_[0]->{key_data}->priv_key(@_[1..$#_]) } |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub sign { |
27
|
7
|
|
|
7
|
0
|
14
|
my $key = shift; |
28
|
7
|
|
|
|
|
19
|
my($dgst) = @_; |
29
|
7
|
|
|
|
|
1644
|
require Crypt::DSA; |
30
|
7
|
|
|
|
|
22862
|
my $dsa = Crypt::DSA->new; |
31
|
|
|
|
|
|
|
my $sig = $dsa->sign( |
32
|
|
|
|
|
|
|
Key => $key->{key_data}, |
33
|
7
|
|
|
|
|
168
|
Digest => $dgst, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
*verify = \&Crypt::OpenPGP::Key::Public::DSA::verify; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |