line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Crypt::OpenSSL::EC; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
32131
|
use 5.008005; |
|
2
|
|
|
|
|
8
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
32
|
|
5
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
46
|
|
6
|
2
|
|
|
2
|
|
8
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
130
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require Exporter; |
9
|
2
|
|
|
2
|
|
970
|
use AutoLoader; |
|
2
|
|
|
|
|
2166
|
|
|
2
|
|
|
|
|
14
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# 0=no warns, 1=only errors, 2=ciphers, 3=progress, 4=dump data |
14
|
|
|
|
|
|
|
$Crypt::OpenSSL::EC::trace = 0; # Do not change here, use |
15
|
|
|
|
|
|
|
# $Crypt::OpenSSL::EC::trace = [1-4] in caller |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
18
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
19
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# This allows declaration use Crypt::OpenSSL::EC ':all'; |
22
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
23
|
|
|
|
|
|
|
# will save memory. |
24
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( 'all' => [ qw( |
25
|
|
|
|
|
|
|
EC_F_COMPUTE_WNAF |
26
|
|
|
|
|
|
|
EC_F_D2I_ECPARAMETERS |
27
|
|
|
|
|
|
|
EC_F_D2I_ECPKPARAMETERS |
28
|
|
|
|
|
|
|
EC_F_D2I_ECPRIVATEKEY |
29
|
|
|
|
|
|
|
EC_F_DO_EC_KEY_PRINT |
30
|
|
|
|
|
|
|
EC_F_ECKEY_PARAM2TYPE |
31
|
|
|
|
|
|
|
EC_F_ECKEY_PARAM_DECODE |
32
|
|
|
|
|
|
|
EC_F_ECKEY_PRIV_DECODE |
33
|
|
|
|
|
|
|
EC_F_ECKEY_PRIV_ENCODE |
34
|
|
|
|
|
|
|
EC_F_ECKEY_PUB_DECODE |
35
|
|
|
|
|
|
|
EC_F_ECKEY_PUB_ENCODE |
36
|
|
|
|
|
|
|
EC_F_ECKEY_TYPE2PARAM |
37
|
|
|
|
|
|
|
EC_F_ECPARAMETERS_PRINT |
38
|
|
|
|
|
|
|
EC_F_ECPARAMETERS_PRINT_FP |
39
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT |
40
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT_FP |
41
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_192 |
42
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_224 |
43
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_256 |
44
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_521 |
45
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2CURVE |
46
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2FIELDID |
47
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PARAMETERS |
48
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PKPARAMETERS |
49
|
|
|
|
|
|
|
EC_F_EC_ASN1_PARAMETERS2GROUP |
50
|
|
|
|
|
|
|
EC_F_EC_ASN1_PKPARAMETERS2GROUP |
51
|
|
|
|
|
|
|
EC_F_EC_EX_DATA_SET_DATA |
52
|
|
|
|
|
|
|
EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY |
53
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT |
54
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE |
55
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_OCT2POINT |
56
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT2OCT |
57
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES |
58
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES |
59
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES |
60
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_DECODE |
61
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_ENCODE |
62
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_MUL |
63
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE |
64
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_SQR |
65
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_GROUP_SET_CURVE |
66
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP |
67
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_FIELD_MUL |
68
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_FIELD_SQR |
69
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_GROUP_SET_CURVE |
70
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT |
71
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE |
72
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP |
73
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR |
74
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_MAKE_AFFINE |
75
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_OCT2POINT |
76
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT2OCT |
77
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE |
78
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES |
79
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP |
80
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES |
81
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP |
82
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES |
83
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP |
84
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK |
85
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK_DISCRIMINANT |
86
|
|
|
|
|
|
|
EC_F_EC_GROUP_COPY |
87
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET0_GENERATOR |
88
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_COFACTOR |
89
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GF2M |
90
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GFP |
91
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_DEGREE |
92
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_ORDER |
93
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS |
94
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_TRINOMIAL_BASIS |
95
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW |
96
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW_BY_CURVE_NAME |
97
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW_FROM_DATA |
98
|
|
|
|
|
|
|
EC_F_EC_GROUP_PRECOMPUTE_MULT |
99
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_CURVE_GF2M |
100
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_CURVE_GFP |
101
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_EXTRA_DATA |
102
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_GENERATOR |
103
|
|
|
|
|
|
|
EC_F_EC_KEY_CHECK_KEY |
104
|
|
|
|
|
|
|
EC_F_EC_KEY_COPY |
105
|
|
|
|
|
|
|
EC_F_EC_KEY_GENERATE_KEY |
106
|
|
|
|
|
|
|
EC_F_EC_KEY_NEW |
107
|
|
|
|
|
|
|
EC_F_EC_KEY_PRINT |
108
|
|
|
|
|
|
|
EC_F_EC_KEY_PRINT_FP |
109
|
|
|
|
|
|
|
EC_F_EC_POINTS_MAKE_AFFINE |
110
|
|
|
|
|
|
|
EC_F_EC_POINT_ADD |
111
|
|
|
|
|
|
|
EC_F_EC_POINT_CMP |
112
|
|
|
|
|
|
|
EC_F_EC_POINT_COPY |
113
|
|
|
|
|
|
|
EC_F_EC_POINT_DBL |
114
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M |
115
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP |
116
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP |
117
|
|
|
|
|
|
|
EC_F_EC_POINT_INVERT |
118
|
|
|
|
|
|
|
EC_F_EC_POINT_IS_AT_INFINITY |
119
|
|
|
|
|
|
|
EC_F_EC_POINT_IS_ON_CURVE |
120
|
|
|
|
|
|
|
EC_F_EC_POINT_MAKE_AFFINE |
121
|
|
|
|
|
|
|
EC_F_EC_POINT_MUL |
122
|
|
|
|
|
|
|
EC_F_EC_POINT_NEW |
123
|
|
|
|
|
|
|
EC_F_EC_POINT_OCT2POINT |
124
|
|
|
|
|
|
|
EC_F_EC_POINT_POINT2OCT |
125
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M |
126
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP |
127
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M |
128
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP |
129
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP |
130
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_TO_INFINITY |
131
|
|
|
|
|
|
|
EC_F_EC_PRE_COMP_DUP |
132
|
|
|
|
|
|
|
EC_F_EC_PRE_COMP_NEW |
133
|
|
|
|
|
|
|
EC_F_EC_WNAF_MUL |
134
|
|
|
|
|
|
|
EC_F_EC_WNAF_PRECOMPUTE_MULT |
135
|
|
|
|
|
|
|
EC_F_I2D_ECPARAMETERS |
136
|
|
|
|
|
|
|
EC_F_I2D_ECPKPARAMETERS |
137
|
|
|
|
|
|
|
EC_F_I2D_ECPRIVATEKEY |
138
|
|
|
|
|
|
|
EC_F_I2O_ECPUBLICKEY |
139
|
|
|
|
|
|
|
EC_F_O2I_ECPUBLICKEY |
140
|
|
|
|
|
|
|
EC_F_OLD_EC_PRIV_DECODE |
141
|
|
|
|
|
|
|
EC_F_PKEY_EC_CTRL |
142
|
|
|
|
|
|
|
EC_F_PKEY_EC_CTRL_STR |
143
|
|
|
|
|
|
|
EC_F_PKEY_EC_DERIVE |
144
|
|
|
|
|
|
|
EC_F_PKEY_EC_KEYGEN |
145
|
|
|
|
|
|
|
EC_F_PKEY_EC_PARAMGEN |
146
|
|
|
|
|
|
|
EC_F_PKEY_EC_SIGN |
147
|
|
|
|
|
|
|
EC_PKEY_NO_PARAMETERS |
148
|
|
|
|
|
|
|
EC_PKEY_NO_PUBKEY |
149
|
|
|
|
|
|
|
EC_R_ASN1_ERROR |
150
|
|
|
|
|
|
|
EC_R_ASN1_UNKNOWN_FIELD |
151
|
|
|
|
|
|
|
EC_R_BUFFER_TOO_SMALL |
152
|
|
|
|
|
|
|
EC_R_D2I_ECPKPARAMETERS_FAILURE |
153
|
|
|
|
|
|
|
EC_R_DECODE_ERROR |
154
|
|
|
|
|
|
|
EC_R_DISCRIMINANT_IS_ZERO |
155
|
|
|
|
|
|
|
EC_R_EC_GROUP_NEW_BY_NAME_FAILURE |
156
|
|
|
|
|
|
|
EC_R_FIELD_TOO_LARGE |
157
|
|
|
|
|
|
|
EC_R_GROUP2PKPARAMETERS_FAILURE |
158
|
|
|
|
|
|
|
EC_R_I2D_ECPKPARAMETERS_FAILURE |
159
|
|
|
|
|
|
|
EC_R_INCOMPATIBLE_OBJECTS |
160
|
|
|
|
|
|
|
EC_R_INVALID_ARGUMENT |
161
|
|
|
|
|
|
|
EC_R_INVALID_COMPRESSED_POINT |
162
|
|
|
|
|
|
|
EC_R_INVALID_COMPRESSION_BIT |
163
|
|
|
|
|
|
|
EC_R_INVALID_CURVE |
164
|
|
|
|
|
|
|
EC_R_INVALID_DIGEST_TYPE |
165
|
|
|
|
|
|
|
EC_R_INVALID_ENCODING |
166
|
|
|
|
|
|
|
EC_R_INVALID_FIELD |
167
|
|
|
|
|
|
|
EC_R_INVALID_FORM |
168
|
|
|
|
|
|
|
EC_R_INVALID_GROUP_ORDER |
169
|
|
|
|
|
|
|
EC_R_INVALID_PENTANOMIAL_BASIS |
170
|
|
|
|
|
|
|
EC_R_INVALID_PRIVATE_KEY |
171
|
|
|
|
|
|
|
EC_R_INVALID_TRINOMIAL_BASIS |
172
|
|
|
|
|
|
|
EC_R_KEYS_NOT_SET |
173
|
|
|
|
|
|
|
EC_R_MISSING_PARAMETERS |
174
|
|
|
|
|
|
|
EC_R_MISSING_PRIVATE_KEY |
175
|
|
|
|
|
|
|
EC_R_NOT_A_NIST_PRIME |
176
|
|
|
|
|
|
|
EC_R_NOT_A_SUPPORTED_NIST_PRIME |
177
|
|
|
|
|
|
|
EC_R_NOT_IMPLEMENTED |
178
|
|
|
|
|
|
|
EC_R_NOT_INITIALIZED |
179
|
|
|
|
|
|
|
EC_R_NO_FIELD_MOD |
180
|
|
|
|
|
|
|
EC_R_NO_PARAMETERS_SET |
181
|
|
|
|
|
|
|
EC_R_PASSED_NULL_PARAMETER |
182
|
|
|
|
|
|
|
EC_R_PKPARAMETERS2GROUP_FAILURE |
183
|
|
|
|
|
|
|
EC_R_POINT_AT_INFINITY |
184
|
|
|
|
|
|
|
EC_R_POINT_IS_NOT_ON_CURVE |
185
|
|
|
|
|
|
|
EC_R_SLOT_FULL |
186
|
|
|
|
|
|
|
EC_R_UNDEFINED_GENERATOR |
187
|
|
|
|
|
|
|
EC_R_UNDEFINED_ORDER |
188
|
|
|
|
|
|
|
EC_R_UNKNOWN_GROUP |
189
|
|
|
|
|
|
|
EC_R_UNKNOWN_ORDER |
190
|
|
|
|
|
|
|
EC_R_UNSUPPORTED_FIELD |
191
|
|
|
|
|
|
|
EC_R_WRONG_ORDER |
192
|
|
|
|
|
|
|
EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID |
193
|
|
|
|
|
|
|
OPENSSL_ECC_MAX_FIELD_BITS |
194
|
|
|
|
|
|
|
OPENSSL_EC_NAMED_CURVE |
195
|
|
|
|
|
|
|
POINT_CONVERSION_COMPRESSED |
196
|
|
|
|
|
|
|
POINT_CONVERSION_HYBRID |
197
|
|
|
|
|
|
|
POINT_CONVERSION_UNCOMPRESSED |
198
|
|
|
|
|
|
|
) ] ); |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
our @EXPORT = qw( |
203
|
|
|
|
|
|
|
EC_F_COMPUTE_WNAF |
204
|
|
|
|
|
|
|
EC_F_D2I_ECPARAMETERS |
205
|
|
|
|
|
|
|
EC_F_D2I_ECPKPARAMETERS |
206
|
|
|
|
|
|
|
EC_F_D2I_ECPRIVATEKEY |
207
|
|
|
|
|
|
|
EC_F_DO_EC_KEY_PRINT |
208
|
|
|
|
|
|
|
EC_F_ECKEY_PARAM2TYPE |
209
|
|
|
|
|
|
|
EC_F_ECKEY_PARAM_DECODE |
210
|
|
|
|
|
|
|
EC_F_ECKEY_PRIV_DECODE |
211
|
|
|
|
|
|
|
EC_F_ECKEY_PRIV_ENCODE |
212
|
|
|
|
|
|
|
EC_F_ECKEY_PUB_DECODE |
213
|
|
|
|
|
|
|
EC_F_ECKEY_PUB_ENCODE |
214
|
|
|
|
|
|
|
EC_F_ECKEY_TYPE2PARAM |
215
|
|
|
|
|
|
|
EC_F_ECPARAMETERS_PRINT |
216
|
|
|
|
|
|
|
EC_F_ECPARAMETERS_PRINT_FP |
217
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT |
218
|
|
|
|
|
|
|
EC_F_ECPKPARAMETERS_PRINT_FP |
219
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_192 |
220
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_224 |
221
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_256 |
222
|
|
|
|
|
|
|
EC_F_ECP_NIST_MOD_521 |
223
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2CURVE |
224
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2FIELDID |
225
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PARAMETERS |
226
|
|
|
|
|
|
|
EC_F_EC_ASN1_GROUP2PKPARAMETERS |
227
|
|
|
|
|
|
|
EC_F_EC_ASN1_PARAMETERS2GROUP |
228
|
|
|
|
|
|
|
EC_F_EC_ASN1_PKPARAMETERS2GROUP |
229
|
|
|
|
|
|
|
EC_F_EC_EX_DATA_SET_DATA |
230
|
|
|
|
|
|
|
EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY |
231
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT |
232
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE |
233
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_OCT2POINT |
234
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT2OCT |
235
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES |
236
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES |
237
|
|
|
|
|
|
|
EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES |
238
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_DECODE |
239
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_ENCODE |
240
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_MUL |
241
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE |
242
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_FIELD_SQR |
243
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_GROUP_SET_CURVE |
244
|
|
|
|
|
|
|
EC_F_EC_GFP_MONT_GROUP_SET_CURVE_GFP |
245
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_FIELD_MUL |
246
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_FIELD_SQR |
247
|
|
|
|
|
|
|
EC_F_EC_GFP_NIST_GROUP_SET_CURVE |
248
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT |
249
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE |
250
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE_GFP |
251
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_GROUP_SET_GENERATOR |
252
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_MAKE_AFFINE |
253
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_OCT2POINT |
254
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT2OCT |
255
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE |
256
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES |
257
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES_GFP |
258
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES |
259
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES_GFP |
260
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES |
261
|
|
|
|
|
|
|
EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES_GFP |
262
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK |
263
|
|
|
|
|
|
|
EC_F_EC_GROUP_CHECK_DISCRIMINANT |
264
|
|
|
|
|
|
|
EC_F_EC_GROUP_COPY |
265
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET0_GENERATOR |
266
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_COFACTOR |
267
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GF2M |
268
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_CURVE_GFP |
269
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_DEGREE |
270
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_ORDER |
271
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS |
272
|
|
|
|
|
|
|
EC_F_EC_GROUP_GET_TRINOMIAL_BASIS |
273
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW |
274
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW_BY_CURVE_NAME |
275
|
|
|
|
|
|
|
EC_F_EC_GROUP_NEW_FROM_DATA |
276
|
|
|
|
|
|
|
EC_F_EC_GROUP_PRECOMPUTE_MULT |
277
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_CURVE_GF2M |
278
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_CURVE_GFP |
279
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_EXTRA_DATA |
280
|
|
|
|
|
|
|
EC_F_EC_GROUP_SET_GENERATOR |
281
|
|
|
|
|
|
|
EC_F_EC_KEY_CHECK_KEY |
282
|
|
|
|
|
|
|
EC_F_EC_KEY_COPY |
283
|
|
|
|
|
|
|
EC_F_EC_KEY_GENERATE_KEY |
284
|
|
|
|
|
|
|
EC_F_EC_KEY_NEW |
285
|
|
|
|
|
|
|
EC_F_EC_KEY_PRINT |
286
|
|
|
|
|
|
|
EC_F_EC_KEY_PRINT_FP |
287
|
|
|
|
|
|
|
EC_F_EC_POINTS_MAKE_AFFINE |
288
|
|
|
|
|
|
|
EC_F_EC_POINT_ADD |
289
|
|
|
|
|
|
|
EC_F_EC_POINT_CMP |
290
|
|
|
|
|
|
|
EC_F_EC_POINT_COPY |
291
|
|
|
|
|
|
|
EC_F_EC_POINT_DBL |
292
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M |
293
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP |
294
|
|
|
|
|
|
|
EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP |
295
|
|
|
|
|
|
|
EC_F_EC_POINT_INVERT |
296
|
|
|
|
|
|
|
EC_F_EC_POINT_IS_AT_INFINITY |
297
|
|
|
|
|
|
|
EC_F_EC_POINT_IS_ON_CURVE |
298
|
|
|
|
|
|
|
EC_F_EC_POINT_MAKE_AFFINE |
299
|
|
|
|
|
|
|
EC_F_EC_POINT_MUL |
300
|
|
|
|
|
|
|
EC_F_EC_POINT_NEW |
301
|
|
|
|
|
|
|
EC_F_EC_POINT_OCT2POINT |
302
|
|
|
|
|
|
|
EC_F_EC_POINT_POINT2OCT |
303
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M |
304
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP |
305
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M |
306
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP |
307
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP |
308
|
|
|
|
|
|
|
EC_F_EC_POINT_SET_TO_INFINITY |
309
|
|
|
|
|
|
|
EC_F_EC_PRE_COMP_DUP |
310
|
|
|
|
|
|
|
EC_F_EC_PRE_COMP_NEW |
311
|
|
|
|
|
|
|
EC_F_EC_WNAF_MUL |
312
|
|
|
|
|
|
|
EC_F_EC_WNAF_PRECOMPUTE_MULT |
313
|
|
|
|
|
|
|
EC_F_I2D_ECPARAMETERS |
314
|
|
|
|
|
|
|
EC_F_I2D_ECPKPARAMETERS |
315
|
|
|
|
|
|
|
EC_F_I2D_ECPRIVATEKEY |
316
|
|
|
|
|
|
|
EC_F_I2O_ECPUBLICKEY |
317
|
|
|
|
|
|
|
EC_F_O2I_ECPUBLICKEY |
318
|
|
|
|
|
|
|
EC_F_OLD_EC_PRIV_DECODE |
319
|
|
|
|
|
|
|
EC_F_PKEY_EC_CTRL |
320
|
|
|
|
|
|
|
EC_F_PKEY_EC_CTRL_STR |
321
|
|
|
|
|
|
|
EC_F_PKEY_EC_DERIVE |
322
|
|
|
|
|
|
|
EC_F_PKEY_EC_KEYGEN |
323
|
|
|
|
|
|
|
EC_F_PKEY_EC_PARAMGEN |
324
|
|
|
|
|
|
|
EC_F_PKEY_EC_SIGN |
325
|
|
|
|
|
|
|
EC_PKEY_NO_PARAMETERS |
326
|
|
|
|
|
|
|
EC_PKEY_NO_PUBKEY |
327
|
|
|
|
|
|
|
EC_R_ASN1_ERROR |
328
|
|
|
|
|
|
|
EC_R_ASN1_UNKNOWN_FIELD |
329
|
|
|
|
|
|
|
EC_R_BUFFER_TOO_SMALL |
330
|
|
|
|
|
|
|
EC_R_D2I_ECPKPARAMETERS_FAILURE |
331
|
|
|
|
|
|
|
EC_R_DECODE_ERROR |
332
|
|
|
|
|
|
|
EC_R_DISCRIMINANT_IS_ZERO |
333
|
|
|
|
|
|
|
EC_R_EC_GROUP_NEW_BY_NAME_FAILURE |
334
|
|
|
|
|
|
|
EC_R_FIELD_TOO_LARGE |
335
|
|
|
|
|
|
|
EC_R_GROUP2PKPARAMETERS_FAILURE |
336
|
|
|
|
|
|
|
EC_R_I2D_ECPKPARAMETERS_FAILURE |
337
|
|
|
|
|
|
|
EC_R_INCOMPATIBLE_OBJECTS |
338
|
|
|
|
|
|
|
EC_R_INVALID_ARGUMENT |
339
|
|
|
|
|
|
|
EC_R_INVALID_COMPRESSED_POINT |
340
|
|
|
|
|
|
|
EC_R_INVALID_COMPRESSION_BIT |
341
|
|
|
|
|
|
|
EC_R_INVALID_CURVE |
342
|
|
|
|
|
|
|
EC_R_INVALID_DIGEST_TYPE |
343
|
|
|
|
|
|
|
EC_R_INVALID_ENCODING |
344
|
|
|
|
|
|
|
EC_R_INVALID_FIELD |
345
|
|
|
|
|
|
|
EC_R_INVALID_FORM |
346
|
|
|
|
|
|
|
EC_R_INVALID_GROUP_ORDER |
347
|
|
|
|
|
|
|
EC_R_INVALID_PENTANOMIAL_BASIS |
348
|
|
|
|
|
|
|
EC_R_INVALID_PRIVATE_KEY |
349
|
|
|
|
|
|
|
EC_R_INVALID_TRINOMIAL_BASIS |
350
|
|
|
|
|
|
|
EC_R_KEYS_NOT_SET |
351
|
|
|
|
|
|
|
EC_R_MISSING_PARAMETERS |
352
|
|
|
|
|
|
|
EC_R_MISSING_PRIVATE_KEY |
353
|
|
|
|
|
|
|
EC_R_NOT_A_NIST_PRIME |
354
|
|
|
|
|
|
|
EC_R_NOT_A_SUPPORTED_NIST_PRIME |
355
|
|
|
|
|
|
|
EC_R_NOT_IMPLEMENTED |
356
|
|
|
|
|
|
|
EC_R_NOT_INITIALIZED |
357
|
|
|
|
|
|
|
EC_R_NO_FIELD_MOD |
358
|
|
|
|
|
|
|
EC_R_NO_PARAMETERS_SET |
359
|
|
|
|
|
|
|
EC_R_PASSED_NULL_PARAMETER |
360
|
|
|
|
|
|
|
EC_R_PKPARAMETERS2GROUP_FAILURE |
361
|
|
|
|
|
|
|
EC_R_POINT_AT_INFINITY |
362
|
|
|
|
|
|
|
EC_R_POINT_IS_NOT_ON_CURVE |
363
|
|
|
|
|
|
|
EC_R_SLOT_FULL |
364
|
|
|
|
|
|
|
EC_R_UNDEFINED_GENERATOR |
365
|
|
|
|
|
|
|
EC_R_UNDEFINED_ORDER |
366
|
|
|
|
|
|
|
EC_R_UNKNOWN_GROUP |
367
|
|
|
|
|
|
|
EC_R_UNKNOWN_ORDER |
368
|
|
|
|
|
|
|
EC_R_UNSUPPORTED_FIELD |
369
|
|
|
|
|
|
|
EC_R_WRONG_ORDER |
370
|
|
|
|
|
|
|
EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID |
371
|
|
|
|
|
|
|
OPENSSL_ECC_MAX_FIELD_BITS |
372
|
|
|
|
|
|
|
OPENSSL_EC_NAMED_CURVE |
373
|
|
|
|
|
|
|
POINT_CONVERSION_COMPRESSED |
374
|
|
|
|
|
|
|
POINT_CONVERSION_HYBRID |
375
|
|
|
|
|
|
|
POINT_CONVERSION_UNCOMPRESSED |
376
|
|
|
|
|
|
|
); |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
our $VERSION = '1.31'; |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
sub AUTOLOAD { |
381
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
382
|
|
|
|
|
|
|
# XS function. |
383
|
|
|
|
|
|
|
|
384
|
176
|
|
|
176
|
|
19592
|
my $constname; |
385
|
176
|
|
|
|
|
235
|
our $AUTOLOAD; |
386
|
176
|
|
|
|
|
600
|
($constname = $AUTOLOAD) =~ s/.*:://; |
387
|
176
|
50
|
|
|
|
458
|
croak "&Crypt::OpenSSL::EC::constant not defined" if $constname eq 'constant'; |
388
|
176
|
|
|
|
|
567
|
my ($error, $val) = constant($constname); |
389
|
176
|
50
|
|
|
|
348
|
if ($error) { croak $error; } |
|
0
|
|
|
|
|
0
|
|
390
|
|
|
|
|
|
|
{ |
391
|
2
|
|
|
2
|
|
825
|
no strict 'refs'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
369
|
|
|
176
|
|
|
|
|
251
|
|
392
|
|
|
|
|
|
|
# Fixed between 5.005_53 and 5.005_61 |
393
|
|
|
|
|
|
|
#XXX if ($] >= 5.00561) { |
394
|
|
|
|
|
|
|
#XXX *$AUTOLOAD = sub () { $val }; |
395
|
|
|
|
|
|
|
#XXX } |
396
|
|
|
|
|
|
|
#XXX else { |
397
|
176
|
|
|
176
|
|
802
|
*$AUTOLOAD = sub { $val }; |
|
176
|
|
|
|
|
1775
|
|
398
|
|
|
|
|
|
|
#XXX } |
399
|
|
|
|
|
|
|
} |
400
|
176
|
|
|
|
|
518
|
goto &$AUTOLOAD; |
401
|
|
|
|
|
|
|
} |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
require XSLoader; |
404
|
|
|
|
|
|
|
XSLoader::load('Crypt::OpenSSL::EC', $VERSION); |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
# Preloaded methods go here. |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
sub print_errs { |
409
|
1
|
|
|
1
|
1
|
4139
|
my ($msg) = @_; |
410
|
1
|
|
|
|
|
3
|
my ($count, $err, $errs, $e) = (0,0,''); |
411
|
1
|
|
|
|
|
13
|
while ($err = Crypt::OpenSSL::EC::ERR_get_error()) { |
412
|
0
|
|
|
|
|
0
|
$count ++; |
413
|
0
|
|
|
|
|
0
|
$e = "$msg $$: $count - " . Crypt::OpenSSL::EC::ERR_error_string($err) . "\n"; |
414
|
0
|
|
|
|
|
0
|
$errs .= $e; |
415
|
0
|
0
|
|
|
|
0
|
warn $e if $Crypt::OpenSSL::EC::trace; |
416
|
|
|
|
|
|
|
} |
417
|
1
|
|
|
|
|
3
|
return $errs; |
418
|
|
|
|
|
|
|
} |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
# Autoload methods go after =cut, and are processed by the autosplit program. |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
1; |
423
|
|
|
|
|
|
|
__END__ |