| /optee_os/core/lib/libtomcrypt/ |
| H A D | rsa.c | 214 size_t src_len, uint8_t *dst, size_t *dst_len) in rsadorep() argument 257 if (*dst_len < blen - offset) { in rsadorep() 258 *dst_len = blen - offset; in rsadorep() 264 *dst_len = blen - offset; in rsadorep() 265 memcpy(dst, (char *)buf + offset, *dst_len); in rsadorep() 276 size_t *dst_len) 282 size_t *dst_len) in sw_crypto_acipher_rsanopad_encrypt() argument 291 res = rsadorep(<c_key, src, src_len, dst, dst_len); in sw_crypto_acipher_rsanopad_encrypt() 298 size_t *dst_len) 304 size_t *dst_len) in sw_crypto_acipher_rsanopad_decrypt() argument [all …]
|
| H A D | acipher_helpers.h | 82 size_t src_len, uint8_t *dst, size_t *dst_len); 85 size_t src_len, uint8_t *dst, size_t *dst_len); 92 size_t *dst_len __unused) in sm2_ltc_pke_decrypt() 100 uint8_t *dst __unused, size_t *dst_len __unused) in sm2_ltc_pke_encrypt()
|
| H A D | sm2-pke.c | 110 size_t src_len, uint8_t *dst, size_t *dst_len) in sm2_ltc_pke_decrypt() argument 245 out_len = MIN(*dst_len, C2_len); in sm2_ltc_pke_decrypt() 248 *dst_len = out_len; in sm2_ltc_pke_decrypt() 333 size_t src_len, uint8_t *dst, size_t *dst_len) in sm2_ltc_pke_encrypt() argument 469 C1_len = *dst_len; in sm2_ltc_pke_encrypt() 474 if (*dst_len < C1_len + src_len + TEE_SM3_HASH_SIZE) { in sm2_ltc_pke_encrypt() 475 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_ltc_pke_encrypt() 505 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_ltc_pke_encrypt()
|
| /optee_os/core/drivers/ |
| H A D | versal_sha3_384.c | 47 static TEE_Result get_ciphertext(uint8_t *dst, size_t dst_len) in get_ciphertext() argument 58 memcpy(dst, p.buf, MIN(dst_len, (size_t)TEE_SHA384_HASH_SIZE)); in get_ciphertext() 68 uint8_t *dst, size_t dst_len) in versal_sha3_384() argument 72 if (!src_len || !dst_len || !src || !dst) in versal_sha3_384() 82 ret = get_ciphertext(dst, dst_len); in versal_sha3_384()
|
| H A D | zynqmp_csu_aes.c | 65 static TEE_Result aes_transfer_enc(const void *src, void *dst, size_t dst_len, in aes_transfer_enc() argument 68 void *p = (uint8_t *)dst + dst_len - ZYNQMP_GCM_TAG_SIZE; in aes_transfer_enc() 72 if (dst_len < ZYNQMP_GCM_TAG_SIZE) { in aes_transfer_enc() 84 ret = zynqmp_csudma_transfer(ZYNQMP_CSUDMA_DST_CHANNEL, dst, dst_len, in aes_transfer_enc() 108 (void *)src, dst_len - ZYNQMP_GCM_TAG_SIZE, in aes_transfer_enc() 279 void *dst, size_t dst_len, in zynqmp_csu_aes_decrypt_data() argument 291 if (src_len % 4 || dst_len != src_len) { in zynqmp_csu_aes_decrypt_data() 331 void *dst, size_t dst_len, in zynqmp_csu_aes_encrypt_data() argument 343 if (src_len % 4 || dst_len != ZYNQMP_CSU_AES_DST_LEN(src_len)) { in zynqmp_csu_aes_encrypt_data() 369 ret = aes_transfer_enc(src, dst, dst_len, tag, iv); in zynqmp_csu_aes_encrypt_data()
|
| H A D | versal_huk.c | 165 uint8_t *dst, size_t dst_len) in aes_gcm_encrypt() argument 258 versal_mbox_alloc(dst_len, NULL, &q); in aes_gcm_encrypt() 273 memcpy(dst, q.buf, dst_len); in aes_gcm_encrypt()
|
| /optee_os/lib/libmbedtls/core/ |
| H A D | rsa.c | 334 size_t *dst_len) 340 size_t *dst_len) in sw_crypto_acipher_rsanopad_encrypt() argument 379 if (*dst_len < rsa.len - offset) { in sw_crypto_acipher_rsanopad_encrypt() 380 *dst_len = rsa.len - offset; in sw_crypto_acipher_rsanopad_encrypt() 384 *dst_len = rsa.len - offset; in sw_crypto_acipher_rsanopad_encrypt() 385 memcpy(dst, buf + offset, *dst_len); in sw_crypto_acipher_rsanopad_encrypt() 399 size_t *dst_len) 405 size_t *dst_len) in sw_crypto_acipher_rsanopad_decrypt() argument 440 if (*dst_len < rsa.len - offset) { in sw_crypto_acipher_rsanopad_decrypt() 441 *dst_len = rsa.len - offset; in sw_crypto_acipher_rsanopad_decrypt() [all …]
|
| H A D | sm2-pke.h | 14 uint8_t *dst, size_t *dst_len); 18 size_t *dst_len);
|
| H A D | sm2-pke.c | 112 size_t *dst_len) in sm2_mbedtls_pke_decrypt() argument 212 out_len = MIN(*dst_len, C2_len); in sm2_mbedtls_pke_decrypt() 215 *dst_len = out_len; in sm2_mbedtls_pke_decrypt() 304 uint8_t *dst, size_t *dst_len) in sm2_mbedtls_pke_encrypt() argument 406 C1_len = *dst_len; in sm2_mbedtls_pke_encrypt() 411 if (*dst_len < C1_len + src_len + TEE_SM3_HASH_SIZE) { in sm2_mbedtls_pke_encrypt() 412 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_mbedtls_pke_encrypt() 442 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_mbedtls_pke_encrypt()
|
| /optee_os/core/drivers/crypto/se050/core/ |
| H A D | apdu.c | 15 uint8_t *dst_data, size_t *dst_len) in crypto_se_do_apdu() argument 21 dst_data, dst_len); in crypto_se_do_apdu()
|
| H A D | rsa.c | 235 uint8_t *dst, size_t *dst_len) in decrypt_es() argument 270 if (buf_len > *dst_len) { in decrypt_es() 271 *dst_len = buf_len; in decrypt_es() 276 *dst_len = buf_len; in decrypt_es() 290 uint8_t *dst, size_t *dst_len) in encrypt_es() argument 297 if (*dst_len < crypto_bignum_num_bytes(key->n)) { in encrypt_es() 298 *dst_len = crypto_bignum_num_bytes(key->n); in encrypt_es() 313 st = sss_se05x_asymmetric_encrypt(&ctx, src, src_len, dst, dst_len); in encrypt_es() 324 size_t src_len, uint8_t *dst, size_t *dst_len) in decrypt_nopad() argument 369 if (*dst_len < blen - offset) { in decrypt_nopad() [all …]
|
| H A D | ctr.c | 88 size_t dst_len = len; in se050_aes_ctr_update() local 95 dst_len = sizeof(c->counter); in se050_aes_ctr_update() 99 c->block, &dst_len); in se050_aes_ctr_update()
|
| /optee_os/core/crypto/ |
| H A D | crypto.c | 427 size_t *dst_len) in crypto_authenc_update_payload() argument 429 if (*dst_len < src_len) in crypto_authenc_update_payload() 431 *dst_len = src_len; in crypto_authenc_update_payload() 439 size_t *dst_len, uint8_t *dst_tag, in crypto_authenc_enc_final() argument 442 if (*dst_len < src_len) in crypto_authenc_enc_final() 444 *dst_len = src_len; in crypto_authenc_enc_final() 452 size_t *dst_len, const uint8_t *tag, in crypto_authenc_dec_final() argument 455 if (*dst_len < src_len) in crypto_authenc_dec_final() 457 *dst_len = src_len; in crypto_authenc_dec_final() 582 size_t *dst_len __unused) in crypto_acipher_rsanopad_decrypt() [all …]
|
| /optee_os/core/include/crypto/ |
| H A D | crypto.h | 72 size_t *dst_len); 75 size_t *dst_len, uint8_t *dst_tag, 79 size_t *dst_len, const uint8_t *tag, 258 uint8_t *dst, size_t *dst_len); 261 uint8_t *dst, size_t *dst_len); 266 uint8_t *dst, size_t *dst_len); 272 uint8_t *dst, size_t *dst_len); 301 uint8_t *dst, size_t *dst_len); 304 uint8_t *dst, size_t *dst_len);
|
| H A D | crypto_se.h | 38 uint8_t *dst_data, size_t *dst_len);
|
| H A D | crypto_impl.h | 418 size_t src_len, uint8_t *dst, size_t *dst_len); 440 size_t src_len, uint8_t *dst, size_t *dst_len); 527 size_t *dst_len); 531 size_t *dst_len); 539 size_t *dst_len); 548 size_t *dst_len);
|
| /optee_os/core/drivers/crypto/crypto_api/acipher/ |
| H A D | ecc.c | 352 uint8_t *dst, size_t *dst_len) in ecc_sm2_encrypt() argument 383 *dst_len = cdata.ciphertext.length + 1; in ecc_sm2_encrypt() 390 uint8_t *dst, size_t *dst_len) in ecc_encrypt() argument 405 return ecc_sm2_encrypt(key, src, src_len, dst, dst_len); in ecc_encrypt() 413 uint8_t *dst, size_t *dst_len) in ecc_sm2_decrypt() argument 467 *dst_len = cdata.plaintext.length; in ecc_sm2_decrypt() 474 uint8_t *dst, size_t *dst_len) in ecc_decrypt() argument 489 return ecc_sm2_decrypt(key, src, src_len, dst, dst_len); in ecc_decrypt()
|
| /optee_os/core/include/drivers/ |
| H A D | versal_sha3_384.h | 15 uint8_t *dst, size_t dst_len);
|
| H A D | zynqmp_csu_aes.h | 27 void *dst, size_t dst_len,
|
| /optee_os/core/tee/ |
| H A D | tee_svc_cryp.c | 3251 void *dst, uint64_t *dst_len) in tee_svc_cipher_update_helper() argument 3275 if (!dst_len) { in tee_svc_cipher_update_helper() 3283 res = get_user_u64_as_size_t(&dlen, dst_len); in tee_svc_cipher_update_helper() 3312 dst_len != NULL) { in tee_svc_cipher_update_helper() 3315 res2 = put_user_u64(dst_len, src_len); in tee_svc_cipher_update_helper() 3324 size_t src_len, void *dst, uint64_t *dst_len) in syscall_cipher_update() argument 3327 src, src_len, dst, dst_len); in syscall_cipher_update() 3331 size_t src_len, void *dst, uint64_t *dst_len) in syscall_cipher_final() argument 3334 src, src_len, dst, dst_len); in syscall_cipher_final() 4161 uint64_t *dst_len) in syscall_authenc_update_payload() argument [all …]
|
| H A D | tadb.c | 730 size_t dst_len = 0; in tee_tadb_ta_read() local 740 dst_len = l; in tee_tadb_ta_read() 746 dst_len = bb_len; in tee_tadb_ta_read() 755 size_t n = MIN(dst_len, l - num_bytes); in tee_tadb_ta_read()
|
| /optee_os/core/kernel/ |
| H A D | ree_fs_ta.c | 561 size_t dst_len = 0; in ree_fs_ta_read() local 572 dst_len = len; in ree_fs_ta_read() 578 dst_len = bb_len; in ree_fs_ta_read() 587 size_t n = MIN(dst_len, len - num_bytes); in ree_fs_ta_read()
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | ssl_tls13_keys.c | 105 unsigned char *dst, size_t *dst_len) in ssl_tls13_hkdf_encode_label() argument 137 *dst_len = total_hkdf_lbl_len; in ssl_tls13_hkdf_encode_label() 703 size_t *dst_len) in ssl_tls13_calc_finished_core() argument 757 dst, hash_len, dst_len); in ssl_tls13_calc_finished_core() 774 size_t dst_len, in mbedtls_ssl_tls13_calculate_verify_data() argument 804 if (dst_len < hash_len) { in mbedtls_ssl_tls13_calculate_verify_data()
|
| H A D | ssl_tls13_keys.h | 582 size_t dst_len,
|
| H A D | rsa.c | 2320 size_t dst_len, in rsa_rsassa_pkcs1_v15_encode() argument 2324 size_t nb_pad = dst_len; in rsa_rsassa_pkcs1_v15_encode() 2424 if (p != dst + dst_len) { in rsa_rsassa_pkcs1_v15_encode() 2425 mbedtls_platform_zeroize(dst, dst_len); in rsa_rsassa_pkcs1_v15_encode()
|