Home
last modified time | relevance | path

Searched refs:cofactor (Results 1 - 25 of 33) sorted by relevance

12

/third_party/node/deps/openssl/openssl/crypto/ec/
H A Dec_lib.c61 ret->cofactor = BN_new(); in ossl_ec_group_new_ex()
62 if (ret->cofactor == NULL) in ossl_ec_group_new_ex()
73 BN_free(ret->cofactor); in ossl_ec_group_new_ex()
133 BN_free(group->cofactor); in EC_GROUP_free()
154 BN_clear_free(group->cofactor); in EC_GROUP_clear_free()
239 if (!BN_copy(dest->cofactor, src->cofactor)) in EC_GROUP_copy()
303 * Try computing cofactor from the generator order (n) and field cardinality (q).
313 * Otherwise, zero cofactor and return success.
321 * If the cofactor i in ec_guess_cofactor()
363 EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor) EC_GROUP_set_generator() argument
463 EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) EC_GROUP_get_cofactor() argument
1547 BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL; EC_GROUP_new_from_params() local
[all...]
H A Deck_prn.c77 const BIGNUM *order = NULL, *cofactor = NULL; in ECPKParameters_print() local
144 cofactor = EC_GROUP_get0_cofactor(x); in ECPKParameters_print()
207 if ((cofactor != NULL) && !ASN1_bn_print(bp, "Cofactor: ", cofactor, in ECPKParameters_print()
H A Dec_backend.c259 const BIGNUM *cofactor = EC_GROUP_get0_cofactor(group); in ec_group_explicit_todata() local
261 if (cofactor != NULL in ec_group_explicit_todata()
263 OSSL_PKEY_PARAM_EC_COFACTOR, cofactor)) { in ec_group_explicit_todata()
362 const BIGNUM *cofactor; in ossl_ec_set_ecdh_cofactor_mode() local
373 if ((cofactor = EC_GROUP_get0_cofactor(ecg)) == NULL ) in ossl_ec_set_ecdh_cofactor_mode()
376 /* ECDH cofactor mode has no effect if cofactor is 1 */ in ossl_ec_set_ecdh_cofactor_mode()
377 if (BN_is_one(cofactor)) in ossl_ec_set_ecdh_cofactor_mode()
H A Dec_asn1.c74 ASN1_INTEGER *cofactor; member
151 ASN1_OPT(ECPARAMETERS, cofactor, ASN1_INTEGER)
450 /* set the cofactor (optional) */ in EC_GROUP_get_ecparameters()
453 ret->cofactor = BN_to_ASN1_INTEGER(tmp, orig = ret->cofactor); in EC_GROUP_get_ecparameters()
454 if (ret->cofactor == NULL) { in EC_GROUP_get_ecparameters()
455 ret->cofactor = orig; in EC_GROUP_get_ecparameters()
746 /* extract the cofactor (optional) */ in EC_GROUP_new_from_ecparameters()
747 if (params->cofactor == NULL) { in EC_GROUP_new_from_ecparameters()
750 } else if (ASN1_INTEGER_to_BN(params->cofactor, in EC_GROUP_new_from_ecparameters()
[all...]
H A Dec_mult.c165 if (BN_is_zero(group->cofactor)) { in ossl_ec_scalar_mul_ladder()
202 if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) { in ossl_ec_scalar_mul_ladder()
438 if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) { in ossl_ec_wNAF_mul()
H A Dec_pmeth.c32 /* Duplicate key if custom cofactor needed */
299 /* If cofactor is 1 cofactor mode does nothing */ in pkey_ec_ctrl()
300 if (BN_is_one(ec_key->group->cofactor)) in pkey_ec_ctrl()
/third_party/openssl/crypto/ec/
H A Dec_lib.c61 ret->cofactor = BN_new(); in ossl_ec_group_new_ex()
62 if (ret->cofactor == NULL) in ossl_ec_group_new_ex()
73 BN_free(ret->cofactor); in ossl_ec_group_new_ex()
133 BN_free(group->cofactor); in EC_GROUP_free()
154 BN_clear_free(group->cofactor); in EC_GROUP_clear_free()
239 if (!BN_copy(dest->cofactor, src->cofactor)) in EC_GROUP_copy()
303 * Try computing cofactor from the generator order (n) and field cardinality (q).
313 * Otherwise, zero cofactor and return success.
321 * If the cofactor i in ec_guess_cofactor()
363 EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor) EC_GROUP_set_generator() argument
463 EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) EC_GROUP_get_cofactor() argument
1547 BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL; EC_GROUP_new_from_params() local
[all...]
H A Deck_prn.c77 const BIGNUM *order = NULL, *cofactor = NULL; in ECPKParameters_print() local
144 cofactor = EC_GROUP_get0_cofactor(x); in ECPKParameters_print()
207 if ((cofactor != NULL) && !ASN1_bn_print(bp, "Cofactor: ", cofactor, in ECPKParameters_print()
H A Dec_backend.c259 const BIGNUM *cofactor = EC_GROUP_get0_cofactor(group); in ec_group_explicit_todata() local
261 if (cofactor != NULL in ec_group_explicit_todata()
263 OSSL_PKEY_PARAM_EC_COFACTOR, cofactor)) { in ec_group_explicit_todata()
362 const BIGNUM *cofactor; in ossl_ec_set_ecdh_cofactor_mode() local
373 if ((cofactor = EC_GROUP_get0_cofactor(ecg)) == NULL ) in ossl_ec_set_ecdh_cofactor_mode()
376 /* ECDH cofactor mode has no effect if cofactor is 1 */ in ossl_ec_set_ecdh_cofactor_mode()
377 if (BN_is_one(cofactor)) in ossl_ec_set_ecdh_cofactor_mode()
H A Dec_asn1.c74 ASN1_INTEGER *cofactor; member
151 ASN1_OPT(ECPARAMETERS, cofactor, ASN1_INTEGER)
450 /* set the cofactor (optional) */ in EC_GROUP_get_ecparameters()
453 ret->cofactor = BN_to_ASN1_INTEGER(tmp, orig = ret->cofactor); in EC_GROUP_get_ecparameters()
454 if (ret->cofactor == NULL) { in EC_GROUP_get_ecparameters()
455 ret->cofactor = orig; in EC_GROUP_get_ecparameters()
746 /* extract the cofactor (optional) */ in EC_GROUP_new_from_ecparameters()
747 if (params->cofactor == NULL) { in EC_GROUP_new_from_ecparameters()
750 } else if (ASN1_INTEGER_to_BN(params->cofactor, in EC_GROUP_new_from_ecparameters()
[all...]
H A Dec_mult.c165 if (BN_is_zero(group->cofactor)) { in ossl_ec_scalar_mul_ladder()
202 if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) { in ossl_ec_scalar_mul_ladder()
438 if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) { in ossl_ec_wNAF_mul()
/third_party/rust/crates/rust-openssl/openssl/src/
H A Dec.rs218 /// Places the cofactor of the group in the provided `BigNum`.
220 pub fn cofactor( in cofactor() functions
222 cofactor: &mut BigNumRef, in cofactor()
228 cofactor.as_ptr(), in cofactor()
263 cofactor: BigNum, in set_generator()
270 cofactor.as_ptr(), in set_generator()
1121 let cofactor = BigNum::from_hex_str("01").unwrap(); in fmt()
1122 group.set_generator(gen_point, order, cofactor).unwrap(); in fmt()
1137 fn cofactor() { in fmt() functions
1140 let mut cofactor in fmt() variables
[all...]
/third_party/node/deps/openssl/openssl/crypto/cms/
H A Dcms_ec.c126 int kdf_nid, kdfmd_nid, cofactor; in ecdh_cms_set_kdf_param() local
132 /* Lookup KDF type, cofactor mode and digest */ in ecdh_cms_set_kdf_param()
137 cofactor = 0; in ecdh_cms_set_kdf_param()
139 cofactor = 1; in ecdh_cms_set_kdf_param()
143 if (EVP_PKEY_CTX_set_ecdh_cofactor_mode(pctx, cofactor) <= 0) in ecdh_cms_set_kdf_param()
323 /* Lookup NID for KDF+cofactor+digest */ in ecdh_cms_encrypt()
/third_party/openssl/crypto/cms/
H A Dcms_ec.c126 int kdf_nid, kdfmd_nid, cofactor; in ecdh_cms_set_kdf_param() local
132 /* Lookup KDF type, cofactor mode and digest */ in ecdh_cms_set_kdf_param()
137 cofactor = 0; in ecdh_cms_set_kdf_param()
139 cofactor = 1; in ecdh_cms_set_kdf_param()
143 if (EVP_PKEY_CTX_set_ecdh_cofactor_mode(pctx, cofactor) <= 0) in ecdh_cms_set_kdf_param()
323 /* Lookup NID for KDF+cofactor+digest */ in ecdh_cms_encrypt()
/third_party/rust/crates/rust-openssl/openssl-sys/src/handwritten/
H A Dec.rs32 cofactor: *mut BIGNUM, in EC_GROUP_get_cofactor()
42 cofactor: *const BIGNUM, in EC_GROUP_set_generator()
/third_party/node/deps/openssl/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c433 const BIGNUM *order = NULL, *cofactor = NULL; in ec_param_explicit_to_text() local
450 cofactor = EC_GROUP_get0_cofactor(group); in ec_param_explicit_to_text()
457 || (cofactor != NULL in ec_param_explicit_to_text()
458 && !print_labeled_bignum(out, "Cofactor: ", cofactor)) in ec_param_explicit_to_text()
/third_party/openssl/providers/implementations/encode_decode/
H A Dencode_key2text.c433 const BIGNUM *order = NULL, *cofactor = NULL; in ec_param_explicit_to_text() local
450 cofactor = EC_GROUP_get0_cofactor(group); in ec_param_explicit_to_text()
457 || (cofactor != NULL in ec_param_explicit_to_text()
458 && !print_labeled_bignum(out, "Cofactor: ", cofactor)) in ec_param_explicit_to_text()
/third_party/node/deps/openssl/openssl/providers/implementations/exchange/
H A Decdh_exch.c60 * ECDH cofactor mode:
64 * . -1 use cofactor mode set for k
438 const BIGNUM *cofactor; in ecdh_plain_derive() local
453 || (cofactor = EC_GROUP_get0_cofactor(group)) == NULL ) in ecdh_plain_derive()
469 * - if ctx->k->cofactor == 1, the cofactor_mode flag is irrelevant, use in ecdh_plain_derive()
471 * - if ctx->k->cofactor != 1, use a duplicate of ctx->k with the flag in ecdh_plain_derive()
478 && !BN_is_one(cofactor)) { in ecdh_plain_derive()
/third_party/openssl/providers/implementations/exchange/
H A Decdh_exch.c60 * ECDH cofactor mode:
64 * . -1 use cofactor mode set for k
438 const BIGNUM *cofactor; in ecdh_plain_derive() local
453 || (cofactor = EC_GROUP_get0_cofactor(group)) == NULL ) in ecdh_plain_derive()
469 * - if ctx->k->cofactor == 1, the cofactor_mode flag is irrelevant, use in ecdh_plain_derive()
471 * - if ctx->k->cofactor != 1, use a duplicate of ctx->k with the flag in ecdh_plain_derive()
478 && !BN_is_one(cofactor)) { in ecdh_plain_derive()
/third_party/node/deps/openssl/openssl/providers/implementations/keymgmt/
H A Dec_kmgmt.c986 BIGNUM *p, *a, *b, *order, *cofactor; member
1119 COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_COFACTOR, gctx->cofactor); in ec_gen_set_params()
1176 if (gctx->cofactor != NULL in ec_gen_set_group_from_params()
1178 gctx->cofactor)) in ec_gen_set_group_from_params()
1357 BN_free(gctx->cofactor); in ec_gen_cleanup()
/third_party/openssl/providers/implementations/keymgmt/
H A Dec_kmgmt.c986 BIGNUM *p, *a, *b, *order, *cofactor; member
1119 COPY_BN_PARAM(params, OSSL_PKEY_PARAM_EC_COFACTOR, gctx->cofactor); in ec_gen_set_params()
1176 if (gctx->cofactor != NULL in ec_gen_set_group_from_params()
1178 gctx->cofactor)) in ec_gen_set_group_from_params()
1357 BN_free(gctx->cofactor); in ec_gen_cleanup()
/third_party/node/deps/openssl/openssl/include/openssl/
H A Dec.h210 /** Sets the generator and its order/cofactor of a EC_GROUP object.
214 * \param cofactor the index of the sub-group generated by the generator
219 const BIGNUM *order, const BIGNUM *cofactor);
253 /** Gets the cofactor of a EC_GROUP
255 * \param cofactor BIGNUM to which the cofactor is copied
259 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
262 /** Gets the cofactor of an EC_GROUP
264 * \return the group cofactor
/third_party/openssl/include/openssl/
H A Dec.h210 /** Sets the generator and its order/cofactor of a EC_GROUP object.
214 * \param cofactor the index of the sub-group generated by the generator
219 const BIGNUM *order, const BIGNUM *cofactor);
253 /** Gets the cofactor of a EC_GROUP
255 * \param cofactor BIGNUM to which the cofactor is copied
259 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
262 /** Gets the cofactor of an EC_GROUP
264 * \return the group cofactor
/third_party/openssl/ohos_lite/include/openssl/
H A Dec.h145 /** Sets the generator and its order/cofactor of a EC_GROUP object.
149 * \param cofactor the index of the sub-group generated by the generator
154 const BIGNUM *order, const BIGNUM *cofactor);
188 /** Gets the cofactor of a EC_GROUP
190 * \param cofactor BIGNUM to which the cofactor is copied
194 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor,
197 /** Gets the cofactor of an EC_GROUP
199 * \return the group cofactor
/third_party/openssl/test/
H A Dendecode_test.c1151 BIGNUM *a, *b, *poly, *order, *cofactor; in do_create_ec_explicit_trinomial_params() local
1180 && TEST_ptr(cofactor = BN_CTX_get(bnctx)) in do_create_ec_explicit_trinomial_params()
1185 && TEST_ptr(BN_bin2bn(cofactor_data, sizeof(cofactor_data), cofactor)) in do_create_ec_explicit_trinomial_params()
1197 cofactor)); in do_create_ec_explicit_trinomial_params()

Completed in 30 milliseconds

12