Home
last modified time | relevance | path

Searched refs:pKey (Results 1 – 25 of 46) sorted by relevance

12

/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/tests/
Drun_integration_chacha.c55 …static mbedtls_chacha_key pKey = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0… in runIt_Chacha() local
75 RUNIT_ASSERT_W_PARAM("encrypt", mbedtls_chacha20_crypt( pKey, in runIt_Chacha()
92 RUNIT_ASSERT_WITH_RESULT(mbedtls_chacha20_setkey( &ctx, pKey ), CC_OK); in runIt_Chacha()
118 …RUNIT_SUB_TEST_RESULT_W_PARAMS(TEST_NAME, "KEY[%ub] DATA_IN[%uB]", sizeof(pKey) * 8, sizeof(pDataI… in runIt_Chacha()
131 …static mbedtls_chacha_key pKey = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8… in runIt_ChachaPolyEncrypt() local
158 RUNIT_ASSERT_WITH_RESULT( mbedtls_chachapoly_setkey( &ctx, pKey ), CC_OK); in runIt_ChachaPolyEncrypt()
184 …RUNIT_SUB_TEST_RESULT_W_PARAMS(TEST_NAME, "KEY[%ub] DATA_IN[%uB] AAD[%uB]", sizeof(pKey) * 8, size… in runIt_ChachaPolyEncrypt()
197 …static mbedtls_chacha_key pKey = {0x1c,0x92,0x40,0xa5,0xeb,0x55,0xd3,0x8a,0xf3,0x33,0x88,0x86,0x04… in runIt_ChachaPolyDecrypt() local
226 RUNIT_ASSERT_WITH_RESULT( mbedtls_chachapoly_setkey( &ctx, pKey ), CC_OK); in runIt_ChachaPolyDecrypt()
251 …RUNIT_SUB_TEST_RESULT_W_PARAMS(TEST_NAME, "KEY[%ub] DATA_IN[%uB] AAD[%uB]", sizeof(pKey) * 8, size… in runIt_ChachaPolyDecrypt()
[all …]
Drun_integration_mac.c53 uint8_t *pKey = NULL; in runIt_hmac() local
66 ALLOC_AND_COPY(keyPtr, pKey, hmacTest_Key, hmacTest_KeySize); in runIt_hmac()
77 pKey, in runIt_hmac()
97 RUNIT_ASSERT_WITH_RESULT(mbedtls_md_hmac_starts(&ctx, pKey, hmacTest_KeySize), CC_OK); in runIt_hmac()
Drun_integration_key_derivation.c94 keyData.pKey = pUserKey; in runIt_hmacKeyDerivTest()
108 RUNIT_PRINT_BUF(keyData.pKey, keyData.keySize, "keyData.pKey"); in runIt_hmacKeyDerivTest()
156 keyData.pKey = (uint8_t*)pUserKey; in runIt_cmacKeyDerivTest()
222 keyData.pKey = (uint8_t*)pUserKey; in runIt_cmacRootKeyDerivTest()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/cmpu/
Dcmpu_derivation.c168 uint8_t *pKey, in Derivation_DRBG_Update() argument
188 pKey,CC_PROD_AES_Key256Bits_SIZE_IN_BYTES, in Derivation_DRBG_Update()
212 CC_PalMemCopy(pKey, (uint8_t*)pOutput, CC_PROD_AES_Key256Bits_SIZE_IN_BYTES); in Derivation_DRBG_Update()
229 uint8_t *pKey, in CC_PROD_Derivation_Instantiate() argument
235 …if ((NULL == pKey) || (NULL == pIv) || (NULL == pEntrSrc) || (0 == sourceSize) || (!IS_ALIGNED(sou… in CC_PROD_Derivation_Instantiate()
253 CC_PalMemSetZero(pKey, CC_PROD_AES_Key256Bits_SIZE_IN_BYTES); in CC_PROD_Derivation_Instantiate()
257 error = Derivation_DRBG_Update(pDfOutput, pKey, pIv); in CC_PROD_Derivation_Instantiate()
277 uint32_t CC_PROD_Derivation_Generate(uint8_t *pKey, in CC_PROD_Derivation_Generate() argument
291 if ((pKey == NULL) || (pIv == NULL) || (pOutputBuff == NULL)) { in CC_PROD_Derivation_Generate()
317 pKey, CC_PROD_AES_Key256Bits_SIZE_IN_BYTES, in CC_PROD_Derivation_Generate()
Dcmpu_derivation.h13 uint8_t *pKey,
15 uint32_t CC_PROD_Derivation_Generate(uint8_t *pKey,
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/utils/src/common/
Dcommon_crypto_sym.c35 int8_t *pKey, in CC_CommonAesCtrEncrypt() argument
47 (NULL == pKey) || in CC_CommonAesCtrEncrypt()
57 ret = AES_set_encrypt_key (pKey, keySize * 8, &key); in CC_CommonAesCtrEncrypt()
171 int32_t CC_CommonAesCbcMacEncrypt(int8_t *pKey, in CC_CommonAesCbcMacEncrypt() argument
182 if ((NULL == pKey) || in CC_CommonAesCbcMacEncrypt()
200 status = AES_set_encrypt_key(pKey, 128, &aesKey); in CC_CommonAesCbcMacEncrypt()
360 int8_t *pKey, in CC_CommonAesCmacEncrypt() argument
368 if ((NULL == pKey) || in CC_CommonAesCmacEncrypt()
382 rc = CMAC_Init(cmac_ctx, pKey, AES_BLOCK_SIZE, EVP_aes_128_cbc(), 0); in CC_CommonAesCmacEncrypt()
384 rc = CMAC_Init(cmac_ctx, pKey, AES_BLOCK_SIZE*2, EVP_aes_256_cbc(), 0); in CC_CommonAesCmacEncrypt()
[all …]
Dcommon_crypto_sym.h30 int8_t *pKey,
82 int8_t *pKey,
121 uint8_t *pKey,
Dcommon_sb_ops.c51 EVP_PKEY *pKey = NULL; in Sign_v15() local
57 pKey = EVP_PKEY_new(); in Sign_v15()
59 if (!EVP_PKEY_assign_RSA(pKey, pRsaPrivKey)) in Sign_v15()
71 if (!EVP_SignFinal(md_ctx, Signature_ptr, &SignatureSize, pKey)) in Sign_v15()
83 if (!EVP_PKEY_assign_RSA(pKey, pRsaPubKey)) in Sign_v15()
92 if (!EVP_VerifyFinal(md_ctx, Signature_ptr, SignatureSize, pKey)) in Sign_v15()
Dcommon_crypto_asym.c52 EVP_PKEY *pKey = NULL; in Sign_v15() local
65 pKey = EVP_PKEY_new(); in Sign_v15()
66 if (NULL == pKey) { in Sign_v15()
71 if (!EVP_PKEY_assign_RSA(pKey, pRsaPrivKey)) { in Sign_v15()
93 if (!EVP_SignFinal(md_ctx, pSignature, &SignatureSize, pKey)) { in Sign_v15()
119 if (!EVP_PKEY_assign_RSA(pKey, pRsaPubKey)) { in Sign_v15()
134 if (!EVP_VerifyFinal(md_ctx, pSignature, SignatureSize, pKey)) { in Sign_v15()
148 if (pKey != NULL) { in Sign_v15()
149 EVP_PKEY_free(pKey); in Sign_v15()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/utils/src/dmpu_asset_pkg_util/common/
Ddmpu_common.c73 int AesCmacKeyDerivation(char *pKey, uint32_t keySize, in AesCmacKeyDerivation() argument
83 if ((pKey == NULL) || in AesCmacKeyDerivation()
108 UTIL_LOG_BYTE_BUFF("pKey", pKey, keySize); in AesCmacKeyDerivation()
110 pKey, keySize, pOutKey); in AesCmacKeyDerivation()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/api/
Dmbedtls_cc_poly.c15 mbedtls_poly_key pKey, in mbedtls_poly() argument
24 if (pKey == NULL) { in mbedtls_poly()
34 rc = PolyMacCalc(pKey, NULL, 0, pDataIn, dataInSize, macRes, false); in mbedtls_poly()
Dmbedtls_cc_chacha_poly.c19 mbedtls_chacha_key pKey, in mbedtls_chacha_poly() argument
47 (pKey == NULL) || in mbedtls_chacha_poly()
63 …rc = mbedtls_chacha(pNonce, CC_CHACHA_Nonce96BitSize, pKey, 0, CC_CHACHA_Encrypt, chachaInState, s… in mbedtls_chacha_poly()
73 …rc = mbedtls_chacha(pNonce, CC_CHACHA_Nonce96BitSize, pKey, 1, encryptDecryptFlag, (uint8_t *)pDat… in mbedtls_chacha_poly()
97 …rc = mbedtls_chacha(pNonce, CC_CHACHA_Nonce96BitSize, pKey, 1, encryptDecryptFlag, (uint8_t *)pDat… in mbedtls_chacha_poly()
Dmbedtls_chacha_ext_dma.c35 uint8_t * pKey, in mbedtls_ext_dma_chacha_init() argument
62 if (pKey == NULL) { in mbedtls_ext_dma_chacha_init()
81 CC_PalMemCopy((uint8_t *)keyBufferWords, pKey, CC_CHACHA_KEY_MAX_SIZE_IN_BYTES); in mbedtls_ext_dma_chacha_init()
Dmbedtls_cc_chacha.c95 mbedtls_chacha_key pKey, in mbedtls_chacha_init() argument
143 if (pKey == NULL) { in mbedtls_chacha_init()
154 CC_PalMemCopy(chachaCtx->keyBuf, pKey, keySizeBytes); in mbedtls_chacha_init()
209 mbedtls_chacha_key pKey, in mbedtls_chacha() argument
235 …Error = mbedtls_chacha_init(&UserContext, pNonce, nonceSize, pKey, initialCounter, encryptDecryptF… in mbedtls_chacha()
/trusted-firmware-m-3.4.0/platform/ext/target/stm/common/stm32u5xx/hal/Src/
Dstm32u5xx_hal_cryp_ex.c444 HAL_StatusTypeDef HAL_CRYPEx_EncryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t *… in HAL_CRYPEx_EncryptSharedKey() argument
458 hcryp->pCrypInBuffPtr = pKey; in HAL_CRYPEx_EncryptSharedKey()
488 HAL_StatusTypeDef HAL_CRYPEx_DecryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t I… in HAL_CRYPEx_DecryptSharedKey() argument
501 hcryp->pCrypInBuffPtr = pKey; in HAL_CRYPEx_DecryptSharedKey()
772 if (hcryp->Init.pKey != NULL) in CRYPEx_SetKey()
777 hcryp->Instance->KEYR7 = *(uint32_t *)(hcryp->Init.pKey); in CRYPEx_SetKey()
778 hcryp->Instance->KEYR6 = *(uint32_t *)(hcryp->Init.pKey + 1U); in CRYPEx_SetKey()
779 hcryp->Instance->KEYR5 = *(uint32_t *)(hcryp->Init.pKey + 2U); in CRYPEx_SetKey()
780 hcryp->Instance->KEYR4 = *(uint32_t *)(hcryp->Init.pKey + 3U); in CRYPEx_SetKey()
781 hcryp->Instance->KEYR3 = *(uint32_t *)(hcryp->Init.pKey + 4U); in CRYPEx_SetKey()
[all …]
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/
Dpoly1305_alt.c77 mbedtls_poly_key pKey; in mbedtls_poly1305_mac() local
88 CC_PalMemCopy((unsigned char *)pKey, key, sizeof(mbedtls_poly_key)); in mbedtls_poly1305_mac()
90 rc = PolyMacCalc(pKey, NULL, 0, input, ilen, macRes, false); in mbedtls_poly1305_mac()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/host/src/cc3x_productionlib/common/
Dprod_crypto_driver.h27 uint32_t CC_PROD_AesCcmDecrypt(uint8_t *pKey,
44 uint8_t *pKey,
56 uint8_t *pKey,
Dprod_crypto_driver.c37 uint32_t CC_PROD_AesCcmDecrypt(uint8_t *pKey, in CC_PROD_AesCcmDecrypt() argument
63 … rc = mbedtls_ccm_setkey(pCtx, MBEDTLS_CIPHER_ID_AES, pKey, keySizeInBytes * CC_BITS_IN_BYTE); in CC_PROD_AesCcmDecrypt()
95 uint8_t *pKey, in CC_PROD_Aes() argument
109 keyType, pKey, keySizeInBytes, in CC_PROD_Aes()
139 uint8_t *pKey, in CC_PROD_AesInit() argument
167 CC_PalMemCopy((uint8_t *)pAesCtx->keyBuf, pKey, keySizeInBytes); in CC_PROD_AesInit()
/trusted-firmware-m-3.4.0/platform/ext/target/stm/common/stm32u5xx/hal/Inc/
Dstm32u5xx_hal_cryp_ex.h75 HAL_StatusTypeDef HAL_CRYPEx_EncryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t *…
77 HAL_StatusTypeDef HAL_CRYPEx_DecryptSharedKey(CRYP_HandleTypeDef *hcryp, uint32_t *pKey, uint32_t I…
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/utils/src/cmpu_asset_pkg_util/lib/
Dmain.c74 static int AesCmacKeyDerivation(char *pKey, uint32_t keySize, in AesCmacKeyDerivation() argument
84 if ((pKey == NULL) || in AesCmacKeyDerivation()
109 UTIL_LOG_BYTE_BUFF("pKey", pKey, keySize); in AesCmacKeyDerivation()
111 pKey, keySize, pOutKey); in AesCmacKeyDerivation()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/
Dmbedtls_cc_chacha.h117 …mbedtls_chacha_key pKey, /*!< [in] A pointer to the key buffer of the use…
184 …mbedtls_chacha_key pKey, /*!< [in] A pointer to the key buffer of the …
Dmbedtls_chacha_ext_dma.h46 uint8_t * pKey,
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/utils/src/cc3x_asset_prov_rt/lib/
Dmain.c79 static int AesCmacKeyDerivation(char *pKey, uint32_t keySize, in AesCmacKeyDerivation() argument
97 UTIL_LOG_BYTE_BUFF("pKey", pKey, keySize); in AesCmacKeyDerivation()
99 pKey, keySize, pOutKey); in AesCmacKeyDerivation()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/
Dchacha_driver_ext_dma.c56 static drvError_t LoadChachaKeyExtDma(uint32_t *pKey) in LoadChachaKeyExtDma() argument
61 if (pKey == NULL) { in LoadChachaKeyExtDma()
66 …ITE_REGISTER(CC_REG_OFFSET(HOST_RGF, CHACHA_KEY0) + (sizeof(uint32_t) * enrtyNum), pKey[enrtyNum]); in LoadChachaKeyExtDma()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/shared/include/cc_util/
Dmbedtls_cc_util_defs.h60 uint8_t* pKey; member

12