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

/freebsd-12-stable/crypto/openssl/crypto/ec/
H A Dec_lib.c44 ret->cofactor = BN_new();
45 if (ret->cofactor == NULL)
56 BN_free(ret->cofactor);
106 BN_free(group->cofactor);
125 BN_clear_free(group->cofactor);
208 if (!BN_copy(dest->cofactor, src->cofactor))
270 * Try computing cofactor from the generator order (n) and field cardinality (q).
280 * Otherwise, zero cofactor and return success.
288 * If the cofactor i
330 EC_GROUP_set_generator(EC_GROUP *group, const EC_POINT *generator, const BIGNUM *order, const BIGNUM *cofactor) argument
430 EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) argument
[all...]
H A Deck_prn.c73 const BIGNUM *order = NULL, *cofactor = NULL; local
139 cofactor = EC_GROUP_get0_cofactor(x);
205 if ((cofactor != NULL) && !ASN1_bn_print(bp, "Cofactor: ", cofactor,
H A Dec_asn1.c137 ASN1_INTEGER *cofactor; member in struct:ec_parameters_st
214 ASN1_OPT(ECPARAMETERS, cofactor, ASN1_INTEGER)
513 /* set the cofactor (optional) */
516 ret->cofactor = BN_to_ASN1_INTEGER(tmp, orig = ret->cofactor);
517 if (ret->cofactor == NULL) {
518 ret->cofactor = orig;
797 /* extract the cofactor (optional) */
798 if (params->cofactor == NULL) {
801 } else if ((b = ASN1_INTEGER_to_BN(params->cofactor,
[all...]
H A Dec_ameth.c705 int kdf_nid, kdfmd_nid, cofactor; local
710 /* Lookup KDF type, cofactor mode and digest */
715 cofactor = 0;
717 cofactor = 1;
721 if (EVP_PKEY_CTX_set_ecdh_cofactor_mode(pctx, cofactor) <= 0)
905 /* Lookup NID for KDF+cofactor+digest */
H A Dec_mult.c159 if (BN_is_zero(group->cofactor)) {
196 if (!BN_mul(cardinality, group->order, group->cofactor, ctx)) {
431 if (!BN_is_zero(group->order) && !BN_is_zero(group->cofactor)) {
H A Dec_pmeth.c26 /* Duplicate key if custom cofactor needed */
262 /* If cofactor is 1 cofactor mode does nothing */
263 if (BN_is_one(ec_key->group->cofactor))
H A Dec2_smpl.c856 * order or cofactor set to 0.
858 if (num > 1 || BN_is_zero(group->order) || BN_is_zero(group->cofactor))
H A Dec_local.h209 BIGNUM *order, *cofactor; member in struct:ec_group_st
H A Dec_curve.c22 unsigned int cofactor; /* promoted to BN_ULONG */ member in struct:__anon7967
3086 || !BN_set_word(x, (BN_ULONG)data->cofactor)) {
3219 const BIGNUM *cofactor = NULL; local
3231 cofactor = EC_GROUP_get0_cofactor(group);
3291 /* check the optional cofactor (ignore if its zero) */
3292 && (BN_is_zero(cofactor)
3293 || BN_is_word(cofactor, (const BN_ULONG)curve.data->cofactor))
/freebsd-12-stable/crypto/openssl/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

Completed in 139 milliseconds