| /freebsd/crypto/libecc/scripts/ |
| H A D | gen_curves_tests.sh | 45 …41 --order=6277101735386680763835789423176059013767194773182842284081 --cofactor=1 --add-test-vect… 49 …=26959946667150639794667015087019625940457807714424391721682722368061 --cofactor=1 --add-test-vect… 53 …210356248762697446949407573529996955224135760342422259061068512044369 --cofactor=1 --add-test-vect… 57 …465446667946905279627659399113263569398956308152294913554433653942643 --cofactor=1 --add-test-vect… 61 …746333217197532963996371363321113864768612440380340372808892707005449 --cofactor=1 --add-test-vect… 65 …41669C976316DA6321 --order=0xE95E4A5F737059DC60DF5991D45029409E60FC09 --cofactor=1 --add-test-vect… 69 …A2FA299B8F --order=0xC302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1 --cofactor=1 --add-test-vect… 73 …CD --order=0xD7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F --cofactor=1 --add-test-vect… 77 …er=0xA9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7 --cofactor=1 --add-test-vect… 81 …C4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E98691555B44C59311 --cofactor=1 --add-test-vect… [all …]
|
| H A D | expand_libecc.py | 175 def __init__(self, a, b, prime, order, cofactor, gx, gy, npoints, name, oid): argument 180 self.c = cofactor 1301 cofactor = stringtoint(Cofactor) 1328 return (True, (a, b, prime, order, cofactor, gx, gy)) 1445 def curve_params(name, prime, pbitlen, a, b, gx, gy, order, cofactor, oid, alpha_montgomery, gamma_… argument 1475 npoints = order * cofactor 1530 ec_params_string += export_curve_int(name, "cofactor", cofactor, getbytelen(cofactor)) 1684 …name = oid = prime = a = b = gx = gy = g = order = cofactor = ECfile = remove = remove_all = add_t… 1720 cofactor = get_int(arg.replace(' ', '')) 1820 …a != None) or (b != None) or (gx != None) or (gy != None) or (order != None) or (cofactor != None): [all …]
|
| /freebsd/crypto/openssl/crypto/ec/ |
| H A D | ec_lib.c | 59 ret->cofactor = BN_new(); in ossl_ec_group_new_ex() 60 if (ret->cofactor == NULL) in ossl_ec_group_new_ex() 71 BN_free(ret->cofactor); in ossl_ec_group_new_ex() 135 BN_free(group->cofactor); in EC_GROUP_free() 156 BN_clear_free(group->cofactor); in EC_GROUP_clear_free() 245 if (!BN_copy(dest->cofactor, src->cofactor)) in EC_GROUP_copy() 307 * Try computing cofactor from the generator order (n) and field cardinality (q). 317 * Otherwise, zero cofactor and return success. 326 * If the cofactor i in ec_guess_cofactor() 368 EC_GROUP_set_generator(EC_GROUP * group,const EC_POINT * generator,const BIGNUM * order,const BIGNUM * cofactor) EC_GROUP_set_generator() argument 467 EC_GROUP_get_cofactor(const EC_GROUP * group,BIGNUM * cofactor,BN_CTX * ctx) EC_GROUP_get_cofactor() argument 1551 BIGNUM *p = NULL, *a = NULL, *b = NULL, *order = NULL, *cofactor = NULL; EC_GROUP_new_from_params() local [all...] |
| H A D | eck_prn.c | 77 const BIGNUM *order = NULL, *cofactor = NULL; in ECPKParameters_print() local 143 cofactor = EC_GROUP_get0_cofactor(x); in ECPKParameters_print() 206 if ((cofactor != NULL) && !ASN1_bn_print(bp, "Cofactor: ", cofactor, NULL, off)) in ECPKParameters_print()
|
| H A D | ec_curve.c | 29 unsigned int cofactor; /* promoted to BN_ULONG */ member 3120 || !BN_set_word(x, (BN_ULONG)data->cofactor)) { 3259 const BIGNUM *cofactor = NULL; in ec_group_new_from_data() 3268 cofactor = EC_GROUP_get0_cofactor(group); in ec_group_new_from_data() 3328 /* check the optional cofactor (ignore if its zero) */ in EC_GROUP_new_by_curve_name_ex() 3329 && (cofactor == NULL || BN_is_zero(cofactor) in EC_GROUP_new_by_curve_name_ex() 3330 || BN_is_word(cofactor, (const BN_ULONG)curve.data->cofactor)) in EC_GROUP_new_by_curve_name_ex() 3384 const BIGNUM *cofactor = NULL; ossl_ec_curve_nid_from_params() local
|
| H A D | ec_backend.c | 259 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 D | ec_asn1.c | 75 ASN1_INTEGER *cofactor; member 144 = { ASN1_EMBED(ECPARAMETERS, version, INT32), ASN1_SIMPLE(ECPARAMETERS, fieldID, X9_62_FIELDID), ASN1_SIMPLE(ECPARAMETERS, curve, X9_62_CURVE), ASN1_SIMPLE(ECPARAMETERS, base, ASN1_OCTET_STRING), ASN1_SIMPLE(ECPARAMETERS, order, ASN1_INTEGER), ASN1_OPT(ECPARAMETERS, cofactor, ASN1_INTEGER) } ASN1_SEQUENCE_END(ECPARAMETERS) 439 /* set the cofactor (optional) */ in EC_GROUP_get_ecparameters() 442 ret->cofactor = BN_to_ASN1_INTEGER(tmp, orig = ret->cofactor); in EC_GROUP_get_ecparameters() 443 if (ret->cofactor == NULL) { in EC_GROUP_get_ecparameters() 444 ret->cofactor = orig; in EC_GROUP_get_ecparameters() 730 /* extract the cofactor (optional) */ in EC_GROUP_new_from_ecparameters() 731 if (params->cofactor == NULL) { in EC_GROUP_new_from_ecparameters() 734 } else if (ASN1_INTEGER_to_BN(params->cofactor, in EC_GROUP_new_from_ecparameters() [all...] |
| /freebsd/crypto/openssl/doc/man7/ |
| H A D | EVP_KEYEXCH-ECDH.pod | 15 =item "ecdh-cofactor-mode" (B<OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE>) <integer> 23 When setting, the value should be 1, 0 or -1, respectively forcing cofactor mode 28 cofactor mode is on or off. 58 =item "ecdh-cofactor-check" (B<OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK>) <integer> 62 the EC curve has a cofactor that is not 1, and the cofactor is not used.
|
| H A D | EVP_PKEY-EC.pod | 61 =item "cofactor" (B<OSSL_PKEY_PARAM_EC_COFACTOR>) <unsigned integer> 68 I<cofactor> is an optional value. 69 I<order> multiplied by the I<cofactor> gives the number of points on the curve. 76 =item "use-cofactor-flag" (B<OSSL_PKEY_PARAM_USE_COFACTOR_ECDH>) <integer> 79 if the value is zero. The cofactor variant multiplies the shared secret by the 80 EC curve's cofactor (note for some curves the cofactor is 1). 279 * This curve has a cofactor that is not 1 - so setting CDH mode changes 280 * the behaviour. For many curves the cofactor is 1 - so setting this has
|
| /freebsd/crypto/libecc/src/ecdh/ |
| H A D | ecccdh.c | 172 nn_src_t cofactor; in ecccdh_derive_secret() local 187 cofactor = &(our_priv_key->params->ec_gen_cofactor); in ecccdh_derive_secret() 188 ret = nn_isone(cofactor, &isone); EG(ret, err); in ecccdh_derive_secret() 194 ret = _prj_pt_unprotected_mult(Q, cofactor, Q); EG(ret, err); in ecccdh_derive_secret() 228 PTR_NULLIFY(cofactor); in ecccdh_derive_secret()
|
| H A D | x25519_448.c | 167 nn_t cofactor; in x25519_448_core() local 200 cofactor = &(shortw_curve_params.ec_gen_cofactor); in x25519_448_core() 259 ret = check_prj_pt_order(&Q, cofactor, PUBLIC_PT, &cmp); EG(ret, err); in x25519_448_core() 299 PTR_NULLIFY(cofactor); in x25519_448_core()
|
| /freebsd/crypto/openssl/crypto/cms/ |
| H A D | cms_ec.c | 127 int kdf_nid, kdfmd_nid, cofactor; in ecdh_cms_set_kdf_param() local 133 /* Lookup KDF type, cofactor mode and digest */ in ecdh_cms_set_kdf_param() 138 cofactor = 0; in ecdh_cms_set_kdf_param() 140 cofactor = 1; in ecdh_cms_set_kdf_param() 144 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()
|
| /freebsd/crypto/openssl/doc/man3/ |
| H A D | EC_GROUP_copy.pod | 27 const BIGNUM *order, const BIGNUM *cofactor); 33 int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx); 84 parameters include the B<generator>, the B<order> and the B<cofactor>. The B<generator> is a well d… 86 n-1 where n is the B<order>. The B<order> multiplied by the B<cofactor> gives the number of points … 94 EC_GROUP_get_cofactor() retrieves the cofactor of B<group> and copies its value 95 into B<cofactor>. It fails in case B<group> is not fully initialized or if the 96 cofactor is not set (or set to zero). 208 …UP_get_cofactor() returns 0 if the cofactor is not set (or is set to zero) for B<group> or if copy… 226 EC_GROUP_get0_cofactor() returns an internal pointer to the group cofactor.
|
| /freebsd/crypto/openssl/providers/implementations/encode_decode/ |
| H A D | encode_key2text.c | 255 const BIGNUM *order = NULL, *cofactor = NULL; in ec_param_explicit_to_text() 272 cofactor = EC_GROUP_get0_cofactor(group); in ec_param_explicit_to_text() 279 || (cofactor != NULL in ec_param_explicit_to_text() 280 && !ossl_bio_print_labeled_bignum(out, "Cofactor: ", cofactor)) in ec_param_explicit_to_text() 254 const BIGNUM *order = NULL, *cofactor = NULL; ec_param_explicit_to_text() local
|
| /freebsd/crypto/libecc/include/libecc/curves/known/ |
| H A D | ec_params_external.h | 86 const ec_str_param *cofactor; member
|
| H A D | ec_params_secp256r1.h | 192 .cofactor = &secp256r1_cofactor_str_param,
|
| H A D | ec_params_brainpoolp384r1.h | 230 .cofactor = &brainpoolp384r1_cofactor_str_param,
|
| H A D | ec_params_secp384r1.h | 216 .cofactor = &secp384r1_cofactor_str_param,
|
| H A D | ec_params_gost256.h | 198 .cofactor = &GOST_256bits_curve_cofactor_str_param,
|
| H A D | ec_params_frp256v1.h | 198 .cofactor = &frp256v1_cofactor_str_param,
|
| H A D | ec_params_brainpoolp256r1.h | 192 .cofactor = &brainpoolp256r1_cofactor_str_param,
|
| H A D | ec_params_gost512.h | 251 .cofactor = &GOST_512bits_curve_cofactor_str_param,
|
| H A D | ec_params_brainpoolp512r1.h | 242 .cofactor = &brainpoolp512r1_cofactor_str_param,
|
| /freebsd/crypto/openssl/providers/implementations/exchange/ |
| H A D | ecdh_exch.c | 60 * ECDH cofactor mode: 64 * . -1 use cofactor mode set for k 469 const BIGNUM *cofactor; in ecdh_size() 488 || (cofactor = EC_GROUP_get0_cofactor(group)) == NULL) in ecdh_plain_derive() 491 has_cofactor = !BN_is_one(cofactor); in ecdh_plain_derive() 506 * - if ctx->k->cofactor == 1, the cofactor_mode flag is irrelevant, use in ecdh_plain_derive() 508 * - if ctx->k->cofactor != 1, use a duplicate of ctx->k with the flag in ecdh_plain_derive() 482 const BIGNUM *cofactor; ecdh_plain_derive() local
|
| /freebsd/crypto/libecc/src/curves/ |
| H A D | ec_params.c | 110 PARAM_BUF_PTR(in_str_params->cofactor), in import_params() 111 PARAM_BUF_LEN(in_str_params->cofactor)); EG(ret, err); in import_params()
|