| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | psa_crypto_pake.c | 128 static psa_status_t psa_pake_ecjpake_setup(mbedtls_psa_pake_operation_t *operation) in psa_pake_ecjpake_setup() argument 132 mbedtls_ecjpake_init(&operation->ctx.jpake); in psa_pake_ecjpake_setup() 134 ret = mbedtls_ecjpake_setup(&operation->ctx.jpake, in psa_pake_ecjpake_setup() 135 operation->role, in psa_pake_ecjpake_setup() 138 operation->password, in psa_pake_ecjpake_setup() 139 operation->password_len); in psa_pake_ecjpake_setup() 141 mbedtls_platform_zeroize(operation->password, operation->password_len); in psa_pake_ecjpake_setup() 155 psa_status_t mbedtls_psa_pake_setup(mbedtls_psa_pake_operation_t *operation, in mbedtls_psa_pake_setup() argument 184 operation->password = mbedtls_calloc(1, password_len); in mbedtls_psa_pake_setup() 185 if (operation->password == NULL) { in mbedtls_psa_pake_setup() [all …]
|
| H A D | psa_crypto_aead.c | 27 mbedtls_psa_aead_operation_t *operation, in psa_aead_setup() argument 48 operation->alg = PSA_ALG_CCM; in psa_aead_setup() 56 mbedtls_ccm_init(&operation->ctx.ccm); in psa_aead_setup() 58 mbedtls_ccm_setkey(&operation->ctx.ccm, cipher_id, in psa_aead_setup() 68 operation->alg = PSA_ALG_GCM; in psa_aead_setup() 76 mbedtls_gcm_init(&operation->ctx.gcm); in psa_aead_setup() 78 mbedtls_gcm_setkey(&operation->ctx.gcm, cipher_id, in psa_aead_setup() 88 operation->alg = PSA_ALG_CHACHA20_POLY1305; in psa_aead_setup() 94 mbedtls_chachapoly_init(&operation->ctx.chachapoly); in psa_aead_setup() 96 mbedtls_chachapoly_setkey(&operation->ctx.chachapoly, in psa_aead_setup() [all …]
|
| H A D | psa_crypto_hash.c | 22 mbedtls_psa_hash_operation_t *operation) in mbedtls_psa_hash_abort() argument 24 switch (operation->alg) { in mbedtls_psa_hash_abort() 32 mbedtls_md5_free(&operation->ctx.md5); in mbedtls_psa_hash_abort() 37 mbedtls_ripemd160_free(&operation->ctx.ripemd160); in mbedtls_psa_hash_abort() 42 mbedtls_sha1_free(&operation->ctx.sha1); in mbedtls_psa_hash_abort() 47 mbedtls_sha256_free(&operation->ctx.sha256); in mbedtls_psa_hash_abort() 52 mbedtls_sha256_free(&operation->ctx.sha256); in mbedtls_psa_hash_abort() 57 mbedtls_sha512_free(&operation->ctx.sha512); in mbedtls_psa_hash_abort() 62 mbedtls_sha512_free(&operation->ctx.sha512); in mbedtls_psa_hash_abort() 81 mbedtls_sha3_free(&operation->ctx.sha3); in mbedtls_psa_hash_abort() [all …]
|
| H A D | psa_crypto_mac.c | 157 static psa_status_t cmac_setup(mbedtls_psa_mac_operation_t *operation, in cmac_setup() argument 184 ret = mbedtls_cipher_setup(&operation->ctx.cmac, cipher_info); in cmac_setup() 189 ret = mbedtls_cipher_cmac_starts(&operation->ctx.cmac, in cmac_setup() 203 mbedtls_psa_mac_operation_t *operation, in mac_init() argument 208 operation->alg = alg; in mac_init() 211 if (PSA_ALG_FULL_LENGTH_MAC(operation->alg) == PSA_ALG_CMAC) { in mac_init() 212 mbedtls_cipher_init(&operation->ctx.cmac); in mac_init() 217 if (PSA_ALG_IS_HMAC(operation->alg)) { in mac_init() 219 operation->ctx.hmac.alg = 0; in mac_init() 224 (void) operation; in mac_init() [all …]
|
| H A D | psa_crypto_driver_wrappers.h | 461 psa_sign_hash_interruptible_operation_t *operation ) in psa_driver_wrapper_sign_hash_get_num_ops() argument 463 switch( operation->id ) in psa_driver_wrapper_sign_hash_get_num_ops() 470 return(mbedtls_psa_sign_hash_get_num_ops(&operation->ctx.mbedtls_ctx)); in psa_driver_wrapper_sign_hash_get_num_ops() 485 psa_verify_hash_interruptible_operation_t *operation ) in psa_driver_wrapper_verify_hash_get_num_ops() argument 487 switch( operation->id ) in psa_driver_wrapper_verify_hash_get_num_ops() 494 return (mbedtls_psa_verify_hash_get_num_ops(&operation->ctx.mbedtls_ctx)); in psa_driver_wrapper_verify_hash_get_num_ops() 510 psa_sign_hash_interruptible_operation_t *operation, in psa_driver_wrapper_sign_hash_start() argument 536 operation->id = PSA_CRYPTO_MBED_TLS_DRIVER_ID; in psa_driver_wrapper_sign_hash_start() 537 status = mbedtls_psa_sign_hash_start( &operation->ctx.mbedtls_ctx, in psa_driver_wrapper_sign_hash_start() 555 psa_sign_hash_interruptible_operation_t *operation, in psa_driver_wrapper_sign_hash_complete() argument [all …]
|
| H A D | psa_crypto_cipher.c | 280 mbedtls_psa_cipher_operation_t *operation, in psa_cipher_setup() argument 293 mbedtls_cipher_init(&operation->ctx.cipher); in psa_cipher_setup() 295 operation->alg = alg; in psa_cipher_setup() 303 ret = mbedtls_cipher_setup(&operation->ctx.cipher, cipher_info); in psa_cipher_setup() 314 ret = mbedtls_cipher_setkey(&operation->ctx.cipher, in psa_cipher_setup() 320 ret = mbedtls_cipher_setkey(&operation->ctx.cipher, key_buffer, in psa_cipher_setup() 331 ret = mbedtls_cipher_set_padding_mode(&operation->ctx.cipher, in psa_cipher_setup() 335 ret = mbedtls_cipher_set_padding_mode(&operation->ctx.cipher, in psa_cipher_setup() 349 operation->block_length = (PSA_ALG_IS_STREAM_CIPHER(alg) ? 1 : in psa_cipher_setup() 351 operation->iv_length = PSA_CIPHER_IV_LENGTH(key_type, alg); in psa_cipher_setup() [all …]
|
| H A D | psa_crypto.c | 2374 psa_status_t psa_hash_abort(psa_hash_operation_t *operation) in psa_hash_abort() argument 2377 if (operation->id == 0) { in psa_hash_abort() 2381 psa_status_t status = psa_driver_wrapper_hash_abort(operation); in psa_hash_abort() 2382 operation->id = 0; in psa_hash_abort() 2387 psa_status_t psa_hash_setup(psa_hash_operation_t *operation, in psa_hash_setup() argument 2393 if (operation->id != 0) { in psa_hash_setup() 2408 memset(&operation->ctx, 0, sizeof(operation->ctx)); in psa_hash_setup() 2410 status = psa_driver_wrapper_hash_setup(operation, alg); in psa_hash_setup() 2414 psa_hash_abort(operation); in psa_hash_setup() 2420 psa_status_t psa_hash_update(psa_hash_operation_t *operation, in psa_hash_update() argument [all …]
|
| H A D | psa_crypto_aead.h | 176 mbedtls_psa_aead_operation_t *operation, 219 mbedtls_psa_aead_operation_t *operation, 254 mbedtls_psa_aead_operation_t *operation, 295 mbedtls_psa_aead_operation_t *operation, 332 mbedtls_psa_aead_operation_t *operation, 392 mbedtls_psa_aead_operation_t *operation, 464 mbedtls_psa_aead_operation_t *operation, 497 mbedtls_psa_aead_operation_t *operation);
|
| H A D | psa_crypto_mac.h | 86 mbedtls_psa_mac_operation_t *operation, 121 mbedtls_psa_mac_operation_t *operation, 153 mbedtls_psa_mac_operation_t *operation, 195 mbedtls_psa_mac_operation_t *operation, 236 mbedtls_psa_mac_operation_t *operation, 262 mbedtls_psa_mac_operation_t *operation);
|
| H A D | psa_crypto_pake.h | 37 psa_status_t mbedtls_psa_pake_setup(mbedtls_psa_pake_operation_t *operation, 74 psa_status_t mbedtls_psa_pake_output(mbedtls_psa_pake_operation_t *operation, 112 psa_status_t mbedtls_psa_pake_input(mbedtls_psa_pake_operation_t *operation, 140 mbedtls_psa_pake_operation_t *operation, 157 psa_status_t mbedtls_psa_pake_abort(mbedtls_psa_pake_operation_t *operation);
|
| H A D | psa_crypto_cipher.h | 79 mbedtls_psa_cipher_operation_t *operation, 109 mbedtls_psa_cipher_operation_t *operation, 137 mbedtls_psa_cipher_operation_t *operation, 162 mbedtls_psa_cipher_operation_t *operation, 193 mbedtls_psa_cipher_operation_t *operation, 211 psa_status_t mbedtls_psa_cipher_abort(mbedtls_psa_cipher_operation_t *operation);
|
| H A D | psa_crypto_hash.h | 81 mbedtls_psa_hash_operation_t *operation, 140 mbedtls_psa_hash_operation_t *operation, 179 mbedtls_psa_hash_operation_t *operation, 209 mbedtls_psa_hash_operation_t *operation);
|
| H A D | ssl_cookie.c | 194 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT; in mbedtls_ssl_cookie_write() local 218 status = psa_mac_sign_setup(&operation, ctx->psa_hmac_key, in mbedtls_ssl_cookie_write() 225 status = psa_mac_update(&operation, *p - 4, 4); in mbedtls_ssl_cookie_write() 231 status = psa_mac_update(&operation, cli_id, cli_id_len); in mbedtls_ssl_cookie_write() 237 status = psa_mac_sign_finish(&operation, *p, COOKIE_MD_OUTLEN, in mbedtls_ssl_cookie_write() 267 status = psa_mac_abort(&operation); in mbedtls_ssl_cookie_write() 283 psa_mac_operation_t operation = PSA_MAC_OPERATION_INIT; in mbedtls_ssl_cookie_check() local 302 status = psa_mac_verify_setup(&operation, ctx->psa_hmac_key, in mbedtls_ssl_cookie_check() 309 status = psa_mac_update(&operation, cookie, 4); in mbedtls_ssl_cookie_check() 315 status = psa_mac_update(&operation, cli_id, in mbedtls_ssl_cookie_check() [all …]
|
| H A D | psa_crypto_core.h | 707 const mbedtls_psa_sign_hash_interruptible_operation_t *operation); 728 const mbedtls_psa_verify_hash_interruptible_operation_t *operation); 763 mbedtls_psa_sign_hash_interruptible_operation_t *operation, 810 mbedtls_psa_sign_hash_interruptible_operation_t *operation, 830 mbedtls_psa_sign_hash_interruptible_operation_t *operation); 868 mbedtls_psa_verify_hash_interruptible_operation_t *operation, 905 mbedtls_psa_verify_hash_interruptible_operation_t *operation); 923 mbedtls_psa_verify_hash_interruptible_operation_t *operation);
|
| H A D | cipher.c | 256 dst->operation = src->operation; in mbedtls_cipher_clone() 345 const mbedtls_operation_t operation) in mbedtls_cipher_setkey() argument 347 if (operation != MBEDTLS_ENCRYPT && operation != MBEDTLS_DECRYPT) { in mbedtls_cipher_setkey() 355 MBEDTLS_DECRYPT == operation) { in mbedtls_cipher_setkey() 413 ctx->operation = operation; in mbedtls_cipher_setkey() 424 ctx->operation = operation; in mbedtls_cipher_setkey() 430 if (MBEDTLS_ENCRYPT == operation || in mbedtls_cipher_setkey() 438 if (MBEDTLS_DECRYPT == operation) { in mbedtls_cipher_setkey() 443 if (operation == MBEDTLS_ENCRYPT || operation == MBEDTLS_DECRYPT) { in mbedtls_cipher_setkey() 512 ctx->operation, in mbedtls_cipher_set_iv() [all …]
|
| H A D | cipher_wrap.c | 175 static int aes_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, in aes_crypt_ecb_wrap() argument 178 return mbedtls_aes_crypt_ecb((mbedtls_aes_context *) ctx, operation, input, output); in aes_crypt_ecb_wrap() 182 static int aes_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t length, in aes_crypt_cbc_wrap() argument 185 return mbedtls_aes_crypt_cbc((mbedtls_aes_context *) ctx, operation, length, iv, input, in aes_crypt_cbc_wrap() 191 static int aes_crypt_cfb128_wrap(void *ctx, mbedtls_operation_t operation, in aes_crypt_cfb128_wrap() argument 195 return mbedtls_aes_crypt_cfb128((mbedtls_aes_context *) ctx, operation, length, iv_off, iv, in aes_crypt_cfb128_wrap() 220 static int aes_crypt_xts_wrap(void *ctx, mbedtls_operation_t operation, in aes_crypt_xts_wrap() argument 229 switch (operation) { in aes_crypt_xts_wrap() 797 static int camellia_crypt_ecb_wrap(void *ctx, mbedtls_operation_t operation, in camellia_crypt_ecb_wrap() argument 800 return mbedtls_camellia_crypt_ecb((mbedtls_camellia_context *) ctx, operation, input, in camellia_crypt_ecb_wrap() [all …]
|
| H A D | ctr_drbg.c | 50 status = psa_cipher_encrypt_setup(&psa_ctx->operation, psa_ctx->key_id, PSA_ALG_ECB_NO_PADDING); in ctr_drbg_setup_psa_context() 62 psa_cipher_abort(&psa_ctx->operation); in ctr_drbg_destroy_psa_contex() 65 psa_ctx->operation = psa_cipher_operation_init(); in ctr_drbg_destroy_psa_contex() 78 ctx->psa_ctx.operation = psa_cipher_operation_init(); in mbedtls_ctr_drbg_init() 177 psa_ctx.operation = psa_cipher_operation_init(); in block_cipher_df() 242 status = psa_cipher_update(&psa_ctx.operation, chain, MBEDTLS_CTR_DRBG_BLOCKSIZE, in block_cipher_df() 286 status = psa_cipher_update(&psa_ctx.operation, iv, MBEDTLS_CTR_DRBG_BLOCKSIZE, in block_cipher_df() 356 status = psa_cipher_update(&ctx->psa_ctx.operation, ctx->counter, sizeof(ctx->counter), in ctr_drbg_update_internal() 662 status = psa_cipher_update(&ctx->psa_ctx.operation, ctx->counter, sizeof(ctx->counter), in mbedtls_ctr_drbg_random_with_add()
|
| H A D | ssl_tls13_keys.c | 151 psa_key_derivation_operation_t operation = in mbedtls_ssl_tls13_hkdf_expand_label() local 181 status = psa_key_derivation_setup(&operation, PSA_ALG_HKDF_EXPAND(hash_alg)); in mbedtls_ssl_tls13_hkdf_expand_label() 187 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label() 196 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label() 205 status = psa_key_derivation_output_bytes(&operation, in mbedtls_ssl_tls13_hkdf_expand_label() 214 abort_status = psa_key_derivation_abort(&operation); in mbedtls_ssl_tls13_hkdf_expand_label() 349 psa_key_derivation_operation_t operation = in mbedtls_ssl_tls13_evolve_secret() local 383 status = psa_key_derivation_setup(&operation, in mbedtls_ssl_tls13_evolve_secret() 390 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_evolve_secret() 399 status = psa_key_derivation_input_bytes(&operation, in mbedtls_ssl_tls13_evolve_secret() [all …]
|
| /optee_os/lib/libutee/ |
| H A D | tee_api_operations.c | 38 TEE_Result TEE_AllocateOperation(TEE_OperationHandle *operation, in TEE_AllocateOperation() argument 50 if (!operation) in TEE_AllocateOperation() 396 *operation = op; in TEE_AllocateOperation() 418 void TEE_FreeOperation(TEE_OperationHandle operation) in TEE_FreeOperation() argument 422 if (operation == TEE_HANDLE_NULL) in TEE_FreeOperation() 430 res = _utee_cryp_state_free(operation->state); in TEE_FreeOperation() 434 TEE_Free(operation->buffer); in TEE_FreeOperation() 435 TEE_Free(operation); in TEE_FreeOperation() 438 void __GP11_TEE_FreeOperation(TEE_OperationHandle operation) in __GP11_TEE_FreeOperation() argument 440 if (operation == TEE_HANDLE_NULL) in __GP11_TEE_FreeOperation() [all …]
|
| /optee_os/lib/libmbedtls/mbedtls/include/psa/ |
| H A D | crypto.h | 1004 psa_status_t psa_hash_setup(psa_hash_operation_t *operation, 1030 psa_status_t psa_hash_update(psa_hash_operation_t *operation, 1076 psa_status_t psa_hash_finish(psa_hash_operation_t *operation, 1117 psa_status_t psa_hash_verify(psa_hash_operation_t *operation, 1146 psa_status_t psa_hash_abort(psa_hash_operation_t *operation); 1373 psa_status_t psa_mac_sign_setup(psa_mac_operation_t *operation, 1435 psa_status_t psa_mac_verify_setup(psa_mac_operation_t *operation, 1465 psa_status_t psa_mac_update(psa_mac_operation_t *operation, 1514 psa_status_t psa_mac_sign_finish(psa_mac_operation_t *operation, 1557 psa_status_t psa_mac_verify_finish(psa_mac_operation_t *operation, [all …]
|
| H A D | crypto_extra.h | 1480 psa_status_t psa_pake_setup(psa_pake_operation_t *operation, 1528 psa_status_t psa_pake_set_password_key(psa_pake_operation_t *operation, 1568 psa_status_t psa_pake_set_user(psa_pake_operation_t *operation, 1610 psa_status_t psa_pake_set_peer(psa_pake_operation_t *operation, 1652 psa_status_t psa_pake_set_role(psa_pake_operation_t *operation, 1710 psa_status_t psa_pake_output(psa_pake_operation_t *operation, 1765 psa_status_t psa_pake_input(psa_pake_operation_t *operation, 1828 psa_status_t psa_pake_get_implicit_key(psa_pake_operation_t *operation, 1855 psa_status_t psa_pake_abort(psa_pake_operation_t *operation);
|
| /optee_os/lib/libutee/include/ |
| H A D | tee_internal_api.h | 293 TEE_Result TEE_AllocateOperation(TEE_OperationHandle *operation, 297 void TEE_FreeOperation(TEE_OperationHandle operation); 298 void __GP11_TEE_FreeOperation(TEE_OperationHandle operation); 300 void TEE_GetOperationInfo(TEE_OperationHandle operation, 304 TEE_GetOperationInfoMultiple(TEE_OperationHandle operation, 308 __GP11_TEE_GetOperationInfoMultiple(TEE_OperationHandle operation, 312 void TEE_ResetOperation(TEE_OperationHandle operation); 314 TEE_Result TEE_SetOperationKey(TEE_OperationHandle operation, 316 TEE_Result __GP11_TEE_SetOperationKey(TEE_OperationHandle operation, 319 TEE_Result TEE_SetOperationKey2(TEE_OperationHandle operation, [all …]
|
| /optee_os/core/drivers/ |
| H A D | ls_i2c.c | 241 struct i2c_operation *operation, in i2c_read() argument 255 if (operation->length_in_bytes > 1) { in i2c_read() 263 for (n = 0; n < operation->length_in_bytes; n++) { in i2c_read() 267 if (n == (operation->length_in_bytes - 2)) { in i2c_read() 270 } else if (n == (operation->length_in_bytes - 1)) { in i2c_read() 285 operation->buffer[n] = io_read8((vaddr_t)®s->ibdr); in i2c_read() 298 struct i2c_operation *operation) in i2c_write() argument 311 for (n = 0; n < operation->length_in_bytes; n++) { in i2c_write() 312 io_write8((vaddr_t)®s->ibdr, operation->buffer[n]); in i2c_write() 378 struct i2c_operation *operation = NULL; in i2c_bus_xfer() local [all …]
|
| /optee_os/core/drivers/crypto/caam/ |
| H A D | caam_desc.c | 116 uint32_t operation = pre_op; in caam_desc_add_dmaobj() local 121 operation |= CMD_SGT; in caam_desc_add_dmaobj() 156 operation |= op_length; in caam_desc_add_dmaobj() 158 operation |= op_ext_length; in caam_desc_add_dmaobj() 160 caam_desc_add_word(desc, operation); in caam_desc_add_dmaobj()
|
| /optee_os/core/drivers/crypto/caam/acipher/ |
| H A D | caam_rsa.c | 59 uint32_t operation); 61 uint32_t operation); 1226 uint32_t operation) in do_caam_encrypt() argument 1292 caam_desc_add_word(desc, operation); in do_caam_encrypt() 1358 uint32_t operation) in do_caam_decrypt() argument 1403 if ((operation & PROT_RSA_FMT_MASK) == PROT_RSA_FMT(PKCS_V1_5)) { in do_caam_decrypt() 1528 operation |= PROT_RSA_DEC_KEYFORM(key.format); in do_caam_decrypt() 1534 operation |= PROT_RSA_KEY_ENC(NONE); in do_caam_decrypt() 1537 operation |= PROT_RSA_KEY_ENC(ECB); in do_caam_decrypt() 1540 operation |= PROT_RSA_KEY_ENC(CCM); in do_caam_decrypt() [all …]
|