• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/openssl/crypto/ec/

Lines Matching defs:group

104 int ec_GFp_mont_group_init(EC_GROUP *group)
108 ok = ec_GFp_simple_group_init(group);
109 group->field_data1 = NULL;
110 group->field_data2 = NULL;
115 int ec_GFp_mont_group_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
122 if (group->field_data1 != NULL)
124 BN_MONT_CTX_free(group->field_data1);
125 group->field_data1 = NULL;
127 if (group->field_data2 != NULL)
129 BN_free(group->field_data2);
130 group->field_data2 = NULL;
151 group->field_data1 = mont;
153 group->field_data2 = one;
156 ret = ec_GFp_simple_group_set_curve_GFp(group, p, a, b, ctx);
160 BN_MONT_CTX_free(group->field_data1);
161 group->field_data1 = NULL;
162 BN_free(group->field_data2);
163 group->field_data2 = NULL;
175 void ec_GFp_mont_group_finish(EC_GROUP *group)
177 if (group->field_data1 != NULL)
179 BN_MONT_CTX_free(group->field_data1);
180 group->field_data1 = NULL;
182 if (group->field_data2 != NULL)
184 BN_free(group->field_data2);
185 group->field_data2 = NULL;
187 ec_GFp_simple_group_finish(group);
191 void ec_GFp_mont_group_clear_finish(EC_GROUP *group)
193 if (group->field_data1 != NULL)
195 BN_MONT_CTX_free(group->field_data1);
196 group->field_data1 = NULL;
198 if (group->field_data2 != NULL)
200 BN_clear_free(group->field_data2);
201 group->field_data2 = NULL;
203 ec_GFp_simple_group_clear_finish(group);
246 int ec_GFp_mont_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
248 if (group->field_data1 == NULL)
254 return BN_mod_mul_montgomery(r, a, b, group->field_data1, ctx);
258 int ec_GFp_mont_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
260 if (group->field_data1 == NULL)
266 return BN_mod_mul_montgomery(r, a, a, group->field_data1, ctx);
270 int ec_GFp_mont_field_encode(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
272 if (group->field_data1 == NULL)
278 return BN_to_montgomery(r, a, (BN_MONT_CTX *)group->field_data1, ctx);
282 int ec_GFp_mont_field_decode(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
284 if (group->field_data1 == NULL)
290 return BN_from_montgomery(r, a, group->field_data1, ctx);
294 int ec_GFp_mont_field_set_to_one(const EC_GROUP *group, BIGNUM *r, BN_CTX *ctx)
296 if (group->field_data2 == NULL)
302 if (!BN_copy(r, group->field_data2)) return 0;