Home
last modified time | relevance | path

Searched refs:curve (Results 1 – 24 of 24) sorted by relevance

/optee_os-3.20.0/core/drivers/crypto/crypto_api/acipher/
A Decc.c18 static size_t get_ecc_key_size_bytes(uint32_t curve) in get_ecc_key_size_bytes() argument
20 switch (curve) { in get_ecc_key_size_bytes()
49 switch (curve) { in get_ecc_key_size_bits()
54 return get_ecc_key_size_bytes(curve) * 8; in get_ecc_key_size_bits()
82 if (curve == algo_curve) { in algo_is_valid()
84 " is valid", algo, curve); in algo_is_valid()
90 algo, curve); in algo_is_valid()
169 if (!algo_is_valid(key->curve, algo)) in ecc_sign()
241 if (!algo_is_valid(key->curve, algo)) in ecc_verify()
299 if (private_key->curve != public_key->curve) { in ecc_shared_secret()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/src/pk/ecc/
A Decc_set_curve_internal.c18 const ltc_ecc_curve *curve; in s_ecc_oid_lookup() local
22 for (curve = ltc_ecc_curves; curve->prime != NULL; curve++) { in s_ecc_oid_lookup()
23 if (s_ecc_cmp_hex_bn(curve->prime, key->dp.prime, bn) != 1) continue; in s_ecc_oid_lookup()
24 if (s_ecc_cmp_hex_bn(curve->order, key->dp.order, bn) != 1) continue; in s_ecc_oid_lookup()
25 if (s_ecc_cmp_hex_bn(curve->A, key->dp.A, bn) != 1) continue; in s_ecc_oid_lookup()
26 if (s_ecc_cmp_hex_bn(curve->B, key->dp.B, bn) != 1) continue; in s_ecc_oid_lookup()
27 if (s_ecc_cmp_hex_bn(curve->Gx, key->dp.base.x, bn) != 1) continue; in s_ecc_oid_lookup()
28 if (s_ecc_cmp_hex_bn(curve->Gy, key->dp.base.y, bn) != 1) continue; in s_ecc_oid_lookup()
29 if (key->dp.cofactor != curve->cofactor) continue; in s_ecc_oid_lookup()
33 if (curve->prime && curve->OID) { in s_ecc_oid_lookup()
[all …]
A Decc_import_x509.c13 const ltc_ecc_curve *curve; in s_ecc_import_x509_with_oid() local
24 if ((err = ecc_find_curve(OID, &curve)) != CRYPT_OK) { goto error; } in s_ecc_import_x509_with_oid()
25 if ((err = ecc_set_curve(curve, key)) != CRYPT_OK) { goto error; } in s_ecc_import_x509_with_oid()
A Decc_import_openssl.c14 const ltc_ecc_curve *curve; in s_ecc_import_private_with_oid() local
33 … if ((err = ecc_find_curve(OID, &curve)) != CRYPT_OK) { goto error; } in s_ecc_import_private_with_oid()
34 … if ((err = ecc_set_curve(curve, key)) != CRYPT_OK) { goto error; } in s_ecc_import_private_with_oid()
A Decc_import_pkcs8.c49 const ltc_ecc_curve *curve; in ecc_import_pkcs8() local
102 … if ((err = ecc_find_curve(OID, &curve)) != CRYPT_OK) { goto LBL_DONE; } in ecc_import_pkcs8()
103 … if ((err = ecc_set_curve(curve, key)) != CRYPT_OK) { goto LBL_DONE; } in ecc_import_pkcs8()
/optee_os-3.20.0/core/drivers/crypto/se050/core/
A Decc.c78 switch (curve) { in cipher_tee2se050()
93 switch (curve) { in curve_tee2se050()
112 switch (curve) { in curve_se0502tee()
143 switch (curve) { in ecc_get_key_size()
277 curve_tee2se050(key->curve)); in se050_inject_public_key()
285 cipher_tee2se050(key->curve), in se050_inject_public_key()
301 key_bin.curve = curve_tee2se050(key->curve); in se050_inject_public_key()
343 curve_tee2se050(key->curve)); in se050_inject_keypair()
351 cipher_tee2se050(key->curve), in se050_inject_keypair()
376 key_bin.pub.curve = curve_tee2se050(key->curve); in se050_inject_keypair()
[all …]
/optee_os-3.20.0/core/lib/libtomcrypt/
A Decc.c54 switch (curve) { in ecc_get_curve_info()
121 const ltc_ecc_curve *curve = NULL; in ecc_set_curve_from_name() local
124 ltc_res = ecc_find_curve(curve_name, &curve); in ecc_set_curve_from_name()
128 ltc_res = ecc_set_curve(curve, ltc_key); in ecc_set_curve_from_name()
332 if (private_key->curve != public_key->curve) in _ltc_ecc_shared_secret()
435 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_keypair()
442 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_keypair()
449 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_keypair()
513 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_public_key()
520 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_public_key()
[all …]
/optee_os-3.20.0/core/drivers/crypto/versal/
A Decc.c86 switch (curve) { in ecc_get_key_size()
102 static void crypto_bignum_bn2bin_eswap(uint32_t curve, in crypto_bignum_bn2bin_eswap() argument
113 if (ecc_get_key_size(curve, &bytes, &bits)) in crypto_bignum_bn2bin_eswap()
180 ret = ecc_get_key_size(key->curve, &bytes, &bits); in verify()
194 crypto_bignum_bn2bin_eswap(key->curve, key->x, x.buf); in verify()
195 crypto_bignum_bn2bin_eswap(key->curve, key->y, in verify()
198 arg.data[0] = key->curve; in verify()
218 cmd->curve = key->curve; in verify()
256 ret = ecc_get_key_size(key->curve, &bytes, &bits); in sign()
278 ephemeral.curve = key->curve; in sign()
[all …]
/optee_os-3.20.0/lib/libmbedtls/core/
A Decc.c58 switch (curve) { in ecc_get_keysize()
128 switch (curve) { in curve_to_group_id()
168 gid = curve_to_group_id(key->curve); in ecc_generate_keypair()
231 gid = curve_to_group_id(key->curve); in ecc_sign()
309 gid = curve_to_group_id(key->curve); in ecc_verify()
453 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_keypair()
460 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_keypair()
467 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_keypair()
553 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_public_key()
560 s->curve = TEE_ECC_CURVE_SM2; in crypto_asym_alloc_ecc_public_key()
[all …]
/optee_os-3.20.0/core/drivers/crypto/caam/acipher/
A Dcaam_ecc.c233 enum caam_ecc_curve curve = CAAM_ECC_UNKNOWN; in do_gen_keypair() local
246 curve = get_caam_curve(key->curve); in do_gen_keypair()
247 if (curve == CAAM_ECC_UNKNOWN) in do_gen_keypair()
332 enum caam_ecc_curve curve = CAAM_ECC_UNKNOWN; in do_sign() local
347 curve = get_caam_curve(inkey->curve); in do_sign()
348 if (curve == CAAM_ECC_UNKNOWN) in do_sign()
466 enum caam_ecc_curve curve = CAAM_ECC_UNKNOWN; in do_verify() local
481 curve = get_caam_curve(inkey->curve); in do_verify()
482 if (curve == CAAM_ECC_UNKNOWN) in do_verify()
613 curve = get_caam_curve(inpubkey->curve); in do_shared_secret()
[all …]
/optee_os-3.20.0/ta/pkcs11/src/
A Dprocessing_ec.c302 const struct supported_ecc_curve *curve = ec_curve_param + idx; in get_curve() local
304 if (size == curve->oid_size && in get_curve()
305 !TEE_MemCompare(attr, curve->oid_der, curve->oid_size)) in get_curve()
306 return curve; in get_curve()
308 if (size == curve->name_size && in get_curve()
309 !TEE_MemCompare(attr, curve->name_der, curve->name_size)) in get_curve()
310 return curve; in get_curve()
320 if (!curve) in ec_params2tee_keysize()
323 return curve->key_size; in ec_params2tee_keysize()
335 assert(curve); in ec_params2tee_curve()
[all …]
/optee_os-3.20.0/core/drivers/crypto/versal/include/
A Dipi.h28 uint32_t curve; member
36 uint32_t curve; member
/optee_os-3.20.0/core/drivers/crypto/se050/adaptors/apis/
A Dapdu.c586 k_object->curve_id = keypub->curve; in set_ecc_public()
589 keypub->curve, in set_ecc_public()
611 k_object->curve_id = keypair->pub.curve; in set_ecc_private()
614 keypair->pub.curve, in set_ecc_private()
641 k_object->curve_id = keypair->pub.curve; in set_ecc_pair()
644 keypair->pub.curve, in set_ecc_pair()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/
A Decjpake.h129 mbedtls_ecp_group_id curve,
A Dpsa_util.h167 psa_ecc_family_t curve, size_t bits, in mbedtls_psa_get_ecc_oid_from_id() argument
170 switch( curve ) in mbedtls_psa_get_ecc_oid_from_id()
/optee_os-3.20.0/core/drivers/crypto/se050/adaptors/include/
A Dse050_apdu_apis.h62 uint32_t curve; member
/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/
A Dpkwrite.c269 psa_ecc_family_t curve; in mbedtls_pk_write_pubkey_der() local
279 curve = PSA_KEY_TYPE_ECC_GET_FAMILY( key_type ); in mbedtls_pk_write_pubkey_der()
280 if( curve == 0 ) in mbedtls_pk_write_pubkey_der()
283 ret = mbedtls_psa_get_ecc_oid_from_id( curve, bits, &oid, &oid_len ); in mbedtls_pk_write_pubkey_der()
A Dpk_wrap.c556 psa_ecc_family_t curve = in ecdsa_verify_wrap() local
561 if( curve == 0 ) in ecdsa_verify_wrap()
573 psa_set_key_type( &attributes, PSA_KEY_TYPE_ECC_PUBLIC_KEY( curve ) ); in ecdsa_verify_wrap()
A Dssl_srv.c3457 const mbedtls_ecp_curve_info **curve = NULL; in ssl_prepare_server_key_exchange() local
3464 for( curve = ssl->handshake->curves; *curve != NULL; curve++ ) in ssl_prepare_server_key_exchange()
3465 if( (*curve)->grp_id == *gid ) in ssl_prepare_server_key_exchange()
3469 if( curve == NULL || *curve == NULL ) in ssl_prepare_server_key_exchange()
3475 MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDHE curve: %s", (*curve)->name ) ); in ssl_prepare_server_key_exchange()
3478 (*curve)->grp_id ) ) != 0 ) in ssl_prepare_server_key_exchange()
A Decjpake.c104 mbedtls_ecp_group_id curve, in mbedtls_ecjpake_setup() argument
120 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); in mbedtls_ecjpake_setup()
/optee_os-3.20.0/core/include/crypto/
A Dcrypto.h159 uint32_t curve; /* Curve type */ member
167 uint32_t curve; /* Curve type */ member
179 uint32_t curve; member
/optee_os-3.20.0/core/drivers/crypto/caam/include/
A Dcaam_desc_defines.h687 #define PDB_ECC_ECDSEL(curve) SHIFT_U32((curve) & 0x3F, 7) argument
/optee_os-3.20.0/core/tee/
A Dtee_svc_cryp.c360 RAW_DATA(struct ecc_public_key, curve)
391 RAW_DATA(struct ecc_keypair, curve)
1761 static TEE_Result get_ec_key_size(uint32_t curve, size_t *key_size) in get_ec_key_size() argument
1763 switch (curve) { in get_ec_key_size()
3288 peer_key->curve = TEE_ECC_CURVE_SM2; in get_sm2_kep_params()
3289 peer_eph_key->curve = TEE_ECC_CURVE_SM2; in get_sm2_kep_params()
3489 key_public.curve = ((struct ecc_keypair *)ko->attr)->curve; in syscall_cryp_derive_key()
/optee_os-3.20.0/lib/libmbedtls/mbedtls/
A DChangeLog39 * Fix a bug in (D)TLS curve negotiation: when MBEDTLS_USE_PSA_CRYPTO was
41 client would fail to check that the curve selected by the server for
43 accept any curve that it supported, even if that curve was not allowed
76 * Fix order value of curve x448.
698 * In the PSA API, rename the types of elliptic curve and Diffie-Hellman
777 curve is secp192k1. Fixes #2017.
1009 existing code is that elliptic curve key types no longer encode the
1010 exact curve: a psa_ecc_curve_t or psa_key_type_t value only encodes
1011 a curve family and the key size determines the exact curve (for example,
3112 curve picked by the server was actually allowed.
[all …]

Completed in 72 milliseconds