Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/bn/bn_lcl.h |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | - | |||||||||||||
5 | unsigned long bn_mul_add_words(unsigned long *rp, const unsigned long *ap, int num, | - | ||||||||||||
6 | unsigned long w); | - | ||||||||||||
7 | unsigned long bn_mul_words(unsigned long *rp, const unsigned long *ap, int num, unsigned long w); | - | ||||||||||||
8 | void bn_sqr_words(unsigned long *rp, const unsigned long *ap, int num); | - | ||||||||||||
9 | unsigned long bn_div_words(unsigned long h, unsigned long l, unsigned long d); | - | ||||||||||||
10 | unsigned long bn_add_words(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, | - | ||||||||||||
11 | int num); | - | ||||||||||||
12 | unsigned long bn_sub_words(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, | - | ||||||||||||
13 | int num); | - | ||||||||||||
14 | - | |||||||||||||
15 | struct bignum_st { | - | ||||||||||||
16 | unsigned long *d; | - | ||||||||||||
17 | - | |||||||||||||
18 | int top; | - | ||||||||||||
19 | - | |||||||||||||
20 | int dmax; | - | ||||||||||||
21 | int neg; | - | ||||||||||||
22 | int flags; | - | ||||||||||||
23 | }; | - | ||||||||||||
24 | - | |||||||||||||
25 | - | |||||||||||||
26 | struct bn_mont_ctx_st { | - | ||||||||||||
27 | int ri; | - | ||||||||||||
28 | BIGNUM RR; | - | ||||||||||||
29 | - | |||||||||||||
30 | BIGNUM N; | - | ||||||||||||
31 | BIGNUM Ni; | - | ||||||||||||
32 | - | |||||||||||||
33 | unsigned long n0[2]; | - | ||||||||||||
34 | - | |||||||||||||
35 | - | |||||||||||||
36 | int flags; | - | ||||||||||||
37 | }; | - | ||||||||||||
38 | - | |||||||||||||
39 | - | |||||||||||||
40 | - | |||||||||||||
41 | - | |||||||||||||
42 | - | |||||||||||||
43 | struct bn_recp_ctx_st { | - | ||||||||||||
44 | BIGNUM N; | - | ||||||||||||
45 | BIGNUM Nr; | - | ||||||||||||
46 | int num_bits; | - | ||||||||||||
47 | int shift; | - | ||||||||||||
48 | int flags; | - | ||||||||||||
49 | }; | - | ||||||||||||
50 | - | |||||||||||||
51 | - | |||||||||||||
52 | struct bn_gencb_st { | - | ||||||||||||
53 | unsigned int ver; | - | ||||||||||||
54 | void *arg; | - | ||||||||||||
55 | union { | - | ||||||||||||
56 | - | |||||||||||||
57 | void (*cb_1) (int, int, void *); | - | ||||||||||||
58 | - | |||||||||||||
59 | int (*cb_2) (int, int, BN_GENCB *); | - | ||||||||||||
60 | } cb; | - | ||||||||||||
61 | }; | - | ||||||||||||
62 | void BN_RECP_CTX_init(BN_RECP_CTX *recp); | - | ||||||||||||
63 | void BN_MONT_CTX_init(BN_MONT_CTX *ctx); | - | ||||||||||||
64 | - | |||||||||||||
65 | void bn_init(BIGNUM *a); | - | ||||||||||||
66 | void bn_mul_normal(unsigned long *r, unsigned long *a, int na, unsigned long *b, int nb); | - | ||||||||||||
67 | void bn_mul_comba8(unsigned long *r, unsigned long *a, unsigned long *b); | - | ||||||||||||
68 | void bn_mul_comba4(unsigned long *r, unsigned long *a, unsigned long *b); | - | ||||||||||||
69 | void bn_sqr_normal(unsigned long *r, const unsigned long *a, int n, unsigned long *tmp); | - | ||||||||||||
70 | void bn_sqr_comba8(unsigned long *r, const unsigned long *a); | - | ||||||||||||
71 | void bn_sqr_comba4(unsigned long *r, const unsigned long *a); | - | ||||||||||||
72 | int bn_cmp_words(const unsigned long *a, const unsigned long *b, int n); | - | ||||||||||||
73 | int bn_cmp_part_words(const unsigned long *a, const unsigned long *b, int cl, int dl); | - | ||||||||||||
74 | void bn_mul_recursive(unsigned long *r, unsigned long *a, unsigned long *b, int n2, | - | ||||||||||||
75 | int dna, int dnb, unsigned long *t); | - | ||||||||||||
76 | void bn_mul_part_recursive(unsigned long *r, unsigned long *a, unsigned long *b, | - | ||||||||||||
77 | int n, int tna, int tnb, unsigned long *t); | - | ||||||||||||
78 | void bn_sqr_recursive(unsigned long *r, const unsigned long *a, int n2, unsigned long *t); | - | ||||||||||||
79 | void bn_mul_low_normal(unsigned long *r, unsigned long *a, unsigned long *b, int n); | - | ||||||||||||
80 | void bn_mul_low_recursive(unsigned long *r, unsigned long *a, unsigned long *b, int n2, | - | ||||||||||||
81 | unsigned long *t); | - | ||||||||||||
82 | unsigned long bn_sub_part_words(unsigned long *r, const unsigned long *a, const unsigned long *b, | - | ||||||||||||
83 | int cl, int dl); | - | ||||||||||||
84 | int bn_mul_mont(unsigned long *rp, const unsigned long *ap, const unsigned long *bp, | - | ||||||||||||
85 | const unsigned long *np, const unsigned long *n0, int num); | - | ||||||||||||
86 | - | |||||||||||||
87 | BIGNUM *int_bn_mod_inverse(BIGNUM *in, | - | ||||||||||||
88 | const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx, | - | ||||||||||||
89 | int *noinv); | - | ||||||||||||
90 | - | |||||||||||||
91 | int bn_probable_prime_dh(BIGNUM *rnd, int bits, | - | ||||||||||||
92 | const BIGNUM *add, const BIGNUM *rem, BN_CTX *ctx); | - | ||||||||||||
93 | - | |||||||||||||
94 | static inline BIGNUM *bn_expand(BIGNUM *a, int bits) | - | ||||||||||||
95 | { | - | ||||||||||||
96 | if (bits > (0x7fffffff - (8 * 8) + 1)
| 0-97690369 | ||||||||||||
97 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 | ||||||||||||
98 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
99 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
100 | - | |||||||||||||
101 | if (((
| 1403831-96286538 | ||||||||||||
102 | return executed 96286538 times by 2 tests: a;return a; Executed by:
executed 96286538 times by 2 tests: return a; Executed by:
| 96286538 | ||||||||||||
103 | - | |||||||||||||
104 | return executed 1403831 times by 2 tests: bn_expand2((a),(bits+(8 * 8)-1)/(8 * 8));return bn_expand2((a),(bits+(8 * 8)-1)/(8 * 8)); Executed by:
executed 1403831 times by 2 tests: return bn_expand2((a),(bits+(8 * 8)-1)/(8 * 8)); Executed by:
| 1403831 | ||||||||||||
105 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |