• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/openssl-0.9.8e/crypto/ec/

Lines Matching refs:group

115 int ec_GFp_mont_group_init(EC_GROUP *group)
119 ok = ec_GFp_simple_group_init(group);
120 group->field_data1 = NULL;
121 group->field_data2 = NULL;
126 void ec_GFp_mont_group_finish(EC_GROUP *group)
128 if (group->field_data1 != NULL)
130 BN_MONT_CTX_free(group->field_data1);
131 group->field_data1 = NULL;
133 if (group->field_data2 != NULL)
135 BN_free(group->field_data2);
136 group->field_data2 = NULL;
138 ec_GFp_simple_group_finish(group);
142 void ec_GFp_mont_group_clear_finish(EC_GROUP *group)
144 if (group->field_data1 != NULL)
146 BN_MONT_CTX_free(group->field_data1);
147 group->field_data1 = NULL;
149 if (group->field_data2 != NULL)
151 BN_clear_free(group->field_data2);
152 group->field_data2 = NULL;
154 ec_GFp_simple_group_clear_finish(group);
197 int ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
204 if (group->field_data1 != NULL)
206 BN_MONT_CTX_free(group->field_data1);
207 group->field_data1 = NULL;
209 if (group->field_data2 != NULL)
211 BN_free(group->field_data2);
212 group->field_data2 = NULL;
233 group->field_data1 = mont;
235 group->field_data2 = one;
238 ret = ec_GFp_simple_group_set_curve(group, p, a, b, ctx);
242 BN_MONT_CTX_free(group->field_data1);
243 group->field_data1 = NULL;
244 BN_free(group->field_data2);
245 group->field_data2 = NULL;
257 int ec_GFp_mont_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
259 if (group->field_data1 == NULL)
265 return BN_mod_mul_montgomery(r, a, b, group->field_data1, ctx);
269 int ec_GFp_mont_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
271 if (group->field_data1 == NULL)
277 return BN_mod_mul_montgomery(r, a, a, group->field_data1, ctx);
281 int ec_GFp_mont_field_encode(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
283 if (group->field_data1 == NULL)
289 return BN_to_montgomery(r, a, (BN_MONT_CTX *)group->field_data1, ctx);
293 int ec_GFp_mont_field_decode(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
295 if (group->field_data1 == NULL)
301 return BN_from_montgomery(r, a, group->field_data1, ctx);
305 int ec_GFp_mont_field_set_to_one(const EC_GROUP *group, BIGNUM *r, BN_CTX *ctx)
307 if (group->field_data2 == NULL)
313 if (!BN_copy(r, group->field_data2)) return 0;