Home
last modified time | relevance | path

Searched refs:curve_bytes (Results 1 – 6 of 6) sorted by relevance

/optee_os/lib/libmbedtls/mbedtls/library/
H A Dpsa_crypto_ecp.c98 size_t curve_bytes = data_length; in mbedtls_psa_ecp_load_representation() local
112 curve_bytes = data_length / 2; in mbedtls_psa_ecp_load_representation()
123 if (curve_bytes != PSA_BITS_TO_BYTES(curve_bits)) { in mbedtls_psa_ecp_load_representation()
130 curve_bits = PSA_BYTES_TO_BITS(curve_bytes); in mbedtls_psa_ecp_load_representation()
372 size_t curve_bytes; in mbedtls_psa_ecdsa_sign_hash() local
384 curve_bytes = PSA_BITS_TO_BYTES(ecp->grp.pbits); in mbedtls_psa_ecdsa_sign_hash()
388 if (signature_size < 2 * curve_bytes) { in mbedtls_psa_ecdsa_sign_hash()
417 curve_bytes)); in mbedtls_psa_ecdsa_sign_hash()
419 signature + curve_bytes, in mbedtls_psa_ecdsa_sign_hash()
420 curve_bytes)); in mbedtls_psa_ecdsa_sign_hash()
[all …]
H A Dpk_wrap.c968 const size_t curve_bytes = PSA_BITS_TO_BYTES(curve_bits); in eckey_check_pair_psa() local
978 prv_key_buf, curve_bytes); in eckey_check_pair_psa()
984 status = psa_import_key(&key_attr, prv_key_buf, curve_bytes, &key_id); in eckey_check_pair_psa()
1011 if (memcmp(prv_key_buf, pub_key_buf, curve_bytes) != 0) { in eckey_check_pair_psa()
/optee_os/core/drivers/crypto/hisilicon/
H A Dhpre_montgomery.c180 uint32_t dsize = msg->curve_bytes; in hpre_montgomery_params_pretreatment()
236 memcpy(p, curve->p, msg->curve_bytes); in hpre_montgomery_params_fill()
237 memcpy(a, curve->a, msg->curve_bytes); in hpre_montgomery_params_fill()
238 memcpy(k, privkey, msg->curve_bytes); in hpre_montgomery_params_fill()
239 msg->x_bytes = msg->curve_bytes; in hpre_montgomery_params_fill()
245 ret = hpre_bin_from_crypto_bin(p, p, msg->key_bytes, msg->curve_bytes); in hpre_montgomery_params_fill()
251 ret = hpre_bin_from_crypto_bin(a, a, msg->key_bytes, msg->curve_bytes); in hpre_montgomery_params_fill()
257 ret = hpre_bin_from_crypto_bin(k, k, msg->key_bytes, msg->curve_bytes); in hpre_montgomery_params_fill()
281 msg->curve_bytes = BITS_TO_BYTES(curve->key_bits); in hpre_montgomery_request_init()
348 if (hpre_bin_to_crypto_bin(rx, rx, msg->key_bytes, msg->curve_bytes)) { in hpre_montgomery_parse_sqe()
[all …]
H A Dhpre_ecc.c386 uint32_t curve_bytes, in hpre_ecc_curve_to_hpre_bin() argument
391 ret = hpre_bin_from_crypto_bin(p, p, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
397 ret = hpre_bin_from_crypto_bin(a, a, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
403 ret = hpre_bin_from_crypto_bin(b, b, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
410 ret = hpre_bin_from_crypto_bin(n, n, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
418 ret = hpre_bin_from_crypto_bin(gx, gx, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
426 ret = hpre_bin_from_crypto_bin(gy, gy, key_bytes, curve_bytes); in hpre_ecc_curve_to_hpre_bin()
720 msg->curve_bytes, msg->key_bytes); in hpre_ecc_dh_transfer_key()
767 memcpy(p, curve->p, msg->curve_bytes); in hpre_ecc_dh_params_fill()
768 memcpy(a, curve->a, msg->curve_bytes); in hpre_ecc_dh_params_fill()
[all …]
H A Dhpre_montgomery.h29 uint32_t curve_bytes; member
H A Dhpre_ecc.h72 uint32_t curve_bytes; member