/optee_os/core/lib/libtomcrypt/ |
A D | rsa.c | 224 if (*dst_len < blen - offset) { in rsadorep() 225 *dst_len = blen - offset; in rsadorep() 231 *dst_len = blen - offset; in rsadorep() 282 uint8_t *dst, size_t *dst_len) in crypto_acipher_rsaes_decrypt() argument 358 if (*dst_len < blen) { in crypto_acipher_rsaes_decrypt() 359 *dst_len = blen; in crypto_acipher_rsaes_decrypt() 365 *dst_len = blen; in crypto_acipher_rsaes_decrypt() 379 uint8_t *dst, size_t *dst_len) in crypto_acipher_rsaes_encrypt() argument 391 if (*dst_len < mod_size) { in crypto_acipher_rsaes_encrypt() 392 *dst_len = mod_size; in crypto_acipher_rsaes_encrypt() [all …]
|
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()
|
A D | sm2-pke.c | 109 size_t src_len, uint8_t *dst, size_t *dst_len) in sm2_ltc_pke_decrypt() argument 244 out_len = MIN(*dst_len, C2_len); in sm2_ltc_pke_decrypt() 247 *dst_len = out_len; in sm2_ltc_pke_decrypt() 332 size_t src_len, uint8_t *dst, size_t *dst_len) in sm2_ltc_pke_encrypt() argument 468 C1_len = *dst_len; in sm2_ltc_pke_encrypt() 473 if (*dst_len < C1_len + src_len + TEE_SM3_HASH_SIZE) { in sm2_ltc_pke_encrypt() 474 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_ltc_pke_encrypt() 504 *dst_len = C1_len + src_len + TEE_SM3_HASH_SIZE; in sm2_ltc_pke_encrypt()
|
/optee_os/lib/libmbedtls/core/ |
A D | rsa.c | 284 *dst_len = rsa.len - offset; in crypto_acipher_rsanopad_encrypt() 288 *dst_len = rsa.len - offset; in crypto_acipher_rsanopad_encrypt() 337 *dst_len = rsa.len - offset; in crypto_acipher_rsanopad_decrypt() 341 *dst_len = rsa.len - offset; in crypto_acipher_rsanopad_decrypt() 422 if (*dst_len < blen) { in crypto_acipher_rsaes_decrypt() 423 *dst_len = blen; in crypto_acipher_rsaes_decrypt() 429 *dst_len = blen; in crypto_acipher_rsaes_decrypt() 460 if (*dst_len < mod_size) { in crypto_acipher_rsaes_encrypt() 461 *dst_len = mod_size; in crypto_acipher_rsaes_encrypt() 465 *dst_len = mod_size; in crypto_acipher_rsaes_encrypt() [all …]
|
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()
|
A D | sm2-pke.h | 14 uint8_t *dst, size_t *dst_len); 18 size_t *dst_len);
|
/optee_os/core/drivers/ |
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()
|
/optee_os/core/crypto/ |
A D | crypto.c | 395 size_t *dst_len) in crypto_authenc_update_payload() argument 397 if (*dst_len < src_len) in crypto_authenc_update_payload() 399 *dst_len = src_len; in crypto_authenc_update_payload() 410 if (*dst_len < src_len) in crypto_authenc_enc_final() 412 *dst_len = src_len; in crypto_authenc_enc_final() 423 if (*dst_len < src_len) in crypto_authenc_dec_final() 425 *dst_len = src_len; in crypto_authenc_dec_final() 550 size_t *dst_len __unused) in crypto_acipher_rsanopad_decrypt() 559 size_t *dst_len __unused) in crypto_acipher_rsanopad_encrypt() 571 size_t *dst_len __unused) in crypto_acipher_rsaes_decrypt() [all …]
|
/optee_os/core/drivers/crypto/se050/core/ |
A D | rsa.c | 190 uint8_t *dst, size_t *dst_len) in decrypt_es() argument 225 if (buf_len > *dst_len) { in decrypt_es() 226 *dst_len = buf_len; in decrypt_es() 231 *dst_len = buf_len; in decrypt_es() 324 if (*dst_len < blen - offset) { in decrypt_nopad() 325 *dst_len = blen - offset; in decrypt_nopad() 330 *dst_len = blen - offset; in decrypt_nopad() 331 memcpy(dst, buf + offset, *dst_len); in decrypt_nopad() 386 if (*dst_len < blen - offset) { in encrypt_nopad() 387 *dst_len = blen - offset; in encrypt_nopad() [all …]
|
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()
|
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/include/crypto/ |
A D | crypto.h | 71 size_t *dst_len); 74 size_t *dst_len, uint8_t *dst_tag, 78 size_t *dst_len, const uint8_t *tag, 210 uint8_t *dst, size_t *dst_len); 213 uint8_t *dst, size_t *dst_len); 217 uint8_t *dst, size_t *dst_len); 222 uint8_t *dst, size_t *dst_len); 251 uint8_t *dst, size_t *dst_len); 254 uint8_t *dst, size_t *dst_len);
|
A D | crypto_se.h | 38 uint8_t *dst_data, size_t *dst_len);
|
A D | crypto_impl.h | 332 size_t src_len, uint8_t *dst, size_t *dst_len); 354 size_t src_len, uint8_t *dst, size_t *dst_len);
|
/optee_os/core/include/drivers/ |
A D | zynqmp_csu_aes.h | 27 void *dst, size_t dst_len,
|
/optee_os/core/tee/ |
A D | tee_svc_cryp.c | 2590 void *dst, uint64_t *dst_len) in tee_svc_cipher_update_helper() argument 2611 if (!dst_len) { in tee_svc_cipher_update_helper() 2646 dst_len != NULL) { in tee_svc_cipher_update_helper() 2661 src, src_len, dst, dst_len); in syscall_cipher_update() 2668 src, src_len, dst, dst_len); in syscall_cipher_final() 3290 uint64_t *dst_len) in syscall_authenc_update_payload() argument 3376 if (!dst_len) { in syscall_authenc_enc_final() 3416 if (dst_len != NULL) { in syscall_authenc_enc_final() 3460 if (!dst_len) { in syscall_authenc_dec_final() 3491 dst_len != NULL) { in syscall_authenc_dec_final() [all …]
|
/optee_os/lib/libmbedtls/mbedtls/library/ |
A D | rsa.c | 2002 size_t dst_len, in rsa_rsassa_pkcs1_v15_encode() argument 2006 size_t nb_pad = dst_len; in rsa_rsassa_pkcs1_v15_encode() 2102 if( p != dst + dst_len ) in rsa_rsassa_pkcs1_v15_encode() 2104 mbedtls_platform_zeroize( dst, dst_len ); in rsa_rsassa_pkcs1_v15_encode()
|