Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 53) sorted by relevance

123

/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/codesafe/src/psa_driver_api/src/
Dcc3xx_internal_gcm.c84 static psa_status_t gcm_calc_h(AesGcmContext_t *context) in gcm_calc_h() argument
91 context->processMode = DRV_AESGCM_Process_CalcH; in gcm_calc_h()
94 rc = SetDataBuffersInfo((uint8_t *)(context->tempBuf), in gcm_calc_h()
96 (uint8_t *)(context->H), AES_128_BIT_KEY_SIZE, in gcm_calc_h()
105 rc = ProcessAesGcm(context, &inBuffInfo, &outBuffInfo, in gcm_calc_h()
115 static psa_status_t gcm_init(AesGcmContext_t *context, in gcm_init() argument
183 context->dir = direction; in gcm_init()
184 context->dataSize = dataSize; in gcm_init()
185 context->ivSize = ivSize; in gcm_init()
186 context->aadSize = aadSize; in gcm_init()
[all …]
Dcc3xx_internal_chacha20_poly1305.c54 ChachaContext_t context = {0}; in chacha20_poly1305_crypt_and_tag() local
56 cc3xx_chacha20_init(&context); in chacha20_poly1305_crypt_and_tag()
58 status = cc3xx_chacha20_setkey(&context, key_buffer, key_buffer_size); in chacha20_poly1305_crypt_and_tag()
63 status = cc3xx_chacha20_set_nonce(&context, nonce, nonce_size); in chacha20_poly1305_crypt_and_tag()
68 status = cc3xx_chacha20_set_counter(&context, counter); in chacha20_poly1305_crypt_and_tag()
78 status = cc3xx_chacha20_update(&context, input, length, in chacha20_poly1305_crypt_and_tag()
85 status = cc3xx_chacha20_poly1305_gen_otk(&context, in chacha20_poly1305_crypt_and_tag()
103 cc3xx_chacha20_free(&context); in chacha20_poly1305_crypt_and_tag()
138 ChachaContext_t *context, in cc3xx_chacha20_poly1305_gen_otk() argument
147 if (context == NULL || otk == NULL) { in cc3xx_chacha20_poly1305_gen_otk()
[all …]
Dcc3xx_internal_ccm.c127 static psa_status_t ccm_init(AesCcmContext_t *context, in ccm_init() argument
197 context->mode = CIPHER_CBC_MAC; in ccm_init()
198 context->sizeOfN = sizeOfN; in ccm_init()
199 context->sizeOfT = sizeOfT; in ccm_init()
200 context->dir = encryptDecryptFlag; in ccm_init()
203 CC_PalMemSetZero(context->ivBuf, sizeof(context->ivBuf)); in ccm_init()
206 CC_PalMemSetZero(context->ctrStateBuf, sizeof(context->ctrStateBuf)); in ccm_init()
207 CC_PalMemSetZero(context->tempBuff, sizeof(context->tempBuff)); in ccm_init()
210 tempBuff = context->tempBuff; in ccm_init()
235 rc = ProcessAesCcmDrv(context, &inBuffInfo, &outBuffInfo, in ccm_init()
[all …]
/trusted-firmware-m-3.5.0/lib/ext/t_cose/inc/
Dt_cose_mac0_verify.h40 t_cose_mac0_verify_init(struct t_cose_mac0_verify_ctx *context,
54 t_cose_mac0_set_verify_key(struct t_cose_mac0_verify_ctx *context,
89 enum t_cose_err_t t_cose_mac0_verify(struct t_cose_mac0_verify_ctx *context,
98 t_cose_mac0_verify_init(struct t_cose_mac0_verify_ctx *context, in t_cose_mac0_verify_init() argument
101 context->option_flags = option_flags; in t_cose_mac0_verify_init()
102 context->verification_key = T_COSE_NULL_KEY; in t_cose_mac0_verify_init()
106 t_cose_mac0_set_verify_key(struct t_cose_mac0_verify_ctx *context, in t_cose_mac0_set_verify_key() argument
109 context->verification_key = verify_key; in t_cose_mac0_set_verify_key()
Dt_cose_sign1_sign.h134 t_cose_sign1_sign_init(struct t_cose_sign1_sign_ctx *context,
158 t_cose_sign1_set_signing_key(struct t_cose_sign1_sign_ctx *context,
181 t_cose_sign1_set_content_type_uint(struct t_cose_sign1_sign_ctx *context,
201 t_cose_sign1_set_content_type_tstr(struct t_cose_sign1_sign_ctx *context,
248 t_cose_sign1_sign(struct t_cose_sign1_sign_ctx *context,
290 t_cose_sign1_encode_parameters(struct t_cose_sign1_sign_ctx *context,
311 t_cose_sign1_encode_signature(struct t_cose_sign1_sign_ctx *context,
Dt_cose_mac0_sign.h105 t_cose_mac0_set_signing_key(struct t_cose_mac0_sign_ctx *context,
143 t_cose_mac0_encode_parameters(struct t_cose_mac0_sign_ctx *context,
163 t_cose_mac0_encode_tag(struct t_cose_mac0_sign_ctx *context,
183 t_cose_mac0_set_content_type_uint(struct t_cose_mac0_sign_ctx *context,
202 t_cose_mac0_set_content_type_tstr(struct t_cose_mac0_sign_ctx *context,
Dt_cose_sign1_verify.h74 t_cose_sign1_verify_init(struct t_cose_sign1_verify_ctx *context,
126 t_cose_sign1_set_verification_key(struct t_cose_sign1_verify_ctx *context,
177 enum t_cose_err_t t_cose_sign1_verify(struct t_cose_sign1_verify_ctx *context,
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/tests/
Drun_integration_key_derivation.c70 …static const uint8_t context[] = { 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3… in runIt_hmacKeyDerivTest() local
90 ALLOC_AND_COPY(contextPtr, pContext, context, sizeof(context)); in runIt_hmacKeyDerivTest()
103 sizeof(context), in runIt_hmacKeyDerivTest()
110 RUNIT_PRINT_BUF(context, sizeof(context), "context"); in runIt_hmacKeyDerivTest()
122 …DE[SHA256] KEY[%ub] CONTEXT[%uB] LABEL[%uB]", keyData.keySize * 8, sizeof(context), sizeof(label)); in runIt_hmacKeyDerivTest()
130 static uint8_t context[] = { 0x54,0x45,0x53,0x54 }; in runIt_cmacKeyDerivTest() local
152 ALLOC_AND_COPY(contextPtr, pContext, context, sizeof(context)); in runIt_cmacKeyDerivTest()
164 sizeof(context), in runIt_cmacKeyDerivTest()
181 … (uint32_t)keyData.keySize * 8, (uint32_t)sizeof(context), (uint32_t)sizeof(label)); in runIt_cmacKeyDerivTest()
190 static uint8_t context[] = { 0x54,0x45,0x53,0x54 }; in runIt_cmacRootKeyDerivTest() local
[all …]
/trusted-firmware-m-3.5.0/docs/design_docs/software/
Dtfm_cooperative_scheduling_rules.rst34 Scheduler Rules for context switching between SPE and NSPE
50 - A NSPE exception handler returns from NSPE to pre-empted SPE context
51 - A SPE exception handler returns from SPE to pre-empted NSPE context
63 1. **The NSPE exception handler is allowed to trigger a NSPE context switch**
64 **(regardless of security state of the preempted context.**
69 **exception) context.**
73 3. **If NSPE exception results in a NSPE context switch, SPM must be informed**
75 **newly scheduled-in context.**
87 2. **The SPE interrupt handler is allowed to trigger a SPE context switch**
88 **(regardless of security state of the pre-empted context)**
[all …]
/trusted-firmware-m-3.5.0/docs/integration_guide/
Dnon-secure_client_extension_integration_guide.rst15 - Non-secure context management in TF-M
17 When a NS task calls a secure service, a context is maintained in TF-M. If
18 TF-M supports multiple secure service calls, the context needs to be loaded
31 - Provide the interface to NSPE RTOS for managing the context in TF-M.
49 manage the NS client context. It is not accessible to NSPE.
52 Group-based context management
55 NSCE introduces a group-based context management for NS clients. The purpose is
60 context slots. Multiple NS connections could share the same context provided
64 specified for the connection of the NS client. NSCE allocates only one context
65 for a given group. Threads in the same group share the context.
[all …]
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/codesafe/src/psa_driver_api/include/
Dcc3xx_internal_chacha20_poly1305.h64 ChachaContext_t *context,
97 ChachaPolyContext_t *context,
112 ChachaPolyContext_t *context,
130 ChachaPolyContext_t *context,
148 ChachaPolyContext_t *context,
164 ChachaPolyContext_t *context,
/trusted-firmware-m-3.5.0/platform/ext/target/arm/rss/common/cpak_generator/
Dcpak_generator.c59 uint8_t context[32 + sizeof(uint32_t) * 2] = {0}; in generate_seed() local
60 uint8_t state[sizeof(context) + sizeof(label) + sizeof(uint8_t) in generate_seed()
72 memcpy(context, bl1_2_hash, 32); in generate_seed()
74 memcpy(context + 32, &lcs, sizeof(uint32_t)); in generate_seed()
76 memcpy(context + 32 + sizeof(uint32_t), &reprovisioning_bits, in generate_seed()
82 context, sizeof(context)); in generate_seed()
84 sizeof(context), &seed_output_length, sizeof(uint32_t)); in generate_seed()
/trusted-firmware-m-3.5.0/lib/ext/t_cose/src/
Dt_cose_mac0_verify.c90 enum t_cose_err_t t_cose_mac0_verify(struct t_cose_mac0_verify_ctx *context, in t_cose_mac0_verify() argument
124 if((context->option_flags & T_COSE_OPT_TAG_REQUIRED) && in t_cose_mac0_verify()
157 if((context->option_flags & T_COSE_OPT_REQUIRE_KID) && in t_cose_mac0_verify()
204 if(context->option_flags & T_COSE_OPT_DECODE_ONLY) { in t_cose_mac0_verify()
219 if (context->option_flags & T_COSE_OPT_ALLOW_SHORT_CIRCUIT) { in t_cose_mac0_verify()
240 context->verification_key); in t_cose_mac0_verify()
Dt_cose_crypto.h369 } context;
388 } context;
/trusted-firmware-m-3.5.0/tools/
Dtfm_parse_manifest_list.py235 context = {}
441 context['partitions'] = partition_list
442 context['config_impl'] = config_impl
443 context['stateless_services'] = process_stateless_services(partition_list)
445 return context
447 def gen_per_partition_files(context): argument
458 partition_context['utilities'] = context['utilities']
459 partition_context['config_impl'] = context['config_impl']
467 for one_partition in context['partitions']:
498 def gen_summary_files(context, gen_file_lists): argument
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/arm/rss/common/bl1/
Dboot_hal_bl1.c162 uint8_t context[BL1_2_HASH_SIZE + sizeof(uint32_t) * 2] = {0}; in rss_derive_key() local
167 memcpy(context, computed_bl1_2_hash, BL1_2_HASH_SIZE); in rss_derive_key()
169 memcpy(context + BL1_2_HASH_SIZE, &lcs, sizeof(uint32_t)); in rss_derive_key()
171 memcpy(context + BL1_2_HASH_SIZE + sizeof(uint32_t), &reprovisioning_bits, in rss_derive_key()
174 rc = bl1_derive_key(key_id, label, label_len, context, in rss_derive_key()
175 sizeof(context), out, 32); in rss_derive_key()
/trusted-firmware-m-3.5.0/platform/ext/accelerator/cc312/
Dcc312.c119 const uint8_t *context, in crypto_hw_accelerator_huk_derive_key() argument
125 if (context == NULL || context_size == 0) { in crypto_hw_accelerator_huk_derive_key()
129 context = (const uint8_t *)CC312_NULL_CONTEXT; in crypto_hw_accelerator_huk_derive_key()
135 context, context_size, in crypto_hw_accelerator_huk_derive_key()
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/codesafe/src/secure_boot_debug/secure_boot_gen/
Dsecureboot_gen_defs.h63 void* context
81 void* context
/trusted-firmware-m-3.5.0/docs/security/security_advisories/
Dcrypto_multi_part_ops_abort_fail.rst45 the operation context.
62 stores and manages the context of ongoing multi-part crypto operations in the
64 hashing operation context in its ``psa_hash_operation_t`` implementation.
66 The context is cleaned up in crypto library ``abort()`` function when the client
84 psa_cipher_operation_t cipher; /*!< Cipher operation context */
85 psa_mac_operation_t mac; /*!< MAC operation context */
86 psa_hash_operation_t hash; /*!< Hash operation context */
87 psa_key_derivation_operation_t key_deriv; /*!< Key derivation operation context */
107 library stores operation context in the PSA operation object, the operation
108 context is lost before clients call ``abort()`` to handle the error.
[all …]
Dsvc_caller_sp_fetching_vulnerability.rst46 bl tfm_core_svc_handler ; r0 = sp(context), r1 = EXC_RETURN, r2 = msp
69 position of member 'Return Address' in the PSP_S pointing context, and uses the
70 caller saved registers in the context as parameters for the subsequent
73 call, or it points to a preempted context caused by non-secure preempting
76 context is pointing to the underflowed stack of which the top 2 words are stack
77 seal, and the rest of the context is unpredictable. These underflowed content
83 When PSP_S is pointing to a preempted context, the preempted place can be the
86 preemption stack frame and hence will fail the context size validation through
89 frame will contain a context with a valid SVC Number with valid parameters.
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/poly/
Dpoly.c468 CC_PalMemCopy(state->context.key, key, sizeof(state->context.key)); in PolyInit()
469 poly_clamp_r(state->context.key); in PolyInit()
472 CC_PalMemSetZero(state->context.acc, sizeof(state->context.acc)); in PolyInit()
547 poly_restore_context(&state->context); in PolyUpdate()
591 poly_save_context(&state->context); in PolyUpdate()
613 poly_restore_context(&state->context); in PolyFinish()
624 poly_save_context(&state->context); in PolyFinish()
628 CC_PalMemCopy(tag, state->context.acc, tag_size); in PolyFinish()
/trusted-firmware-m-3.5.0/docs/design_docs/services/
Dsymmetric_initial_attest.rst173 ``COSE_Mac0`` signing context and builds up the ``COSE_Mac0`` Header.
188 context in ``t_cose``.
190 #. The symmetric IAK handle is set into ``COSE_Mac0`` signing context via
315 Initialize signing context
318 ``t_cose_mac0_sign_init()`` initializes ``COSE_Mac0`` signing context and
328 The ``COSE_Mac0`` signing context is defined as
362 and outputs the encoded context to ``cbor_encode_ctx``.
367 t_cose_mac0_encode_parameters(struct t_cose_mac0_sign_ctx *context,
379 t_cose_mac0_encode_tag(struct t_cose_mac0_sign_ctx *context,
389 Initialize verification context
[all …]
/trusted-firmware-m-3.5.0/platform/ext/accelerator/interface/
Dcrypto_hw.h47 const uint8_t *context,
/trusted-firmware-m-3.5.0/bl1/bl1_1/shared_lib/interface/
Dcrypto.h47 size_t label_length, const uint8_t *context,
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/
Drun_integration_helper.c203 void* context) in runIt_flashReadWrap() argument
205 CC_UNUSED_PARAM(context); in runIt_flashReadWrap()

123