line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "uECC.h" |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
/* |
5
|
|
|
|
|
|
|
#if uECC_SUPPORTS_secp160r1 |
6
|
|
|
|
|
|
|
uECC_Curve uECC_secp160r1(void); |
7
|
|
|
|
|
|
|
#endif |
8
|
|
|
|
|
|
|
#if uECC_SUPPORTS_secp192r1 |
9
|
|
|
|
|
|
|
uECC_Curve uECC_secp192r1(void); |
10
|
|
|
|
|
|
|
#endif |
11
|
|
|
|
|
|
|
#if uECC_SUPPORTS_secp224r1 |
12
|
|
|
|
|
|
|
uECC_Curve uECC_secp224r1(void); |
13
|
|
|
|
|
|
|
#endif |
14
|
|
|
|
|
|
|
#if uECC_SUPPORTS_secp256r1 |
15
|
|
|
|
|
|
|
uECC_Curve uECC_secp256r1(void); |
16
|
|
|
|
|
|
|
#endif |
17
|
|
|
|
|
|
|
#if uECC_SUPPORTS_secp256k1 |
18
|
|
|
|
|
|
|
uECC_Curve uECC_secp256k1(void); |
19
|
|
|
|
|
|
|
#endif |
20
|
|
|
|
|
|
|
*/ |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
uECC_Curve get_curve(int i) { |
23
|
|
|
|
|
|
|
uECC_Curve curve; |
24
|
0
|
|
|
|
|
|
switch(i) { |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
case 0: |
27
|
0
|
|
|
|
|
|
curve = uECC_secp160r1(); |
28
|
0
|
|
|
|
|
|
break; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
case 1: |
31
|
0
|
|
|
|
|
|
curve = uECC_secp192r1(); |
32
|
0
|
|
|
|
|
|
break; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
case 2: |
35
|
0
|
|
|
|
|
|
curve = uECC_secp224r1(); |
36
|
0
|
|
|
|
|
|
break; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
case 3: |
39
|
0
|
|
|
|
|
|
curve = uECC_secp256r1(); |
40
|
0
|
|
|
|
|
|
break; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
case 4: |
43
|
0
|
|
|
|
|
|
curve = uECC_secp256k1(); |
44
|
0
|
|
|
|
|
|
break; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
default: |
47
|
0
|
|
|
|
|
|
curve = uECC_secp256k1(); |
48
|
0
|
|
|
|
|
|
break; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
return curve; |
52
|
|
|
|
|
|
|
} |