| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ec/ec_lib.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||||||||||||||
| 8 | EC_GROUP * | - | ||||||||||||||||||||||||||||||||||||
| 9 | EC_GROUP_new(const EC_METHOD * meth) | - | ||||||||||||||||||||||||||||||||||||
| 10 | { | - | ||||||||||||||||||||||||||||||||||||
| 11 | EC_GROUP *ret; | - | ||||||||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||||||||
| 13 | if (meth ==
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 14 | ((void *)0)
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 15 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 16 | ERR_put_error(16,(0xfff),(108),__FILE__,81); | - | ||||||||||||||||||||||||||||||||||||
| 17 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 18 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 19 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 20 | } | - | ||||||||||||||||||||||||||||||||||||
| 21 | if (meth->group_init == 0
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 22 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,85); | - | ||||||||||||||||||||||||||||||||||||
| 23 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 24 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 25 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 26 | } | - | ||||||||||||||||||||||||||||||||||||
| 27 | ret = malloc(sizeof *ret); | - | ||||||||||||||||||||||||||||||||||||
| 28 | if (ret ==
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 29 | ((void *)0)
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 30 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 31 | ERR_put_error(16,(0xfff),((1|64)),__FILE__,90); | - | ||||||||||||||||||||||||||||||||||||
| 32 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 33 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 34 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 35 | } | - | ||||||||||||||||||||||||||||||||||||
| 36 | ret->meth = meth; | - | ||||||||||||||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||||||||||||||
| 38 | ret->extra_data = | - | ||||||||||||||||||||||||||||||||||||
| 39 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 40 | ; | - | ||||||||||||||||||||||||||||||||||||
| 41 | - | |||||||||||||||||||||||||||||||||||||
| 42 | ret->generator = | - | ||||||||||||||||||||||||||||||||||||
| 43 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 44 | ; | - | ||||||||||||||||||||||||||||||||||||
| 45 | BN_init(&ret->order); | - | ||||||||||||||||||||||||||||||||||||
| 46 | BN_init(&ret->cofactor); | - | ||||||||||||||||||||||||||||||||||||
| 47 | - | |||||||||||||||||||||||||||||||||||||
| 48 | ret->curve_name = 0; | - | ||||||||||||||||||||||||||||||||||||
| 49 | ret->asn1_flag = 0; | - | ||||||||||||||||||||||||||||||||||||
| 50 | ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED; | - | ||||||||||||||||||||||||||||||||||||
| 51 | - | |||||||||||||||||||||||||||||||||||||
| 52 | ret->seed = | - | ||||||||||||||||||||||||||||||||||||
| 53 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 54 | ; | - | ||||||||||||||||||||||||||||||||||||
| 55 | ret->seed_len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 56 | - | |||||||||||||||||||||||||||||||||||||
| 57 | if (!meth->group_init(ret)
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 58 | free(ret); | - | ||||||||||||||||||||||||||||||||||||
| 59 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 60 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 61 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 62 | } | - | ||||||||||||||||||||||||||||||||||||
| 63 | return executed 617 times by 4 tests: ret;return ret;Executed by:
executed 617 times by 4 tests: return ret;Executed by:
| 617 | ||||||||||||||||||||||||||||||||||||
| 64 | } | - | ||||||||||||||||||||||||||||||||||||
| 65 | - | |||||||||||||||||||||||||||||||||||||
| 66 | - | |||||||||||||||||||||||||||||||||||||
| 67 | void | - | ||||||||||||||||||||||||||||||||||||
| 68 | EC_GROUP_free(EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 69 | { | - | ||||||||||||||||||||||||||||||||||||
| 70 | if (!group
| 212-617 | ||||||||||||||||||||||||||||||||||||
| 71 | return; executed 212 times by 3 tests: return;Executed by:
| 212 | ||||||||||||||||||||||||||||||||||||
| 72 | - | |||||||||||||||||||||||||||||||||||||
| 73 | if (group->meth->group_finish != 0
| 0-617 | ||||||||||||||||||||||||||||||||||||
| 74 | group->meth->group_finish(group); executed 617 times by 4 tests: group->meth->group_finish(group);Executed by:
| 617 | ||||||||||||||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||||||||||||||
| 76 | EC_EX_DATA_free_all_data(&group->extra_data); | - | ||||||||||||||||||||||||||||||||||||
| 77 | - | |||||||||||||||||||||||||||||||||||||
| 78 | EC_POINT_free(group->generator); | - | ||||||||||||||||||||||||||||||||||||
| 79 | BN_free(&group->order); | - | ||||||||||||||||||||||||||||||||||||
| 80 | BN_free(&group->cofactor); | - | ||||||||||||||||||||||||||||||||||||
| 81 | - | |||||||||||||||||||||||||||||||||||||
| 82 | free(group->seed); | - | ||||||||||||||||||||||||||||||||||||
| 83 | - | |||||||||||||||||||||||||||||||||||||
| 84 | free(group); | - | ||||||||||||||||||||||||||||||||||||
| 85 | } executed 617 times by 4 tests: end of blockExecuted by:
| 617 | ||||||||||||||||||||||||||||||||||||
| 86 | - | |||||||||||||||||||||||||||||||||||||
| 87 | - | |||||||||||||||||||||||||||||||||||||
| 88 | void | - | ||||||||||||||||||||||||||||||||||||
| 89 | EC_GROUP_clear_free(EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 90 | { | - | ||||||||||||||||||||||||||||||||||||
| 91 | if (!group
| 0-1 | ||||||||||||||||||||||||||||||||||||
| 92 | return; executed 1 time by 1 test: return;Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 93 | - | |||||||||||||||||||||||||||||||||||||
| 94 | if (group->meth->group_clear_finish != 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 95 | group->meth->group_clear_finish(group); never executed: group->meth->group_clear_finish(group); | 0 | ||||||||||||||||||||||||||||||||||||
| 96 | else if (group->meth->group_finish != 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 97 | group->meth->group_finish(group); never executed: group->meth->group_finish(group); | 0 | ||||||||||||||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||||||||||||||
| 99 | EC_EX_DATA_clear_free_all_data(&group->extra_data); | - | ||||||||||||||||||||||||||||||||||||
| 100 | - | |||||||||||||||||||||||||||||||||||||
| 101 | EC_POINT_clear_free(group->generator); | - | ||||||||||||||||||||||||||||||||||||
| 102 | BN_clear_free(&group->order); | - | ||||||||||||||||||||||||||||||||||||
| 103 | BN_clear_free(&group->cofactor); | - | ||||||||||||||||||||||||||||||||||||
| 104 | - | |||||||||||||||||||||||||||||||||||||
| 105 | freezero(group->seed, group->seed_len); | - | ||||||||||||||||||||||||||||||||||||
| 106 | freezero(group, sizeof *group); | - | ||||||||||||||||||||||||||||||||||||
| 107 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 108 | - | |||||||||||||||||||||||||||||||||||||
| 109 | - | |||||||||||||||||||||||||||||||||||||
| 110 | int | - | ||||||||||||||||||||||||||||||||||||
| 111 | EC_GROUP_copy(EC_GROUP * dest, const EC_GROUP * src) | - | ||||||||||||||||||||||||||||||||||||
| 112 | { | - | ||||||||||||||||||||||||||||||||||||
| 113 | EC_EXTRA_DATA *d; | - | ||||||||||||||||||||||||||||||||||||
| 114 | - | |||||||||||||||||||||||||||||||||||||
| 115 | if (dest->meth->group_copy == 0
| 0-229 | ||||||||||||||||||||||||||||||||||||
| 116 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,165); | - | ||||||||||||||||||||||||||||||||||||
| 117 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 118 | } | - | ||||||||||||||||||||||||||||||||||||
| 119 | if (dest->meth != src->meth
| 0-229 | ||||||||||||||||||||||||||||||||||||
| 120 | ERR_put_error(16,(0xfff),(101),__FILE__,169); | - | ||||||||||||||||||||||||||||||||||||
| 121 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 122 | } | - | ||||||||||||||||||||||||||||||||||||
| 123 | if (dest == src
| 0-229 | ||||||||||||||||||||||||||||||||||||
| 124 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 125 | - | |||||||||||||||||||||||||||||||||||||
| 126 | EC_EX_DATA_free_all_data(&dest->extra_data); | - | ||||||||||||||||||||||||||||||||||||
| 127 | - | |||||||||||||||||||||||||||||||||||||
| 128 | for (d = src->extra_data; d !=
| 10-229 | ||||||||||||||||||||||||||||||||||||
| 129 | ((void *)0)
| 10-229 | ||||||||||||||||||||||||||||||||||||
| 130 | ; d = d->next) { | - | ||||||||||||||||||||||||||||||||||||
| 131 | void *t = d->dup_func(d->data); | - | ||||||||||||||||||||||||||||||||||||
| 132 | - | |||||||||||||||||||||||||||||||||||||
| 133 | if (t ==
| 0-10 | ||||||||||||||||||||||||||||||||||||
| 134 | ((void *)0)
| 0-10 | ||||||||||||||||||||||||||||||||||||
| 135 | ) | - | ||||||||||||||||||||||||||||||||||||
| 136 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 137 | if (!EC_EX_DATA_set_data(&dest->extra_data, t, d->dup_func,
| 0-10 | ||||||||||||||||||||||||||||||||||||
| 138 | d->free_func, d->clear_free_func)
| 0-10 | ||||||||||||||||||||||||||||||||||||
| 139 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 140 | } executed 10 times by 1 test: end of blockExecuted by:
| 10 | ||||||||||||||||||||||||||||||||||||
| 141 | - | |||||||||||||||||||||||||||||||||||||
| 142 | if (src->generator !=
| 2-227 | ||||||||||||||||||||||||||||||||||||
| 143 | ((void *)0)
| 2-227 | ||||||||||||||||||||||||||||||||||||
| 144 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 145 | if (dest->generator ==
| 0-227 | ||||||||||||||||||||||||||||||||||||
| 146 | ((void *)0)
| 0-227 | ||||||||||||||||||||||||||||||||||||
| 147 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 148 | dest->generator = EC_POINT_new(dest); | - | ||||||||||||||||||||||||||||||||||||
| 149 | if (dest->generator ==
| 0-227 | ||||||||||||||||||||||||||||||||||||
| 150 | ((void *)0)
| 0-227 | ||||||||||||||||||||||||||||||||||||
| 151 | ) | - | ||||||||||||||||||||||||||||||||||||
| 152 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 153 | } executed 227 times by 3 tests: end of blockExecuted by:
| 227 | ||||||||||||||||||||||||||||||||||||
| 154 | if (!EC_POINT_copy(dest->generator, src->generator)
| 0-227 | ||||||||||||||||||||||||||||||||||||
| 155 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 156 | } executed 227 times by 3 tests: else {end of blockExecuted by:
| 227 | ||||||||||||||||||||||||||||||||||||
| 157 | - | |||||||||||||||||||||||||||||||||||||
| 158 | EC_POINT_clear_free(dest->generator); | - | ||||||||||||||||||||||||||||||||||||
| 159 | dest->generator = | - | ||||||||||||||||||||||||||||||||||||
| 160 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 161 | ; | - | ||||||||||||||||||||||||||||||||||||
| 162 | } executed 2 times by 1 test: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||||||||||||||
| 163 | - | |||||||||||||||||||||||||||||||||||||
| 164 | if (!BN_copy(&dest->order, &src->order)
| 0-229 | ||||||||||||||||||||||||||||||||||||
| 165 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 166 | if (!BN_copy(&dest->cofactor, &src->cofactor)
| 0-229 | ||||||||||||||||||||||||||||||||||||
| 167 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||||||||||||||
| 169 | dest->curve_name = src->curve_name; | - | ||||||||||||||||||||||||||||||||||||
| 170 | dest->asn1_flag = src->asn1_flag; | - | ||||||||||||||||||||||||||||||||||||
| 171 | dest->asn1_form = src->asn1_form; | - | ||||||||||||||||||||||||||||||||||||
| 172 | - | |||||||||||||||||||||||||||||||||||||
| 173 | if (src->seed
| 111-118 | ||||||||||||||||||||||||||||||||||||
| 174 | free(dest->seed); | - | ||||||||||||||||||||||||||||||||||||
| 175 | dest->seed = malloc(src->seed_len); | - | ||||||||||||||||||||||||||||||||||||
| 176 | if (dest->seed ==
| 0-118 | ||||||||||||||||||||||||||||||||||||
| 177 | ((void *)0)
| 0-118 | ||||||||||||||||||||||||||||||||||||
| 178 | ) | - | ||||||||||||||||||||||||||||||||||||
| 179 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 180 | memcpy(dest->seed, src->seed, src->seed_len); | - | ||||||||||||||||||||||||||||||||||||
| 181 | dest->seed_len = src->seed_len; | - | ||||||||||||||||||||||||||||||||||||
| 182 | } executed 118 times by 2 tests: else {end of blockExecuted by:
| 118 | ||||||||||||||||||||||||||||||||||||
| 183 | free(dest->seed); | - | ||||||||||||||||||||||||||||||||||||
| 184 | dest->seed = | - | ||||||||||||||||||||||||||||||||||||
| 185 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 186 | ; | - | ||||||||||||||||||||||||||||||||||||
| 187 | dest->seed_len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 188 | } executed 111 times by 2 tests: end of blockExecuted by:
| 111 | ||||||||||||||||||||||||||||||||||||
| 189 | - | |||||||||||||||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||||||||||||||
| 191 | return executed 229 times by 3 tests: dest->meth->group_copy(dest, src);return dest->meth->group_copy(dest, src);Executed by:
executed 229 times by 3 tests: return dest->meth->group_copy(dest, src);Executed by:
| 229 | ||||||||||||||||||||||||||||||||||||
| 192 | } | - | ||||||||||||||||||||||||||||||||||||
| 193 | - | |||||||||||||||||||||||||||||||||||||
| 194 | - | |||||||||||||||||||||||||||||||||||||
| 195 | EC_GROUP * | - | ||||||||||||||||||||||||||||||||||||
| 196 | EC_GROUP_dup(const EC_GROUP * a) | - | ||||||||||||||||||||||||||||||||||||
| 197 | { | - | ||||||||||||||||||||||||||||||||||||
| 198 | EC_GROUP *t = | - | ||||||||||||||||||||||||||||||||||||
| 199 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 200 | ; | - | ||||||||||||||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||||||||||||||
| 202 | if ((
| 0-211 | ||||||||||||||||||||||||||||||||||||
| 203 | ((void *)0)
| 0-211 | ||||||||||||||||||||||||||||||||||||
| 204 | )
| 0-211 | ||||||||||||||||||||||||||||||||||||
| 205 | ((void *)0)
| 0-211 | ||||||||||||||||||||||||||||||||||||
| 206 | )
| 0-211 | ||||||||||||||||||||||||||||||||||||
| 207 | (
| 0-211 | ||||||||||||||||||||||||||||||||||||
| 208 | EC_GROUP_free(t); | - | ||||||||||||||||||||||||||||||||||||
| 209 | t = | - | ||||||||||||||||||||||||||||||||||||
| 210 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 211 | ; | - | ||||||||||||||||||||||||||||||||||||
| 212 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 213 | return executed 211 times by 2 tests: t;return t;Executed by:
executed 211 times by 2 tests: return t;Executed by:
| 211 | ||||||||||||||||||||||||||||||||||||
| 214 | } | - | ||||||||||||||||||||||||||||||||||||
| 215 | - | |||||||||||||||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||||||||||||||
| 217 | const EC_METHOD * | - | ||||||||||||||||||||||||||||||||||||
| 218 | EC_GROUP_method_of(const EC_GROUP *group) | - | ||||||||||||||||||||||||||||||||||||
| 219 | { | - | ||||||||||||||||||||||||||||||||||||
| 220 | return executed 585 times by 4 tests: group->meth;return group->meth;Executed by:
executed 585 times by 4 tests: return group->meth;Executed by:
| 585 | ||||||||||||||||||||||||||||||||||||
| 221 | } | - | ||||||||||||||||||||||||||||||||||||
| 222 | - | |||||||||||||||||||||||||||||||||||||
| 223 | - | |||||||||||||||||||||||||||||||||||||
| 224 | int | - | ||||||||||||||||||||||||||||||||||||
| 225 | EC_METHOD_get_field_type(const EC_METHOD *meth) | - | ||||||||||||||||||||||||||||||||||||
| 226 | { | - | ||||||||||||||||||||||||||||||||||||
| 227 | return executed 567 times by 3 tests: meth->field_type;return meth->field_type;Executed by:
executed 567 times by 3 tests: return meth->field_type;Executed by:
| 567 | ||||||||||||||||||||||||||||||||||||
| 228 | } | - | ||||||||||||||||||||||||||||||||||||
| 229 | - | |||||||||||||||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||||||||||||||
| 231 | int | - | ||||||||||||||||||||||||||||||||||||
| 232 | EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, | - | ||||||||||||||||||||||||||||||||||||
| 233 | const BIGNUM *order, const BIGNUM *cofactor) | - | ||||||||||||||||||||||||||||||||||||
| 234 | { | - | ||||||||||||||||||||||||||||||||||||
| 235 | if (generator ==
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 236 | ((void *)0)
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 237 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 238 | ERR_put_error(16,(0xfff),((3|64)),__FILE__,261); | - | ||||||||||||||||||||||||||||||||||||
| 239 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 240 | } | - | ||||||||||||||||||||||||||||||||||||
| 241 | if (group->generator ==
| 14-388 | ||||||||||||||||||||||||||||||||||||
| 242 | ((void *)0)
| 14-388 | ||||||||||||||||||||||||||||||||||||
| 243 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 244 | group->generator = EC_POINT_new(group); | - | ||||||||||||||||||||||||||||||||||||
| 245 | if (group->generator ==
| 0-388 | ||||||||||||||||||||||||||||||||||||
| 246 | ((void *)0)
| 0-388 | ||||||||||||||||||||||||||||||||||||
| 247 | ) | - | ||||||||||||||||||||||||||||||||||||
| 248 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 249 | } executed 388 times by 4 tests: end of blockExecuted by:
| 388 | ||||||||||||||||||||||||||||||||||||
| 250 | if (!EC_POINT_copy(group->generator, generator)
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 251 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 252 | - | |||||||||||||||||||||||||||||||||||||
| 253 | if (order !=
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 254 | ((void *)0)
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 255 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 256 | if (!BN_copy(&group->order, order)
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 257 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 258 | } executed 402 times by 4 tests: elseend of blockExecuted by:
| 402 | ||||||||||||||||||||||||||||||||||||
| 259 | ( never executed: BN_set_word((&group->order),0));(BN_set_word((&group->order),0));never executed: (BN_set_word((&group->order),0)); | 0 | ||||||||||||||||||||||||||||||||||||
| 260 | - | |||||||||||||||||||||||||||||||||||||
| 261 | if (cofactor !=
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 262 | ((void *)0)
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 263 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 264 | if (!BN_copy(&group->cofactor, cofactor)
| 0-402 | ||||||||||||||||||||||||||||||||||||
| 265 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 266 | } executed 402 times by 4 tests: elseend of blockExecuted by:
| 402 | ||||||||||||||||||||||||||||||||||||
| 267 | ( never executed: BN_set_word((&group->cofactor),0));(BN_set_word((&group->cofactor),0));never executed: (BN_set_word((&group->cofactor),0)); | 0 | ||||||||||||||||||||||||||||||||||||
| 268 | - | |||||||||||||||||||||||||||||||||||||
| 269 | return executed 402 times by 4 tests: 1;return 1;Executed by:
executed 402 times by 4 tests: return 1;Executed by:
| 402 | ||||||||||||||||||||||||||||||||||||
| 270 | } | - | ||||||||||||||||||||||||||||||||||||
| 271 | - | |||||||||||||||||||||||||||||||||||||
| 272 | - | |||||||||||||||||||||||||||||||||||||
| 273 | const EC_POINT * | - | ||||||||||||||||||||||||||||||||||||
| 274 | EC_GROUP_get0_generator(const EC_GROUP *group) | - | ||||||||||||||||||||||||||||||||||||
| 275 | { | - | ||||||||||||||||||||||||||||||||||||
| 276 | return executed 389 times by 2 tests: group->generator;return group->generator;Executed by:
executed 389 times by 2 tests: return group->generator;Executed by:
| 389 | ||||||||||||||||||||||||||||||||||||
| 277 | } | - | ||||||||||||||||||||||||||||||||||||
| 278 | - | |||||||||||||||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||||||||||||||
| 280 | int | - | ||||||||||||||||||||||||||||||||||||
| 281 | EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 282 | { | - | ||||||||||||||||||||||||||||||||||||
| 283 | if (!BN_copy(order, &group->order)
| 0-952 | ||||||||||||||||||||||||||||||||||||
| 284 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 285 | - | |||||||||||||||||||||||||||||||||||||
| 286 | return executed 952 times by 4 tests: !((order)->top == 0);return !((order)->top == 0);Executed by:
executed 952 times by 4 tests: return !((order)->top == 0);Executed by:
| 952 | ||||||||||||||||||||||||||||||||||||
| 287 | } | - | ||||||||||||||||||||||||||||||||||||
| 288 | - | |||||||||||||||||||||||||||||||||||||
| 289 | - | |||||||||||||||||||||||||||||||||||||
| 290 | int | - | ||||||||||||||||||||||||||||||||||||
| 291 | EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 292 | { | - | ||||||||||||||||||||||||||||||||||||
| 293 | if (!BN_copy(cofactor, &group->cofactor)
| 0 | ||||||||||||||||||||||||||||||||||||
| 294 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 295 | - | |||||||||||||||||||||||||||||||||||||
| 296 | return never executed: !((&group->cofactor)->top == 0);return !((&group->cofactor)->top == 0);never executed: return !((&group->cofactor)->top == 0); | 0 | ||||||||||||||||||||||||||||||||||||
| 297 | } | - | ||||||||||||||||||||||||||||||||||||
| 298 | - | |||||||||||||||||||||||||||||||||||||
| 299 | - | |||||||||||||||||||||||||||||||||||||
| 300 | void | - | ||||||||||||||||||||||||||||||||||||
| 301 | EC_GROUP_set_curve_name(EC_GROUP * group, int nid) | - | ||||||||||||||||||||||||||||||||||||
| 302 | { | - | ||||||||||||||||||||||||||||||||||||
| 303 | group->curve_name = nid; | - | ||||||||||||||||||||||||||||||||||||
| 304 | } executed 386 times by 4 tests: end of blockExecuted by:
| 386 | ||||||||||||||||||||||||||||||||||||
| 305 | - | |||||||||||||||||||||||||||||||||||||
| 306 | - | |||||||||||||||||||||||||||||||||||||
| 307 | int | - | ||||||||||||||||||||||||||||||||||||
| 308 | EC_GROUP_get_curve_name(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 309 | { | - | ||||||||||||||||||||||||||||||||||||
| 310 | return executed 49 times by 1 test: group->curve_name;return group->curve_name;Executed by:
executed 49 times by 1 test: return group->curve_name;Executed by:
| 49 | ||||||||||||||||||||||||||||||||||||
| 311 | } | - | ||||||||||||||||||||||||||||||||||||
| 312 | - | |||||||||||||||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||||||||||||||
| 314 | void | - | ||||||||||||||||||||||||||||||||||||
| 315 | EC_GROUP_set_asn1_flag(EC_GROUP * group, int flag) | - | ||||||||||||||||||||||||||||||||||||
| 316 | { | - | ||||||||||||||||||||||||||||||||||||
| 317 | group->asn1_flag = flag; | - | ||||||||||||||||||||||||||||||||||||
| 318 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 319 | - | |||||||||||||||||||||||||||||||||||||
| 320 | - | |||||||||||||||||||||||||||||||||||||
| 321 | int | - | ||||||||||||||||||||||||||||||||||||
| 322 | EC_GROUP_get_asn1_flag(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 323 | { | - | ||||||||||||||||||||||||||||||||||||
| 324 | return never executed: group->asn1_flag;return group->asn1_flag;never executed: return group->asn1_flag; | 0 | ||||||||||||||||||||||||||||||||||||
| 325 | } | - | ||||||||||||||||||||||||||||||||||||
| 326 | - | |||||||||||||||||||||||||||||||||||||
| 327 | - | |||||||||||||||||||||||||||||||||||||
| 328 | void | - | ||||||||||||||||||||||||||||||||||||
| 329 | EC_GROUP_set_point_conversion_form(EC_GROUP * group, | - | ||||||||||||||||||||||||||||||||||||
| 330 | point_conversion_form_t form) | - | ||||||||||||||||||||||||||||||||||||
| 331 | { | - | ||||||||||||||||||||||||||||||||||||
| 332 | group->asn1_form = form; | - | ||||||||||||||||||||||||||||||||||||
| 333 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 334 | - | |||||||||||||||||||||||||||||||||||||
| 335 | - | |||||||||||||||||||||||||||||||||||||
| 336 | point_conversion_form_t | - | ||||||||||||||||||||||||||||||||||||
| 337 | EC_GROUP_get_point_conversion_form(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 338 | { | - | ||||||||||||||||||||||||||||||||||||
| 339 | return never executed: group->asn1_form;return group->asn1_form;never executed: return group->asn1_form; | 0 | ||||||||||||||||||||||||||||||||||||
| 340 | } | - | ||||||||||||||||||||||||||||||||||||
| 341 | - | |||||||||||||||||||||||||||||||||||||
| 342 | - | |||||||||||||||||||||||||||||||||||||
| 343 | size_t | - | ||||||||||||||||||||||||||||||||||||
| 344 | EC_GROUP_set_seed(EC_GROUP * group, const unsigned char *p, size_t len) | - | ||||||||||||||||||||||||||||||||||||
| 345 | { | - | ||||||||||||||||||||||||||||||||||||
| 346 | if (group->seed
| 0-226 | ||||||||||||||||||||||||||||||||||||
| 347 | free(group->seed); | - | ||||||||||||||||||||||||||||||||||||
| 348 | group->seed = | - | ||||||||||||||||||||||||||||||||||||
| 349 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 350 | ; | - | ||||||||||||||||||||||||||||||||||||
| 351 | group->seed_len = 0; | - | ||||||||||||||||||||||||||||||||||||
| 352 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 353 | if (!len
| 0-226 | ||||||||||||||||||||||||||||||||||||
| 354 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 355 | - | |||||||||||||||||||||||||||||||||||||
| 356 | if ((
| 0-226 | ||||||||||||||||||||||||||||||||||||
| 357 | ((void *)0)
| 0-226 | ||||||||||||||||||||||||||||||||||||
| 358 | ) | - | ||||||||||||||||||||||||||||||||||||
| 359 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 360 | memcpy(group->seed, p, len); | - | ||||||||||||||||||||||||||||||||||||
| 361 | group->seed_len = len; | - | ||||||||||||||||||||||||||||||||||||
| 362 | - | |||||||||||||||||||||||||||||||||||||
| 363 | return executed 226 times by 4 tests: len;return len;Executed by:
executed 226 times by 4 tests: return len;Executed by:
| 226 | ||||||||||||||||||||||||||||||||||||
| 364 | } | - | ||||||||||||||||||||||||||||||||||||
| 365 | - | |||||||||||||||||||||||||||||||||||||
| 366 | - | |||||||||||||||||||||||||||||||||||||
| 367 | unsigned char * | - | ||||||||||||||||||||||||||||||||||||
| 368 | EC_GROUP_get0_seed(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 369 | { | - | ||||||||||||||||||||||||||||||||||||
| 370 | return never executed: group->seed;return group->seed;never executed: return group->seed; | 0 | ||||||||||||||||||||||||||||||||||||
| 371 | } | - | ||||||||||||||||||||||||||||||||||||
| 372 | - | |||||||||||||||||||||||||||||||||||||
| 373 | - | |||||||||||||||||||||||||||||||||||||
| 374 | size_t | - | ||||||||||||||||||||||||||||||||||||
| 375 | EC_GROUP_get_seed_len(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 376 | { | - | ||||||||||||||||||||||||||||||||||||
| 377 | return never executed: group->seed_len;return group->seed_len;never executed: return group->seed_len; | 0 | ||||||||||||||||||||||||||||||||||||
| 378 | } | - | ||||||||||||||||||||||||||||||||||||
| 379 | - | |||||||||||||||||||||||||||||||||||||
| 380 | - | |||||||||||||||||||||||||||||||||||||
| 381 | int | - | ||||||||||||||||||||||||||||||||||||
| 382 | EC_GROUP_set_curve_GFp(EC_GROUP * group, const BIGNUM * p, const BIGNUM * a, | - | ||||||||||||||||||||||||||||||||||||
| 383 | const BIGNUM * b, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 384 | { | - | ||||||||||||||||||||||||||||||||||||
| 385 | if (group->meth->group_set_curve == 0
| 0-256 | ||||||||||||||||||||||||||||||||||||
| 386 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,397); | - | ||||||||||||||||||||||||||||||||||||
| 387 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 388 | } | - | ||||||||||||||||||||||||||||||||||||
| 389 | return executed 256 times by 4 tests: group->meth->group_set_curve(group, p, a, b, ctx);return group->meth->group_set_curve(group, p, a, b, ctx);Executed by:
executed 256 times by 4 tests: return group->meth->group_set_curve(group, p, a, b, ctx);Executed by:
| 256 | ||||||||||||||||||||||||||||||||||||
| 390 | } | - | ||||||||||||||||||||||||||||||||||||
| 391 | - | |||||||||||||||||||||||||||||||||||||
| 392 | - | |||||||||||||||||||||||||||||||||||||
| 393 | int | - | ||||||||||||||||||||||||||||||||||||
| 394 | EC_GROUP_get_curve_GFp(const EC_GROUP * group, BIGNUM * p, BIGNUM * a, | - | ||||||||||||||||||||||||||||||||||||
| 395 | BIGNUM * b, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 396 | { | - | ||||||||||||||||||||||||||||||||||||
| 397 | if (group->meth->group_get_curve == 0
| 0-1 | ||||||||||||||||||||||||||||||||||||
| 398 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,409); | - | ||||||||||||||||||||||||||||||||||||
| 399 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 400 | } | - | ||||||||||||||||||||||||||||||||||||
| 401 | return executed 1 time by 1 test: group->meth->group_get_curve(group, p, a, b, ctx);return group->meth->group_get_curve(group, p, a, b, ctx);Executed by:
executed 1 time by 1 test: return group->meth->group_get_curve(group, p, a, b, ctx);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 402 | } | - | ||||||||||||||||||||||||||||||||||||
| 403 | - | |||||||||||||||||||||||||||||||||||||
| 404 | - | |||||||||||||||||||||||||||||||||||||
| 405 | int | - | ||||||||||||||||||||||||||||||||||||
| 406 | EC_GROUP_set_curve_GF2m(EC_GROUP * group, const BIGNUM * p, const BIGNUM * a, | - | ||||||||||||||||||||||||||||||||||||
| 407 | const BIGNUM * b, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 408 | { | - | ||||||||||||||||||||||||||||||||||||
| 409 | if (group->meth->group_set_curve == 0
| 0-148 | ||||||||||||||||||||||||||||||||||||
| 410 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,421); | - | ||||||||||||||||||||||||||||||||||||
| 411 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 412 | } | - | ||||||||||||||||||||||||||||||||||||
| 413 | return executed 148 times by 3 tests: group->meth->group_set_curve(group, p, a, b, ctx);return group->meth->group_set_curve(group, p, a, b, ctx);Executed by:
executed 148 times by 3 tests: return group->meth->group_set_curve(group, p, a, b, ctx);Executed by:
| 148 | ||||||||||||||||||||||||||||||||||||
| 414 | } | - | ||||||||||||||||||||||||||||||||||||
| 415 | - | |||||||||||||||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||||||||||||||
| 417 | int | - | ||||||||||||||||||||||||||||||||||||
| 418 | EC_GROUP_get_curve_GF2m(const EC_GROUP * group, BIGNUM * p, BIGNUM * a, | - | ||||||||||||||||||||||||||||||||||||
| 419 | BIGNUM * b, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 420 | { | - | ||||||||||||||||||||||||||||||||||||
| 421 | if (group->meth->group_get_curve == 0
| 0-1 | ||||||||||||||||||||||||||||||||||||
| 422 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,433); | - | ||||||||||||||||||||||||||||||||||||
| 423 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 424 | } | - | ||||||||||||||||||||||||||||||||||||
| 425 | return executed 1 time by 1 test: group->meth->group_get_curve(group, p, a, b, ctx);return group->meth->group_get_curve(group, p, a, b, ctx);Executed by:
executed 1 time by 1 test: return group->meth->group_get_curve(group, p, a, b, ctx);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 426 | } | - | ||||||||||||||||||||||||||||||||||||
| 427 | - | |||||||||||||||||||||||||||||||||||||
| 428 | - | |||||||||||||||||||||||||||||||||||||
| 429 | int | - | ||||||||||||||||||||||||||||||||||||
| 430 | EC_GROUP_get_degree(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 431 | { | - | ||||||||||||||||||||||||||||||||||||
| 432 | if (group->meth->group_get_degree == 0
| 0-238 | ||||||||||||||||||||||||||||||||||||
| 433 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,444); | - | ||||||||||||||||||||||||||||||||||||
| 434 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 435 | } | - | ||||||||||||||||||||||||||||||||||||
| 436 | return executed 238 times by 4 tests: group->meth->group_get_degree(group);return group->meth->group_get_degree(group);Executed by:
executed 238 times by 4 tests: return group->meth->group_get_degree(group);Executed by:
| 238 | ||||||||||||||||||||||||||||||||||||
| 437 | } | - | ||||||||||||||||||||||||||||||||||||
| 438 | - | |||||||||||||||||||||||||||||||||||||
| 439 | - | |||||||||||||||||||||||||||||||||||||
| 440 | int | - | ||||||||||||||||||||||||||||||||||||
| 441 | EC_GROUP_check_discriminant(const EC_GROUP * group, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 442 | { | - | ||||||||||||||||||||||||||||||||||||
| 443 | if (group->meth->group_check_discriminant == 0
| 0-90 | ||||||||||||||||||||||||||||||||||||
| 444 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,455); | - | ||||||||||||||||||||||||||||||||||||
| 445 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 446 | } | - | ||||||||||||||||||||||||||||||||||||
| 447 | return executed 90 times by 1 test: group->meth->group_check_discriminant(group, ctx);return group->meth->group_check_discriminant(group, ctx);Executed by:
executed 90 times by 1 test: return group->meth->group_check_discriminant(group, ctx);Executed by:
| 90 | ||||||||||||||||||||||||||||||||||||
| 448 | } | - | ||||||||||||||||||||||||||||||||||||
| 449 | - | |||||||||||||||||||||||||||||||||||||
| 450 | - | |||||||||||||||||||||||||||||||||||||
| 451 | int | - | ||||||||||||||||||||||||||||||||||||
| 452 | EC_GROUP_cmp(const EC_GROUP * a, const EC_GROUP * b, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 453 | { | - | ||||||||||||||||||||||||||||||||||||
| 454 | int r = 0; | - | ||||||||||||||||||||||||||||||||||||
| 455 | BIGNUM *a1, *a2, *a3, *b1, *b2, *b3; | - | ||||||||||||||||||||||||||||||||||||
| 456 | BN_CTX *ctx_new = | - | ||||||||||||||||||||||||||||||||||||
| 457 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 458 | ; | - | ||||||||||||||||||||||||||||||||||||
| 459 | - | |||||||||||||||||||||||||||||||||||||
| 460 | - | |||||||||||||||||||||||||||||||||||||
| 461 | if (EC_METHOD_get_field_type(EC_GROUP_method_of(a)) !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 462 | EC_METHOD_get_field_type(EC_GROUP_method_of(b))
| 0 | ||||||||||||||||||||||||||||||||||||
| 463 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 464 | - | |||||||||||||||||||||||||||||||||||||
| 465 | if (EC_GROUP_get_curve_name(a)
| 0 | ||||||||||||||||||||||||||||||||||||
| 466 | EC_GROUP_get_curve_name(a) != EC_GROUP_get_curve_name(b)
| 0 | ||||||||||||||||||||||||||||||||||||
| 467 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 468 | - | |||||||||||||||||||||||||||||||||||||
| 469 | if (!ctx
| 0 | ||||||||||||||||||||||||||||||||||||
| 470 | ctx_new = ctx = BN_CTX_new(); never executed: ctx_new = ctx = BN_CTX_new(); | 0 | ||||||||||||||||||||||||||||||||||||
| 471 | if (!ctx
| 0 | ||||||||||||||||||||||||||||||||||||
| 472 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
| 473 | - | |||||||||||||||||||||||||||||||||||||
| 474 | BN_CTX_start(ctx); | - | ||||||||||||||||||||||||||||||||||||
| 475 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 476 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 477 | ) | - | ||||||||||||||||||||||||||||||||||||
| 478 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 479 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 480 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 481 | ) | - | ||||||||||||||||||||||||||||||||||||
| 482 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 483 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 484 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 485 | ) | - | ||||||||||||||||||||||||||||||||||||
| 486 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 487 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 488 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 489 | ) | - | ||||||||||||||||||||||||||||||||||||
| 490 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 491 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 492 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 493 | ) | - | ||||||||||||||||||||||||||||||||||||
| 494 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 495 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 496 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 497 | ) | - | ||||||||||||||||||||||||||||||||||||
| 498 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 499 | - | |||||||||||||||||||||||||||||||||||||
| 500 | - | |||||||||||||||||||||||||||||||||||||
| 501 | - | |||||||||||||||||||||||||||||||||||||
| 502 | - | |||||||||||||||||||||||||||||||||||||
| 503 | - | |||||||||||||||||||||||||||||||||||||
| 504 | if (!a->meth->group_get_curve(a, a1, a2, a3, ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 505 | !b->meth->group_get_curve(b, b1, b2, b3, ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 506 | r = 1; never executed: r = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 507 | - | |||||||||||||||||||||||||||||||||||||
| 508 | if (r
| 0 | ||||||||||||||||||||||||||||||||||||
| 509 | r = 1; never executed: r = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 510 | - | |||||||||||||||||||||||||||||||||||||
| 511 | - | |||||||||||||||||||||||||||||||||||||
| 512 | if (r
| 0 | ||||||||||||||||||||||||||||||||||||
| 513 | EC_GROUP_get0_generator(b), ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 514 | r = 1; never executed: r = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 515 | - | |||||||||||||||||||||||||||||||||||||
| 516 | if (!r
| 0 | ||||||||||||||||||||||||||||||||||||
| 517 | - | |||||||||||||||||||||||||||||||||||||
| 518 | if (!EC_GROUP_get_order(a, a1, ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 519 | !EC_GROUP_get_order(b, b1, ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 520 | !EC_GROUP_get_cofactor(a, a2, ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 521 | !EC_GROUP_get_cofactor(b, b2, ctx)
| 0 | ||||||||||||||||||||||||||||||||||||
| 522 | goto never executed: err;goto err;never executed: goto err; | 0 | ||||||||||||||||||||||||||||||||||||
| 523 | if (BN_cmp(a1, b1)
| 0 | ||||||||||||||||||||||||||||||||||||
| 524 | r = 1; never executed: r = 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 525 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 526 | BN_CTX_end(ctx); | - | ||||||||||||||||||||||||||||||||||||
| 527 | if (ctx_new
| 0 | ||||||||||||||||||||||||||||||||||||
| 528 | BN_CTX_free(ctx); never executed: BN_CTX_free(ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 529 | - | |||||||||||||||||||||||||||||||||||||
| 530 | return never executed: r;return r;never executed: return r; | 0 | ||||||||||||||||||||||||||||||||||||
| 531 | - | |||||||||||||||||||||||||||||||||||||
| 532 | err: | - | ||||||||||||||||||||||||||||||||||||
| 533 | BN_CTX_end(ctx); | - | ||||||||||||||||||||||||||||||||||||
| 534 | if (ctx_new
| 0 | ||||||||||||||||||||||||||||||||||||
| 535 | BN_CTX_free(ctx); never executed: BN_CTX_free(ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 536 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
| 537 | } | - | ||||||||||||||||||||||||||||||||||||
| 538 | - | |||||||||||||||||||||||||||||||||||||
| 539 | - | |||||||||||||||||||||||||||||||||||||
| 540 | - | |||||||||||||||||||||||||||||||||||||
| 541 | int | - | ||||||||||||||||||||||||||||||||||||
| 542 | EC_EX_DATA_set_data(EC_EXTRA_DATA ** ex_data, void *data, | - | ||||||||||||||||||||||||||||||||||||
| 543 | void *(*dup_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 544 | void (*free_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 545 | void (*clear_free_func) (void *)) | - | ||||||||||||||||||||||||||||||||||||
| 546 | { | - | ||||||||||||||||||||||||||||||||||||
| 547 | EC_EXTRA_DATA *d; | - | ||||||||||||||||||||||||||||||||||||
| 548 | - | |||||||||||||||||||||||||||||||||||||
| 549 | if (ex_data ==
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 550 | ((void *)0)
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 551 | ) | - | ||||||||||||||||||||||||||||||||||||
| 552 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 553 | - | |||||||||||||||||||||||||||||||||||||
| 554 | for (d = *ex_data; d !=
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 555 | ((void *)0)
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 556 | ; d = d->next) { | - | ||||||||||||||||||||||||||||||||||||
| 557 | if (d->dup_func == dup_func
| 0 | ||||||||||||||||||||||||||||||||||||
| 558 | d->clear_free_func == clear_free_func
| 0 | ||||||||||||||||||||||||||||||||||||
| 559 | ERR_put_error(16,(0xfff),(108),__FILE__,552); | - | ||||||||||||||||||||||||||||||||||||
| 560 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 561 | } | - | ||||||||||||||||||||||||||||||||||||
| 562 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 563 | - | |||||||||||||||||||||||||||||||||||||
| 564 | if (data ==
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 565 | ((void *)0)
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 566 | ) | - | ||||||||||||||||||||||||||||||||||||
| 567 | - | |||||||||||||||||||||||||||||||||||||
| 568 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||||||||||||||
| 569 | - | |||||||||||||||||||||||||||||||||||||
| 570 | d = malloc(sizeof *d); | - | ||||||||||||||||||||||||||||||||||||
| 571 | if (d ==
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 572 | ((void *)0)
| 0-254 | ||||||||||||||||||||||||||||||||||||
| 573 | ) | - | ||||||||||||||||||||||||||||||||||||
| 574 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 575 | - | |||||||||||||||||||||||||||||||||||||
| 576 | d->data = data; | - | ||||||||||||||||||||||||||||||||||||
| 577 | d->dup_func = dup_func; | - | ||||||||||||||||||||||||||||||||||||
| 578 | d->free_func = free_func; | - | ||||||||||||||||||||||||||||||||||||
| 579 | d->clear_free_func = clear_free_func; | - | ||||||||||||||||||||||||||||||||||||
| 580 | - | |||||||||||||||||||||||||||||||||||||
| 581 | d->next = *ex_data; | - | ||||||||||||||||||||||||||||||||||||
| 582 | *ex_data = d; | - | ||||||||||||||||||||||||||||||||||||
| 583 | - | |||||||||||||||||||||||||||||||||||||
| 584 | return executed 254 times by 4 tests: 1;return 1;Executed by:
executed 254 times by 4 tests: return 1;Executed by:
| 254 | ||||||||||||||||||||||||||||||||||||
| 585 | } | - | ||||||||||||||||||||||||||||||||||||
| 586 | - | |||||||||||||||||||||||||||||||||||||
| 587 | - | |||||||||||||||||||||||||||||||||||||
| 588 | void * | - | ||||||||||||||||||||||||||||||||||||
| 589 | EC_EX_DATA_get_data(const EC_EXTRA_DATA * ex_data, | - | ||||||||||||||||||||||||||||||||||||
| 590 | void *(*dup_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 591 | void (*free_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 592 | void (*clear_free_func) (void *)) | - | ||||||||||||||||||||||||||||||||||||
| 593 | { | - | ||||||||||||||||||||||||||||||||||||
| 594 | const EC_EXTRA_DATA *d; | - | ||||||||||||||||||||||||||||||||||||
| 595 | - | |||||||||||||||||||||||||||||||||||||
| 596 | for (d = ex_data; d !=
| 456-847 | ||||||||||||||||||||||||||||||||||||
| 597 | ((void *)0)
| 456-847 | ||||||||||||||||||||||||||||||||||||
| 598 | ; d = d->next) { | - | ||||||||||||||||||||||||||||||||||||
| 599 | if (d->dup_func == dup_func
| 0-456 | ||||||||||||||||||||||||||||||||||||
| 600 | return executed 456 times by 1 test: d->data;return d->data;Executed by:
executed 456 times by 1 test: return d->data;Executed by:
| 456 | ||||||||||||||||||||||||||||||||||||
| 601 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 602 | - | |||||||||||||||||||||||||||||||||||||
| 603 | return executed 847 times by 3 tests: return ((void *)0) ;Executed by:
executed 847 times by 3 tests: return ((void *)0) ;Executed by:
| 847 | ||||||||||||||||||||||||||||||||||||
| 604 | ((void *)0) executed 847 times by 3 tests: return ((void *)0) ;Executed by:
| 847 | ||||||||||||||||||||||||||||||||||||
| 605 | ; executed 847 times by 3 tests: return ((void *)0) ;Executed by:
| 847 | ||||||||||||||||||||||||||||||||||||
| 606 | } | - | ||||||||||||||||||||||||||||||||||||
| 607 | - | |||||||||||||||||||||||||||||||||||||
| 608 | - | |||||||||||||||||||||||||||||||||||||
| 609 | void | - | ||||||||||||||||||||||||||||||||||||
| 610 | EC_EX_DATA_free_data(EC_EXTRA_DATA ** ex_data, | - | ||||||||||||||||||||||||||||||||||||
| 611 | void *(*dup_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 612 | void (*free_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 613 | void (*clear_free_func) (void *)) | - | ||||||||||||||||||||||||||||||||||||
| 614 | { | - | ||||||||||||||||||||||||||||||||||||
| 615 | EC_EXTRA_DATA **p; | - | ||||||||||||||||||||||||||||||||||||
| 616 | - | |||||||||||||||||||||||||||||||||||||
| 617 | if (ex_data ==
| 0-10 | ||||||||||||||||||||||||||||||||||||
| 618 | ((void *)0)
| 0-10 | ||||||||||||||||||||||||||||||||||||
| 619 | ) | - | ||||||||||||||||||||||||||||||||||||
| 620 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 621 | - | |||||||||||||||||||||||||||||||||||||
| 622 | for (p = ex_data; *
| 1-9 | ||||||||||||||||||||||||||||||||||||
| 623 | ((void *)0)
| 1-9 | ||||||||||||||||||||||||||||||||||||
| 624 | ; p = &((*p)->next)) { | - | ||||||||||||||||||||||||||||||||||||
| 625 | if ((*
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 626 | (*
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 627 | (*
| 0-9 | ||||||||||||||||||||||||||||||||||||
| 628 | EC_EXTRA_DATA *next = (*p)->next; | - | ||||||||||||||||||||||||||||||||||||
| 629 | - | |||||||||||||||||||||||||||||||||||||
| 630 | (*p)->free_func((*p)->data); | - | ||||||||||||||||||||||||||||||||||||
| 631 | free(*p); | - | ||||||||||||||||||||||||||||||||||||
| 632 | - | |||||||||||||||||||||||||||||||||||||
| 633 | *p = next; | - | ||||||||||||||||||||||||||||||||||||
| 634 | return; executed 9 times by 1 test: return;Executed by:
| 9 | ||||||||||||||||||||||||||||||||||||
| 635 | } | - | ||||||||||||||||||||||||||||||||||||
| 636 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 637 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 638 | - | |||||||||||||||||||||||||||||||||||||
| 639 | - | |||||||||||||||||||||||||||||||||||||
| 640 | void | - | ||||||||||||||||||||||||||||||||||||
| 641 | EC_EX_DATA_clear_free_data(EC_EXTRA_DATA ** ex_data, | - | ||||||||||||||||||||||||||||||||||||
| 642 | void *(*dup_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 643 | void (*free_func) (void *), | - | ||||||||||||||||||||||||||||||||||||
| 644 | void (*clear_free_func) (void *)) | - | ||||||||||||||||||||||||||||||||||||
| 645 | { | - | ||||||||||||||||||||||||||||||||||||
| 646 | EC_EXTRA_DATA **p; | - | ||||||||||||||||||||||||||||||||||||
| 647 | - | |||||||||||||||||||||||||||||||||||||
| 648 | if (ex_data ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 649 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 650 | ) | - | ||||||||||||||||||||||||||||||||||||
| 651 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 652 | - | |||||||||||||||||||||||||||||||||||||
| 653 | for (p = ex_data; *
| 0 | ||||||||||||||||||||||||||||||||||||
| 654 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 655 | ; p = &((*p)->next)) { | - | ||||||||||||||||||||||||||||||||||||
| 656 | if ((*
| 0 | ||||||||||||||||||||||||||||||||||||
| 657 | (*
| 0 | ||||||||||||||||||||||||||||||||||||
| 658 | (*
| 0 | ||||||||||||||||||||||||||||||||||||
| 659 | EC_EXTRA_DATA *next = (*p)->next; | - | ||||||||||||||||||||||||||||||||||||
| 660 | - | |||||||||||||||||||||||||||||||||||||
| 661 | (*p)->clear_free_func((*p)->data); | - | ||||||||||||||||||||||||||||||||||||
| 662 | free(*p); | - | ||||||||||||||||||||||||||||||||||||
| 663 | - | |||||||||||||||||||||||||||||||||||||
| 664 | *p = next; | - | ||||||||||||||||||||||||||||||||||||
| 665 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 666 | } | - | ||||||||||||||||||||||||||||||||||||
| 667 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 668 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 669 | - | |||||||||||||||||||||||||||||||||||||
| 670 | - | |||||||||||||||||||||||||||||||||||||
| 671 | void | - | ||||||||||||||||||||||||||||||||||||
| 672 | EC_EX_DATA_free_all_data(EC_EXTRA_DATA ** ex_data) | - | ||||||||||||||||||||||||||||||||||||
| 673 | { | - | ||||||||||||||||||||||||||||||||||||
| 674 | EC_EXTRA_DATA *d; | - | ||||||||||||||||||||||||||||||||||||
| 675 | - | |||||||||||||||||||||||||||||||||||||
| 676 | if (ex_data ==
| 0-1165 | ||||||||||||||||||||||||||||||||||||
| 677 | ((void *)0)
| 0-1165 | ||||||||||||||||||||||||||||||||||||
| 678 | ) | - | ||||||||||||||||||||||||||||||||||||
| 679 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 680 | - | |||||||||||||||||||||||||||||||||||||
| 681 | d = *ex_data; | - | ||||||||||||||||||||||||||||||||||||
| 682 | while (d
| 245-1165 | ||||||||||||||||||||||||||||||||||||
| 683 | EC_EXTRA_DATA *next = d->next; | - | ||||||||||||||||||||||||||||||||||||
| 684 | - | |||||||||||||||||||||||||||||||||||||
| 685 | d->free_func(d->data); | - | ||||||||||||||||||||||||||||||||||||
| 686 | free(d); | - | ||||||||||||||||||||||||||||||||||||
| 687 | - | |||||||||||||||||||||||||||||||||||||
| 688 | d = next; | - | ||||||||||||||||||||||||||||||||||||
| 689 | } executed 245 times by 4 tests: end of blockExecuted by:
| 245 | ||||||||||||||||||||||||||||||||||||
| 690 | *ex_data = | - | ||||||||||||||||||||||||||||||||||||
| 691 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 692 | ; | - | ||||||||||||||||||||||||||||||||||||
| 693 | } executed 1165 times by 4 tests: end of blockExecuted by:
| 1165 | ||||||||||||||||||||||||||||||||||||
| 694 | - | |||||||||||||||||||||||||||||||||||||
| 695 | - | |||||||||||||||||||||||||||||||||||||
| 696 | void | - | ||||||||||||||||||||||||||||||||||||
| 697 | EC_EX_DATA_clear_free_all_data(EC_EXTRA_DATA ** ex_data) | - | ||||||||||||||||||||||||||||||||||||
| 698 | { | - | ||||||||||||||||||||||||||||||||||||
| 699 | EC_EXTRA_DATA *d; | - | ||||||||||||||||||||||||||||||||||||
| 700 | - | |||||||||||||||||||||||||||||||||||||
| 701 | if (ex_data ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 702 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 703 | ) | - | ||||||||||||||||||||||||||||||||||||
| 704 | return; never executed: return; | 0 | ||||||||||||||||||||||||||||||||||||
| 705 | - | |||||||||||||||||||||||||||||||||||||
| 706 | d = *ex_data; | - | ||||||||||||||||||||||||||||||||||||
| 707 | while (d
| 0 | ||||||||||||||||||||||||||||||||||||
| 708 | EC_EXTRA_DATA *next = d->next; | - | ||||||||||||||||||||||||||||||||||||
| 709 | - | |||||||||||||||||||||||||||||||||||||
| 710 | d->clear_free_func(d->data); | - | ||||||||||||||||||||||||||||||||||||
| 711 | free(d); | - | ||||||||||||||||||||||||||||||||||||
| 712 | - | |||||||||||||||||||||||||||||||||||||
| 713 | d = next; | - | ||||||||||||||||||||||||||||||||||||
| 714 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 715 | *ex_data = | - | ||||||||||||||||||||||||||||||||||||
| 716 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 717 | ; | - | ||||||||||||||||||||||||||||||||||||
| 718 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||||||||
| 719 | - | |||||||||||||||||||||||||||||||||||||
| 720 | - | |||||||||||||||||||||||||||||||||||||
| 721 | - | |||||||||||||||||||||||||||||||||||||
| 722 | - | |||||||||||||||||||||||||||||||||||||
| 723 | EC_POINT * | - | ||||||||||||||||||||||||||||||||||||
| 724 | EC_POINT_new(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 725 | { | - | ||||||||||||||||||||||||||||||||||||
| 726 | EC_POINT *ret; | - | ||||||||||||||||||||||||||||||||||||
| 727 | - | |||||||||||||||||||||||||||||||||||||
| 728 | if (group ==
| 0-10236 | ||||||||||||||||||||||||||||||||||||
| 729 | ((void *)0)
| 0-10236 | ||||||||||||||||||||||||||||||||||||
| 730 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 731 | ERR_put_error(16,(0xfff),((3|64)),__FILE__,698); | - | ||||||||||||||||||||||||||||||||||||
| 732 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 733 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 734 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 735 | } | - | ||||||||||||||||||||||||||||||||||||
| 736 | if (group->meth->point_init == 0
| 0-10236 | ||||||||||||||||||||||||||||||||||||
| 737 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,702); | - | ||||||||||||||||||||||||||||||||||||
| 738 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 739 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 740 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 741 | } | - | ||||||||||||||||||||||||||||||||||||
| 742 | ret = malloc(sizeof *ret); | - | ||||||||||||||||||||||||||||||||||||
| 743 | if (ret ==
| 0-10236 | ||||||||||||||||||||||||||||||||||||
| 744 | ((void *)0)
| 0-10236 | ||||||||||||||||||||||||||||||||||||
| 745 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 746 | ERR_put_error(16,(0xfff),((1|64)),__FILE__,707); | - | ||||||||||||||||||||||||||||||||||||
| 747 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 748 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 749 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 750 | } | - | ||||||||||||||||||||||||||||||||||||
| 751 | ret->meth = group->meth; | - | ||||||||||||||||||||||||||||||||||||
| 752 | - | |||||||||||||||||||||||||||||||||||||
| 753 | if (!ret->meth->point_init(ret)
| 0-10236 | ||||||||||||||||||||||||||||||||||||
| 754 | free(ret); | - | ||||||||||||||||||||||||||||||||||||
| 755 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 756 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 757 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 758 | } | - | ||||||||||||||||||||||||||||||||||||
| 759 | return executed 10236 times by 4 tests: ret;return ret;Executed by:
executed 10236 times by 4 tests: return ret;Executed by:
| 10236 | ||||||||||||||||||||||||||||||||||||
| 760 | } | - | ||||||||||||||||||||||||||||||||||||
| 761 | - | |||||||||||||||||||||||||||||||||||||
| 762 | - | |||||||||||||||||||||||||||||||||||||
| 763 | void | - | ||||||||||||||||||||||||||||||||||||
| 764 | EC_POINT_free(EC_POINT * point) | - | ||||||||||||||||||||||||||||||||||||
| 765 | { | - | ||||||||||||||||||||||||||||||||||||
| 766 | if (!point
| 95-6524 | ||||||||||||||||||||||||||||||||||||
| 767 | return; executed 95 times by 5 tests: return;Executed by:
| 95 | ||||||||||||||||||||||||||||||||||||
| 768 | - | |||||||||||||||||||||||||||||||||||||
| 769 | if (point->meth->point_finish != 0
| 0-6524 | ||||||||||||||||||||||||||||||||||||
| 770 | point->meth->point_finish(point); executed 6524 times by 4 tests: point->meth->point_finish(point);Executed by:
| 6524 | ||||||||||||||||||||||||||||||||||||
| 771 | free(point); | - | ||||||||||||||||||||||||||||||||||||
| 772 | } executed 6524 times by 4 tests: end of blockExecuted by:
| 6524 | ||||||||||||||||||||||||||||||||||||
| 773 | - | |||||||||||||||||||||||||||||||||||||
| 774 | - | |||||||||||||||||||||||||||||||||||||
| 775 | void | - | ||||||||||||||||||||||||||||||||||||
| 776 | EC_POINT_clear_free(EC_POINT * point) | - | ||||||||||||||||||||||||||||||||||||
| 777 | { | - | ||||||||||||||||||||||||||||||||||||
| 778 | if (!point
| 3-3712 | ||||||||||||||||||||||||||||||||||||
| 779 | return; executed 3 times by 2 tests: return;Executed by:
| 3 | ||||||||||||||||||||||||||||||||||||
| 780 | - | |||||||||||||||||||||||||||||||||||||
| 781 | if (point->meth->point_clear_finish != 0
| 0-3712 | ||||||||||||||||||||||||||||||||||||
| 782 | point->meth->point_clear_finish(point); executed 3712 times by 1 test: point->meth->point_clear_finish(point);Executed by:
| 3712 | ||||||||||||||||||||||||||||||||||||
| 783 | else if (point->meth->point_finish != 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 784 | point->meth->point_finish(point); never executed: point->meth->point_finish(point); | 0 | ||||||||||||||||||||||||||||||||||||
| 785 | freezero(point, sizeof *point); | - | ||||||||||||||||||||||||||||||||||||
| 786 | } executed 3712 times by 1 test: end of blockExecuted by:
| 3712 | ||||||||||||||||||||||||||||||||||||
| 787 | - | |||||||||||||||||||||||||||||||||||||
| 788 | - | |||||||||||||||||||||||||||||||||||||
| 789 | int | - | ||||||||||||||||||||||||||||||||||||
| 790 | EC_POINT_copy(EC_POINT * dest, const EC_POINT * src) | - | ||||||||||||||||||||||||||||||||||||
| 791 | { | - | ||||||||||||||||||||||||||||||||||||
| 792 | if (dest->meth->point_copy == 0
| 0-28962 | ||||||||||||||||||||||||||||||||||||
| 793 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,750); | - | ||||||||||||||||||||||||||||||||||||
| 794 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 795 | } | - | ||||||||||||||||||||||||||||||||||||
| 796 | if (dest->meth != src->meth
| 0-28962 | ||||||||||||||||||||||||||||||||||||
| 797 | ERR_put_error(16,(0xfff),(101),__FILE__,754); | - | ||||||||||||||||||||||||||||||||||||
| 798 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 799 | } | - | ||||||||||||||||||||||||||||||||||||
| 800 | if (dest == src
| 3674-25288 | ||||||||||||||||||||||||||||||||||||
| 801 | return executed 25288 times by 2 tests: 1;return 1;Executed by:
executed 25288 times by 2 tests: return 1;Executed by:
| 25288 | ||||||||||||||||||||||||||||||||||||
| 802 | return executed 3674 times by 4 tests: dest->meth->point_copy(dest, src);return dest->meth->point_copy(dest, src);Executed by:
executed 3674 times by 4 tests: return dest->meth->point_copy(dest, src);Executed by:
| 3674 | ||||||||||||||||||||||||||||||||||||
| 803 | } | - | ||||||||||||||||||||||||||||||||||||
| 804 | - | |||||||||||||||||||||||||||||||||||||
| 805 | - | |||||||||||||||||||||||||||||||||||||
| 806 | EC_POINT * | - | ||||||||||||||||||||||||||||||||||||
| 807 | EC_POINT_dup(const EC_POINT * a, const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 808 | { | - | ||||||||||||||||||||||||||||||||||||
| 809 | EC_POINT *t; | - | ||||||||||||||||||||||||||||||||||||
| 810 | int r; | - | ||||||||||||||||||||||||||||||||||||
| 811 | - | |||||||||||||||||||||||||||||||||||||
| 812 | if (a ==
| 0-29 | ||||||||||||||||||||||||||||||||||||
| 813 | ((void *)0)
| 0-29 | ||||||||||||||||||||||||||||||||||||
| 814 | ) | - | ||||||||||||||||||||||||||||||||||||
| 815 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 816 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 817 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 818 | - | |||||||||||||||||||||||||||||||||||||
| 819 | t = EC_POINT_new(group); | - | ||||||||||||||||||||||||||||||||||||
| 820 | if (t ==
| 0-29 | ||||||||||||||||||||||||||||||||||||
| 821 | ((void *)0)
| 0-29 | ||||||||||||||||||||||||||||||||||||
| 822 | ) | - | ||||||||||||||||||||||||||||||||||||
| 823 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 824 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 825 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 826 | r = EC_POINT_copy(t, a); | - | ||||||||||||||||||||||||||||||||||||
| 827 | if (!r
| 0-29 | ||||||||||||||||||||||||||||||||||||
| 828 | EC_POINT_free(t); | - | ||||||||||||||||||||||||||||||||||||
| 829 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 830 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 831 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||||||||
| 832 | } else | - | ||||||||||||||||||||||||||||||||||||
| 833 | return executed 29 times by 2 tests: t;return t;Executed by:
executed 29 times by 2 tests: return t;Executed by:
| 29 | ||||||||||||||||||||||||||||||||||||
| 834 | } | - | ||||||||||||||||||||||||||||||||||||
| 835 | - | |||||||||||||||||||||||||||||||||||||
| 836 | - | |||||||||||||||||||||||||||||||||||||
| 837 | const EC_METHOD * | - | ||||||||||||||||||||||||||||||||||||
| 838 | EC_POINT_method_of(const EC_POINT * point) | - | ||||||||||||||||||||||||||||||||||||
| 839 | { | - | ||||||||||||||||||||||||||||||||||||
| 840 | return never executed: point->meth;return point->meth;never executed: return point->meth; | 0 | ||||||||||||||||||||||||||||||||||||
| 841 | } | - | ||||||||||||||||||||||||||||||||||||
| 842 | - | |||||||||||||||||||||||||||||||||||||
| 843 | - | |||||||||||||||||||||||||||||||||||||
| 844 | int | - | ||||||||||||||||||||||||||||||||||||
| 845 | EC_POINT_set_to_infinity(const EC_GROUP * group, EC_POINT * point) | - | ||||||||||||||||||||||||||||||||||||
| 846 | { | - | ||||||||||||||||||||||||||||||||||||
| 847 | if (group->meth->point_set_to_infinity == 0
| 0-103 | ||||||||||||||||||||||||||||||||||||
| 848 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,795); | - | ||||||||||||||||||||||||||||||||||||
| 849 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 850 | } | - | ||||||||||||||||||||||||||||||||||||
| 851 | if (group->meth != point->meth
| 0-103 | ||||||||||||||||||||||||||||||||||||
| 852 | ERR_put_error(16,(0xfff),(101),__FILE__,799); | - | ||||||||||||||||||||||||||||||||||||
| 853 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 854 | } | - | ||||||||||||||||||||||||||||||||||||
| 855 | return executed 103 times by 2 tests: group->meth->point_set_to_infinity(group, point);return group->meth->point_set_to_infinity(group, point);Executed by:
executed 103 times by 2 tests: return group->meth->point_set_to_infinity(group, point);Executed by:
| 103 | ||||||||||||||||||||||||||||||||||||
| 856 | } | - | ||||||||||||||||||||||||||||||||||||
| 857 | - | |||||||||||||||||||||||||||||||||||||
| 858 | - | |||||||||||||||||||||||||||||||||||||
| 859 | int | - | ||||||||||||||||||||||||||||||||||||
| 860 | EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | - | ||||||||||||||||||||||||||||||||||||
| 861 | const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 862 | { | - | ||||||||||||||||||||||||||||||||||||
| 863 | if (group->meth->point_set_Jprojective_coordinates_GFp == 0
| 0-305 | ||||||||||||||||||||||||||||||||||||
| 864 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,811); | - | ||||||||||||||||||||||||||||||||||||
| 865 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 866 | } | - | ||||||||||||||||||||||||||||||||||||
| 867 | if (group->meth != point->meth
| 0-305 | ||||||||||||||||||||||||||||||||||||
| 868 | ERR_put_error(16,(0xfff),(101),__FILE__,815); | - | ||||||||||||||||||||||||||||||||||||
| 869 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 870 | } | - | ||||||||||||||||||||||||||||||||||||
| 871 | return executed 305 times by 4 tests: group->meth->point_set_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);return group->meth->point_set_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);Executed by:
executed 305 times by 4 tests: return group->meth->point_set_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);Executed by:
| 305 | ||||||||||||||||||||||||||||||||||||
| 872 | } | - | ||||||||||||||||||||||||||||||||||||
| 873 | - | |||||||||||||||||||||||||||||||||||||
| 874 | - | |||||||||||||||||||||||||||||||||||||
| 875 | int | - | ||||||||||||||||||||||||||||||||||||
| 876 | EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | - | ||||||||||||||||||||||||||||||||||||
| 877 | const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 878 | { | - | ||||||||||||||||||||||||||||||||||||
| 879 | if (group->meth->point_get_Jprojective_coordinates_GFp == 0
| 0-1 | ||||||||||||||||||||||||||||||||||||
| 880 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,827); | - | ||||||||||||||||||||||||||||||||||||
| 881 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 882 | } | - | ||||||||||||||||||||||||||||||||||||
| 883 | if (group->meth != point->meth
| 0-1 | ||||||||||||||||||||||||||||||||||||
| 884 | ERR_put_error(16,(0xfff),(101),__FILE__,831); | - | ||||||||||||||||||||||||||||||||||||
| 885 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 886 | } | - | ||||||||||||||||||||||||||||||||||||
| 887 | return executed 1 time by 1 test: group->meth->point_get_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);return group->meth->point_get_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);Executed by:
executed 1 time by 1 test: return group->meth->point_get_Jprojective_coordinates_GFp(group, point, x, y, z, ctx);Executed by:
| 1 | ||||||||||||||||||||||||||||||||||||
| 888 | } | - | ||||||||||||||||||||||||||||||||||||
| 889 | - | |||||||||||||||||||||||||||||||||||||
| 890 | - | |||||||||||||||||||||||||||||||||||||
| 891 | int | - | ||||||||||||||||||||||||||||||||||||
| 892 | EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *point, | - | ||||||||||||||||||||||||||||||||||||
| 893 | const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 894 | { | - | ||||||||||||||||||||||||||||||||||||
| 895 | if (group->meth->point_set_affine_coordinates == 0
| 0-442 | ||||||||||||||||||||||||||||||||||||
| 896 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,843); | - | ||||||||||||||||||||||||||||||||||||
| 897 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 898 | } | - | ||||||||||||||||||||||||||||||||||||
| 899 | if (group->meth != point->meth
| 0-442 | ||||||||||||||||||||||||||||||||||||
| 900 | ERR_put_error(16,(0xfff),(101),__FILE__,847); | - | ||||||||||||||||||||||||||||||||||||
| 901 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 902 | } | - | ||||||||||||||||||||||||||||||||||||
| 903 | return executed 442 times by 4 tests: group->meth->point_set_affine_coordinates(group, point, x, y, ctx);return group->meth->point_set_affine_coordinates(group, point, x, y, ctx);Executed by:
executed 442 times by 4 tests: return group->meth->point_set_affine_coordinates(group, point, x, y, ctx);Executed by:
| 442 | ||||||||||||||||||||||||||||||||||||
| 904 | } | - | ||||||||||||||||||||||||||||||||||||
| 905 | - | |||||||||||||||||||||||||||||||||||||
| 906 | - | |||||||||||||||||||||||||||||||||||||
| 907 | int | - | ||||||||||||||||||||||||||||||||||||
| 908 | EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *point, | - | ||||||||||||||||||||||||||||||||||||
| 909 | const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 910 | { | - | ||||||||||||||||||||||||||||||||||||
| 911 | if (group->meth->point_set_affine_coordinates == 0
| 0-214889 | ||||||||||||||||||||||||||||||||||||
| 912 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,859); | - | ||||||||||||||||||||||||||||||||||||
| 913 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 914 | } | - | ||||||||||||||||||||||||||||||||||||
| 915 | if (group->meth != point->meth
| 0-214889 | ||||||||||||||||||||||||||||||||||||
| 916 | ERR_put_error(16,(0xfff),(101),__FILE__,863); | - | ||||||||||||||||||||||||||||||||||||
| 917 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 918 | } | - | ||||||||||||||||||||||||||||||||||||
| 919 | return executed 214889 times by 3 tests: group->meth->point_set_affine_coordinates(group, point, x, y, ctx);return group->meth->point_set_affine_coordinates(group, point, x, y, ctx);Executed by:
executed 214889 times by 3 tests: return group->meth->point_set_affine_coordinates(group, point, x, y, ctx);Executed by:
| 214889 | ||||||||||||||||||||||||||||||||||||
| 920 | } | - | ||||||||||||||||||||||||||||||||||||
| 921 | - | |||||||||||||||||||||||||||||||||||||
| 922 | - | |||||||||||||||||||||||||||||||||||||
| 923 | int | - | ||||||||||||||||||||||||||||||||||||
| 924 | EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, const EC_POINT *point, | - | ||||||||||||||||||||||||||||||||||||
| 925 | BIGNUM *x, BIGNUM *y, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 926 | { | - | ||||||||||||||||||||||||||||||||||||
| 927 | if (group->meth->point_get_affine_coordinates == 0
| 0-385 | ||||||||||||||||||||||||||||||||||||
| 928 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,875); | - | ||||||||||||||||||||||||||||||||||||
| 929 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 930 | } | - | ||||||||||||||||||||||||||||||||||||
| 931 | if (group->meth != point->meth
| 0-385 | ||||||||||||||||||||||||||||||||||||
| 932 | ERR_put_error(16,(0xfff),(101),__FILE__,879); | - | ||||||||||||||||||||||||||||||||||||
| 933 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 934 | } | - | ||||||||||||||||||||||||||||||||||||
| 935 | return executed 385 times by 4 tests: group->meth->point_get_affine_coordinates(group, point, x, y, ctx);return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);Executed by:
executed 385 times by 4 tests: return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);Executed by:
| 385 | ||||||||||||||||||||||||||||||||||||
| 936 | } | - | ||||||||||||||||||||||||||||||||||||
| 937 | - | |||||||||||||||||||||||||||||||||||||
| 938 | - | |||||||||||||||||||||||||||||||||||||
| 939 | int | - | ||||||||||||||||||||||||||||||||||||
| 940 | EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, const EC_POINT *point, | - | ||||||||||||||||||||||||||||||||||||
| 941 | BIGNUM *x, BIGNUM *y, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 942 | { | - | ||||||||||||||||||||||||||||||||||||
| 943 | if (group->meth->point_get_affine_coordinates == 0
| 0-251 | ||||||||||||||||||||||||||||||||||||
| 944 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,891); | - | ||||||||||||||||||||||||||||||||||||
| 945 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 946 | } | - | ||||||||||||||||||||||||||||||||||||
| 947 | if (group->meth != point->meth
| 0-251 | ||||||||||||||||||||||||||||||||||||
| 948 | ERR_put_error(16,(0xfff),(101),__FILE__,895); | - | ||||||||||||||||||||||||||||||||||||
| 949 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 950 | } | - | ||||||||||||||||||||||||||||||||||||
| 951 | return executed 251 times by 3 tests: group->meth->point_get_affine_coordinates(group, point, x, y, ctx);return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);Executed by:
executed 251 times by 3 tests: return group->meth->point_get_affine_coordinates(group, point, x, y, ctx);Executed by:
| 251 | ||||||||||||||||||||||||||||||||||||
| 952 | } | - | ||||||||||||||||||||||||||||||||||||
| 953 | - | |||||||||||||||||||||||||||||||||||||
| 954 | - | |||||||||||||||||||||||||||||||||||||
| 955 | int | - | ||||||||||||||||||||||||||||||||||||
| 956 | EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, | - | ||||||||||||||||||||||||||||||||||||
| 957 | const EC_POINT *b, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 958 | { | - | ||||||||||||||||||||||||||||||||||||
| 959 | if (group->meth->add == 0
| 0-238801 | ||||||||||||||||||||||||||||||||||||
| 960 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,907); | - | ||||||||||||||||||||||||||||||||||||
| 961 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 962 | } | - | ||||||||||||||||||||||||||||||||||||
| 963 | if ((
| 0-238801 | ||||||||||||||||||||||||||||||||||||
| 964 | ERR_put_error(16,(0xfff),(101),__FILE__,911); | - | ||||||||||||||||||||||||||||||||||||
| 965 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 966 | } | - | ||||||||||||||||||||||||||||||||||||
| 967 | return executed 238801 times by 4 tests: group->meth->add(group, r, a, b, ctx);return group->meth->add(group, r, a, b, ctx);Executed by:
executed 238801 times by 4 tests: return group->meth->add(group, r, a, b, ctx);Executed by:
| 238801 | ||||||||||||||||||||||||||||||||||||
| 968 | } | - | ||||||||||||||||||||||||||||||||||||
| 969 | - | |||||||||||||||||||||||||||||||||||||
| 970 | - | |||||||||||||||||||||||||||||||||||||
| 971 | int | - | ||||||||||||||||||||||||||||||||||||
| 972 | EC_POINT_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 973 | { | - | ||||||||||||||||||||||||||||||||||||
| 974 | if (group->meth->dbl == 0
| 0-299192 | ||||||||||||||||||||||||||||||||||||
| 975 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,922); | - | ||||||||||||||||||||||||||||||||||||
| 976 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 977 | } | - | ||||||||||||||||||||||||||||||||||||
| 978 | if ((
| 0-299192 | ||||||||||||||||||||||||||||||||||||
| 979 | ERR_put_error(16,(0xfff),(101),__FILE__,926); | - | ||||||||||||||||||||||||||||||||||||
| 980 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 981 | } | - | ||||||||||||||||||||||||||||||||||||
| 982 | return executed 299192 times by 4 tests: group->meth->dbl(group, r, a, ctx);return group->meth->dbl(group, r, a, ctx);Executed by:
executed 299192 times by 4 tests: return group->meth->dbl(group, r, a, ctx);Executed by:
| 299192 | ||||||||||||||||||||||||||||||||||||
| 983 | } | - | ||||||||||||||||||||||||||||||||||||
| 984 | - | |||||||||||||||||||||||||||||||||||||
| 985 | - | |||||||||||||||||||||||||||||||||||||
| 986 | int | - | ||||||||||||||||||||||||||||||||||||
| 987 | EC_POINT_invert(const EC_GROUP *group, EC_POINT *a, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 988 | { | - | ||||||||||||||||||||||||||||||||||||
| 989 | if (group->meth->invert == 0
| 0-18568 | ||||||||||||||||||||||||||||||||||||
| 990 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,937); | - | ||||||||||||||||||||||||||||||||||||
| 991 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 992 | } | - | ||||||||||||||||||||||||||||||||||||
| 993 | if (group->meth != a->meth
| 0-18568 | ||||||||||||||||||||||||||||||||||||
| 994 | ERR_put_error(16,(0xfff),(101),__FILE__,941); | - | ||||||||||||||||||||||||||||||||||||
| 995 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 996 | } | - | ||||||||||||||||||||||||||||||||||||
| 997 | return executed 18568 times by 2 tests: group->meth->invert(group, a, ctx);return group->meth->invert(group, a, ctx);Executed by:
executed 18568 times by 2 tests: return group->meth->invert(group, a, ctx);Executed by:
| 18568 | ||||||||||||||||||||||||||||||||||||
| 998 | } | - | ||||||||||||||||||||||||||||||||||||
| 999 | - | |||||||||||||||||||||||||||||||||||||
| 1000 | - | |||||||||||||||||||||||||||||||||||||
| 1001 | int | - | ||||||||||||||||||||||||||||||||||||
| 1002 | EC_POINT_is_at_infinity(const EC_GROUP *group, const EC_POINT *point) | - | ||||||||||||||||||||||||||||||||||||
| 1003 | { | - | ||||||||||||||||||||||||||||||||||||
| 1004 | if (group->meth->is_at_infinity == 0
| 0-902355 | ||||||||||||||||||||||||||||||||||||
| 1005 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,952); | - | ||||||||||||||||||||||||||||||||||||
| 1006 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1007 | } | - | ||||||||||||||||||||||||||||||||||||
| 1008 | if (group->meth != point->meth
| 0-902355 | ||||||||||||||||||||||||||||||||||||
| 1009 | ERR_put_error(16,(0xfff),(101),__FILE__,956); | - | ||||||||||||||||||||||||||||||||||||
| 1010 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1011 | } | - | ||||||||||||||||||||||||||||||||||||
| 1012 | return executed 902355 times by 4 tests: group->meth->is_at_infinity(group, point);return group->meth->is_at_infinity(group, point);Executed by:
executed 902355 times by 4 tests: return group->meth->is_at_infinity(group, point);Executed by:
| 902355 | ||||||||||||||||||||||||||||||||||||
| 1013 | } | - | ||||||||||||||||||||||||||||||||||||
| 1014 | - | |||||||||||||||||||||||||||||||||||||
| 1015 | - | |||||||||||||||||||||||||||||||||||||
| 1016 | int | - | ||||||||||||||||||||||||||||||||||||
| 1017 | EC_POINT_is_on_curve(const EC_GROUP * group, const EC_POINT * point, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1018 | { | - | ||||||||||||||||||||||||||||||||||||
| 1019 | if (group->meth->is_on_curve == 0
| 0-318 | ||||||||||||||||||||||||||||||||||||
| 1020 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,967); | - | ||||||||||||||||||||||||||||||||||||
| 1021 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1022 | } | - | ||||||||||||||||||||||||||||||||||||
| 1023 | if (group->meth != point->meth
| 0-318 | ||||||||||||||||||||||||||||||||||||
| 1024 | ERR_put_error(16,(0xfff),(101),__FILE__,971); | - | ||||||||||||||||||||||||||||||||||||
| 1025 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1026 | } | - | ||||||||||||||||||||||||||||||||||||
| 1027 | return executed 318 times by 4 tests: group->meth->is_on_curve(group, point, ctx);return group->meth->is_on_curve(group, point, ctx);Executed by:
executed 318 times by 4 tests: return group->meth->is_on_curve(group, point, ctx);Executed by:
| 318 | ||||||||||||||||||||||||||||||||||||
| 1028 | } | - | ||||||||||||||||||||||||||||||||||||
| 1029 | - | |||||||||||||||||||||||||||||||||||||
| 1030 | - | |||||||||||||||||||||||||||||||||||||
| 1031 | int | - | ||||||||||||||||||||||||||||||||||||
| 1032 | EC_POINT_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, | - | ||||||||||||||||||||||||||||||||||||
| 1033 | BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1034 | { | - | ||||||||||||||||||||||||||||||||||||
| 1035 | if (group->meth->point_cmp == 0
| 0-130 | ||||||||||||||||||||||||||||||||||||
| 1036 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,983); | - | ||||||||||||||||||||||||||||||||||||
| 1037 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
| 1038 | } | - | ||||||||||||||||||||||||||||||||||||
| 1039 | if ((
| 0-130 | ||||||||||||||||||||||||||||||||||||
| 1040 | ERR_put_error(16,(0xfff),(101),__FILE__,987); | - | ||||||||||||||||||||||||||||||||||||
| 1041 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||||||||||||||||||||||||||
| 1042 | } | - | ||||||||||||||||||||||||||||||||||||
| 1043 | return executed 130 times by 2 tests: group->meth->point_cmp(group, a, b, ctx);return group->meth->point_cmp(group, a, b, ctx);Executed by:
executed 130 times by 2 tests: return group->meth->point_cmp(group, a, b, ctx);Executed by:
| 130 | ||||||||||||||||||||||||||||||||||||
| 1044 | } | - | ||||||||||||||||||||||||||||||||||||
| 1045 | - | |||||||||||||||||||||||||||||||||||||
| 1046 | - | |||||||||||||||||||||||||||||||||||||
| 1047 | int | - | ||||||||||||||||||||||||||||||||||||
| 1048 | EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1049 | { | - | ||||||||||||||||||||||||||||||||||||
| 1050 | if (group->meth->make_affine == 0
| 0-8044 | ||||||||||||||||||||||||||||||||||||
| 1051 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,998); | - | ||||||||||||||||||||||||||||||||||||
| 1052 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1053 | } | - | ||||||||||||||||||||||||||||||||||||
| 1054 | if (group->meth != point->meth
| 0-8044 | ||||||||||||||||||||||||||||||||||||
| 1055 | ERR_put_error(16,(0xfff),(101),__FILE__,1002); | - | ||||||||||||||||||||||||||||||||||||
| 1056 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1057 | } | - | ||||||||||||||||||||||||||||||||||||
| 1058 | return executed 8044 times by 2 tests: group->meth->make_affine(group, point, ctx);return group->meth->make_affine(group, point, ctx);Executed by:
executed 8044 times by 2 tests: return group->meth->make_affine(group, point, ctx);Executed by:
| 8044 | ||||||||||||||||||||||||||||||||||||
| 1059 | } | - | ||||||||||||||||||||||||||||||||||||
| 1060 | - | |||||||||||||||||||||||||||||||||||||
| 1061 | - | |||||||||||||||||||||||||||||||||||||
| 1062 | int | - | ||||||||||||||||||||||||||||||||||||
| 1063 | EC_POINTs_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], | - | ||||||||||||||||||||||||||||||||||||
| 1064 | BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1065 | { | - | ||||||||||||||||||||||||||||||||||||
| 1066 | size_t i; | - | ||||||||||||||||||||||||||||||||||||
| 1067 | - | |||||||||||||||||||||||||||||||||||||
| 1068 | if (group->meth->points_make_affine == 0
| 0-389 | ||||||||||||||||||||||||||||||||||||
| 1069 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,1016); | - | ||||||||||||||||||||||||||||||||||||
| 1070 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1071 | } | - | ||||||||||||||||||||||||||||||||||||
| 1072 | for (i = 0; i < num
| 389-7072 | ||||||||||||||||||||||||||||||||||||
| 1073 | if (group->meth != points[i]->meth
| 0-7072 | ||||||||||||||||||||||||||||||||||||
| 1074 | ERR_put_error(16,(0xfff),(101),__FILE__,1021); | - | ||||||||||||||||||||||||||||||||||||
| 1075 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1076 | } | - | ||||||||||||||||||||||||||||||||||||
| 1077 | } executed 7072 times by 2 tests: end of blockExecuted by:
| 7072 | ||||||||||||||||||||||||||||||||||||
| 1078 | return executed 389 times by 2 tests: group->meth->points_make_affine(group, num, points, ctx);return group->meth->points_make_affine(group, num, points, ctx);Executed by:
executed 389 times by 2 tests: return group->meth->points_make_affine(group, num, points, ctx);Executed by:
| 389 | ||||||||||||||||||||||||||||||||||||
| 1079 | } | - | ||||||||||||||||||||||||||||||||||||
| 1080 | - | |||||||||||||||||||||||||||||||||||||
| 1081 | - | |||||||||||||||||||||||||||||||||||||
| 1082 | - | |||||||||||||||||||||||||||||||||||||
| 1083 | int | - | ||||||||||||||||||||||||||||||||||||
| 1084 | EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, | - | ||||||||||||||||||||||||||||||||||||
| 1085 | size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1086 | { | - | ||||||||||||||||||||||||||||||||||||
| 1087 | - | |||||||||||||||||||||||||||||||||||||
| 1088 | - | |||||||||||||||||||||||||||||||||||||
| 1089 | - | |||||||||||||||||||||||||||||||||||||
| 1090 | - | |||||||||||||||||||||||||||||||||||||
| 1091 | if (group->meth->mul_generator_ct ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1092 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1093 | || | - | ||||||||||||||||||||||||||||||||||||
| 1094 | group->meth->mul_single_ct ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1095 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1096 | || | - | ||||||||||||||||||||||||||||||||||||
| 1097 | group->meth->mul_double_nonct ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1098 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1099 | || | - | ||||||||||||||||||||||||||||||||||||
| 1100 | num > 1
| 0 | ||||||||||||||||||||||||||||||||||||
| 1101 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,1042); | - | ||||||||||||||||||||||||||||||||||||
| 1102 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1103 | } | - | ||||||||||||||||||||||||||||||||||||
| 1104 | - | |||||||||||||||||||||||||||||||||||||
| 1105 | - | |||||||||||||||||||||||||||||||||||||
| 1106 | if (num == 1
| 0 | ||||||||||||||||||||||||||||||||||||
| 1107 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1108 | && scalars !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 1109 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1110 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1111 | return never executed: EC_POINT_mul(group, r, scalar, points[0], scalars[0],return EC_POINT_mul(group, r, scalar, points[0], scalars[0], ctx);never executed: return EC_POINT_mul(group, r, scalar, points[0], scalars[0], ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1112 | ctx); never executed: return EC_POINT_mul(group, r, scalar, points[0], scalars[0], ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1113 | - | |||||||||||||||||||||||||||||||||||||
| 1114 | - | |||||||||||||||||||||||||||||||||||||
| 1115 | if (scalar !=
| 0 | ||||||||||||||||||||||||||||||||||||
| 1116 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1117 | && points ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1118 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1119 | && scalars ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1120 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1121 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1122 | return never executed: EC_POINT_mul(group, r, scalar, return EC_POINT_mul(group, r, scalar, ((void *)0) , ((void *)0) , ctx);never executed: return EC_POINT_mul(group, r, scalar, ((void *)0) , ((void *)0) , ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1123 | ((void *)0) never executed: return EC_POINT_mul(group, r, scalar, ((void *)0) , ((void *)0) , ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1124 | , never executed: return EC_POINT_mul(group, r, scalar, ((void *)0) , ((void *)0) , ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1125 | ((void *)0) never executed: return EC_POINT_mul(group, r, scalar, ((void *)0) , ((void *)0) , ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1126 | , ctx); never executed: return EC_POINT_mul(group, r, scalar, ((void *)0) , ((void *)0) , ctx); | 0 | ||||||||||||||||||||||||||||||||||||
| 1127 | - | |||||||||||||||||||||||||||||||||||||
| 1128 | - | |||||||||||||||||||||||||||||||||||||
| 1129 | ERR_put_error(16,(0xfff),(16),__FILE__,1056); | - | ||||||||||||||||||||||||||||||||||||
| 1130 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1131 | } | - | ||||||||||||||||||||||||||||||||||||
| 1132 | - | |||||||||||||||||||||||||||||||||||||
| 1133 | int | - | ||||||||||||||||||||||||||||||||||||
| 1134 | EC_POINT_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *g_scalar, | - | ||||||||||||||||||||||||||||||||||||
| 1135 | const EC_POINT *point, const BIGNUM *p_scalar, BN_CTX *ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1136 | { | - | ||||||||||||||||||||||||||||||||||||
| 1137 | if (group->meth->mul_generator_ct ==
| 0-1093 | ||||||||||||||||||||||||||||||||||||
| 1138 | ((void *)0)
| 0-1093 | ||||||||||||||||||||||||||||||||||||
| 1139 | || | - | ||||||||||||||||||||||||||||||||||||
| 1140 | group->meth->mul_single_ct ==
| 0-1093 | ||||||||||||||||||||||||||||||||||||
| 1141 | ((void *)0)
| 0-1093 | ||||||||||||||||||||||||||||||||||||
| 1142 | || | - | ||||||||||||||||||||||||||||||||||||
| 1143 | group->meth->mul_double_nonct ==
| 0-1093 | ||||||||||||||||||||||||||||||||||||
| 1144 | ((void *)0)
| 0-1093 | ||||||||||||||||||||||||||||||||||||
| 1145 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1146 | ERR_put_error(16,(0xfff),((2|64)),__FILE__,1067); | - | ||||||||||||||||||||||||||||||||||||
| 1147 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1148 | } | - | ||||||||||||||||||||||||||||||||||||
| 1149 | if (g_scalar !=
| 206-887 | ||||||||||||||||||||||||||||||||||||
| 1150 | ((void *)0)
| 206-887 | ||||||||||||||||||||||||||||||||||||
| 1151 | && point ==
| 379-508 | ||||||||||||||||||||||||||||||||||||
| 1152 | ((void *)0)
| 379-508 | ||||||||||||||||||||||||||||||||||||
| 1153 | && p_scalar ==
| 0-508 | ||||||||||||||||||||||||||||||||||||
| 1154 | ((void *)0)
| 0-508 | ||||||||||||||||||||||||||||||||||||
| 1155 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1156 | return executed 508 times by 4 tests: group->meth->mul_generator_ct(group, r, g_scalar, ctx);return group->meth->mul_generator_ct(group, r, g_scalar, ctx);Executed by:
executed 508 times by 4 tests: return group->meth->mul_generator_ct(group, r, g_scalar, ctx);Executed by:
| 508 | ||||||||||||||||||||||||||||||||||||
| 1157 | } | - | ||||||||||||||||||||||||||||||||||||
| 1158 | if (g_scalar ==
| 206-379 | ||||||||||||||||||||||||||||||||||||
| 1159 | ((void *)0)
| 206-379 | ||||||||||||||||||||||||||||||||||||
| 1160 | && point !=
| 0-206 | ||||||||||||||||||||||||||||||||||||
| 1161 | ((void *)0)
| 0-206 | ||||||||||||||||||||||||||||||||||||
| 1162 | && p_scalar !=
| 0-206 | ||||||||||||||||||||||||||||||||||||
| 1163 | ((void *)0)
| 0-206 | ||||||||||||||||||||||||||||||||||||
| 1164 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1165 | - | |||||||||||||||||||||||||||||||||||||
| 1166 | - | |||||||||||||||||||||||||||||||||||||
| 1167 | - | |||||||||||||||||||||||||||||||||||||
| 1168 | - | |||||||||||||||||||||||||||||||||||||
| 1169 | - | |||||||||||||||||||||||||||||||||||||
| 1170 | - | |||||||||||||||||||||||||||||||||||||
| 1171 | - | |||||||||||||||||||||||||||||||||||||
| 1172 | return executed 206 times by 4 tests: group->meth->mul_single_ct(group, r, p_scalar, point,return group->meth->mul_single_ct(group, r, p_scalar, point, ctx);Executed by:
executed 206 times by 4 tests: return group->meth->mul_single_ct(group, r, p_scalar, point, ctx);Executed by:
| 206 | ||||||||||||||||||||||||||||||||||||
| 1173 | ctx); executed 206 times by 4 tests: return group->meth->mul_single_ct(group, r, p_scalar, point, ctx);Executed by:
| 206 | ||||||||||||||||||||||||||||||||||||
| 1174 | } | - | ||||||||||||||||||||||||||||||||||||
| 1175 | if (g_scalar !=
| 0-379 | ||||||||||||||||||||||||||||||||||||
| 1176 | ((void *)0)
| 0-379 | ||||||||||||||||||||||||||||||||||||
| 1177 | && point !=
| 0-379 | ||||||||||||||||||||||||||||||||||||
| 1178 | ((void *)0)
| 0-379 | ||||||||||||||||||||||||||||||||||||
| 1179 | && p_scalar !=
| 0-379 | ||||||||||||||||||||||||||||||||||||
| 1180 | ((void *)0)
| 0-379 | ||||||||||||||||||||||||||||||||||||
| 1181 | ) { | - | ||||||||||||||||||||||||||||||||||||
| 1182 | - | |||||||||||||||||||||||||||||||||||||
| 1183 | - | |||||||||||||||||||||||||||||||||||||
| 1184 | - | |||||||||||||||||||||||||||||||||||||
| 1185 | - | |||||||||||||||||||||||||||||||||||||
| 1186 | - | |||||||||||||||||||||||||||||||||||||
| 1187 | - | |||||||||||||||||||||||||||||||||||||
| 1188 | return executed 379 times by 1 test: group->meth->mul_double_nonct(group, r, g_scalar,return group->meth->mul_double_nonct(group, r, g_scalar, p_scalar, point, ctx);Executed by:
executed 379 times by 1 test: return group->meth->mul_double_nonct(group, r, g_scalar, p_scalar, point, ctx);Executed by:
| 379 | ||||||||||||||||||||||||||||||||||||
| 1189 | p_scalar, point, ctx); executed 379 times by 1 test: return group->meth->mul_double_nonct(group, r, g_scalar, p_scalar, point, ctx);Executed by:
| 379 | ||||||||||||||||||||||||||||||||||||
| 1190 | } | - | ||||||||||||||||||||||||||||||||||||
| 1191 | - | |||||||||||||||||||||||||||||||||||||
| 1192 | - | |||||||||||||||||||||||||||||||||||||
| 1193 | ERR_put_error(16,(0xfff),(16),__FILE__,1104); | - | ||||||||||||||||||||||||||||||||||||
| 1194 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1195 | } | - | ||||||||||||||||||||||||||||||||||||
| 1196 | - | |||||||||||||||||||||||||||||||||||||
| 1197 | int | - | ||||||||||||||||||||||||||||||||||||
| 1198 | EC_GROUP_precompute_mult(EC_GROUP * group, BN_CTX * ctx) | - | ||||||||||||||||||||||||||||||||||||
| 1199 | { | - | ||||||||||||||||||||||||||||||||||||
| 1200 | if (group->meth->precompute_mult != 0
| 6-10 | ||||||||||||||||||||||||||||||||||||
| 1201 | return executed 10 times by 1 test: group->meth->precompute_mult(group, ctx);return group->meth->precompute_mult(group, ctx);Executed by:
executed 10 times by 1 test: return group->meth->precompute_mult(group, ctx);Executed by:
| 10 | ||||||||||||||||||||||||||||||||||||
| 1202 | else | - | ||||||||||||||||||||||||||||||||||||
| 1203 | return executed 6 times by 1 test: 1;return 1;Executed by:
executed 6 times by 1 test: return 1;Executed by:
| 6 | ||||||||||||||||||||||||||||||||||||
| 1204 | } | - | ||||||||||||||||||||||||||||||||||||
| 1205 | - | |||||||||||||||||||||||||||||||||||||
| 1206 | int | - | ||||||||||||||||||||||||||||||||||||
| 1207 | EC_GROUP_have_precompute_mult(const EC_GROUP * group) | - | ||||||||||||||||||||||||||||||||||||
| 1208 | { | - | ||||||||||||||||||||||||||||||||||||
| 1209 | if (group->meth->have_precompute_mult != 0
| 0 | ||||||||||||||||||||||||||||||||||||
| 1210 | return never executed: group->meth->have_precompute_mult(group);return group->meth->have_precompute_mult(group);never executed: return group->meth->have_precompute_mult(group); | 0 | ||||||||||||||||||||||||||||||||||||
| 1211 | else | - | ||||||||||||||||||||||||||||||||||||
| 1212 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||||||||||||||
| 1213 | - | |||||||||||||||||||||||||||||||||||||
| 1214 | } | - | ||||||||||||||||||||||||||||||||||||
| 1215 | - | |||||||||||||||||||||||||||||||||||||
| 1216 | EC_KEY * | - | ||||||||||||||||||||||||||||||||||||
| 1217 | ECParameters_dup(EC_KEY *key) | - | ||||||||||||||||||||||||||||||||||||
| 1218 | { | - | ||||||||||||||||||||||||||||||||||||
| 1219 | unsigned char *p = | - | ||||||||||||||||||||||||||||||||||||
| 1220 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1221 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1222 | EC_KEY *k = | - | ||||||||||||||||||||||||||||||||||||
| 1223 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||
| 1224 | ; | - | ||||||||||||||||||||||||||||||||||||
| 1225 | int len; | - | ||||||||||||||||||||||||||||||||||||
| 1226 | - | |||||||||||||||||||||||||||||||||||||
| 1227 | if (key ==
| 0 | ||||||||||||||||||||||||||||||||||||
| 1228 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||||||||
| 1229 | ) | - | ||||||||||||||||||||||||||||||||||||
| 1230 | return never executed: (return ( ((void *)0) );never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1231 | ((void *)0) never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1232 | ); never executed: return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||||||||
| 1233 | - | |||||||||||||||||||||||||||||||||||||
| 1234 | if ((
| 0 | ||||||||||||||||||||||||||||||||||||
| 1235 | k = d2i_ECParameters( never executed: k = d2i_ECParameters( ((void *)0) , (const unsigned char **)&p, len); | 0 | ||||||||||||||||||||||||||||||||||||
| 1236 | ((void *)0) never executed: k = d2i_ECParameters( ((void *)0) , (const unsigned char **)&p, len); | 0 | ||||||||||||||||||||||||||||||||||||
| 1237 | , (const unsigned char **)&p, len); never executed: k = d2i_ECParameters( ((void *)0) , (const unsigned char **)&p, len); | 0 | ||||||||||||||||||||||||||||||||||||
| 1238 | - | |||||||||||||||||||||||||||||||||||||
| 1239 | return never executed: (k);return (k);never executed: return (k); | 0 | ||||||||||||||||||||||||||||||||||||
| 1240 | } | - | ||||||||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |