/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rsa/ |
D | cc_rsa_kg.c | 49 size_t KeySize, in KGCheckAndSetParamsRSA() argument 90 if (( KeySize < CC_RSA_MIN_VALID_KEY_SIZE_VALUE_IN_BITS ) || in KGCheckAndSetParamsRSA() 91 ( KeySize > CC_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS ) || in KGCheckAndSetParamsRSA() 92 ( KeySize % CC_RSA_VALID_KEY_SIZE_MULTIPLE_VALUE_IN_BITS )) { in KGCheckAndSetParamsRSA() 142 pCcPubKey->nSizeInBits = KeySize; in KGCheckAndSetParamsRSA() 143 pCcPrivKey->nSizeInBits = KeySize; in KGCheckAndSetParamsRSA() 183 size_t KeySize, in CC_RsaKgKeyPairGenerate() argument 201 KeySize, in CC_RsaKgKeyPairGenerate() 229 KeySize, in CC_RsaKgKeyPairGenerate() 243 KeySize/2); in CC_RsaKgKeyPairGenerate() [all …]
|
D | ccsw_rsa_kg.c | 94 uint32_t KeySize, in CC_SwRsaKgGenerateKeyPair() argument 111 uint32_t KeySizeInWords = KeySize/32; in CC_SwRsaKgGenerateKeyPair() 149 if (( KeySize < CC_RSA_MIN_VALID_KEY_SIZE_VALUE_IN_BITS ) || in CC_SwRsaKgGenerateKeyPair() 150 ( KeySize > CC_RSA_MAX_VALID_KEY_SIZE_VALUE_IN_BITS ) || in CC_SwRsaKgGenerateKeyPair() 151 ( KeySize % CC_RSA_VALID_KEY_SIZE_MULTIPLE_VALUE_IN_BITS )) { in CC_SwRsaKgGenerateKeyPair() 191 PubKey_ptr->nSizeInBits = KeySize; in CC_SwRsaKgGenerateKeyPair() 192 PrivKey_ptr->nSizeInBits = KeySize; in CC_SwRsaKgGenerateKeyPair() 313 uint32_t KeySize, in CC_SwRsaKgGenerateKeyPairCRT() argument 328 uint32_t KeySizeInBytes = KeySize/8; in CC_SwRsaKgGenerateKeyPairCRT() 329 uint32_t KeySizeInWords = KeySize/32; in CC_SwRsaKgGenerateKeyPairCRT() [all …]
|
D | ccsw_rsa_kg.h | 53 uint32_t KeySize, 92 uint32_t KeySize,
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/stm32h5xx/hal/Src/ |
D | stm32h5xx_hal_hash.c | 325 hhash->Init.KeySize = pConf->KeySize; in HAL_HASH_SetConfig() 380 pConf->KeySize = hhash->Init.KeySize; in HAL_HASH_GetConfig() 1501 if (hhash->Init.KeySize > 64U) in HAL_HASH_HMAC_Start() 1514 MODIFY_REG(hhash->Instance->STR, HASH_STR_NBLW, 8U * ((hhash->Init.KeySize) % 4U)); in HAL_HASH_HMAC_Start() 1520 HASH_WriteData(hhash, hhash->Init.pKey, hhash->Init.KeySize); in HAL_HASH_HMAC_Start() 1546 MODIFY_REG(hhash->Instance->STR, HASH_STR_NBLW, 8U * ((hhash->Init.KeySize) % 4U)); in HAL_HASH_HMAC_Start() 1549 HASH_WriteData(hhash, hhash->Init.pKey, hhash->Init.KeySize); in HAL_HASH_HMAC_Start() 1623 if (hhash->Init.KeySize > 64U) in HAL_HASH_HMAC_Accumulate() 1638 MODIFY_REG(hhash->Instance->STR, HASH_STR_NBLW, 8U * ((hhash->Init.KeySize) % 4U)); in HAL_HASH_HMAC_Accumulate() 1641 HASH_WriteData(hhash, hhash->Init.pKey, hhash->Init.KeySize); in HAL_HASH_HMAC_Accumulate() [all …]
|
D | stm32h5xx_hal_cryp.c | 363 static void CRYP_SetKey(CRYP_HandleTypeDef *hcryp, uint32_t KeySize); 390 …c void CRYP_Read_KeyRegisters(CRYP_HandleTypeDef *hcryp, const uint32_t *Output, uint32_t KeySize); 391 …c void CRYP_Write_KeyRegisters(CRYP_HandleTypeDef *hcryp, const uint32_t *Input, uint32_t KeySize); 449 assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize)); in HAL_CRYP_Init() 486 …cr_value = (uint32_t)(hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm | hcryp->… in HAL_CRYP_Init() 526 cr_value = (uint32_t)(hcryp->Init.KeyMode | hcryp->Init.DataType | hcryp->Init.KeySize | \ in HAL_CRYP_Init() 614 assert_param(IS_CRYP_KEYSIZE(pConf->KeySize)); in HAL_CRYP_SetConfig() 628 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig() 642 … hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm | hcryp->Init.KeyMode); in HAL_CRYP_SetConfig() 660 … AES_CR_KEYSEL | AES_CR_KEYPROT | AES_CR_KMOD, hcryp->Init.DataType | hcryp->Init.KeySize | \ in HAL_CRYP_SetConfig() [all …]
|
D | stm32h5xx_hal_cryp_ex.c | 663 if (hcryp->Init.KeySize == CRYP_KEYSIZE_128B) in CRYPEx_KeyDecrypt() 741 if (hcryp->Init.KeySize == CRYP_KEYSIZE_128B) in CRYPEx_KeyEncrypt()
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/stm32u5xx/hal/Src/ |
D | stm32u5xx_hal_cryp_ex.c | 70 static void CRYPEx_SetKey(const CRYP_HandleTypeDef *hcryp, uint32_t KeySize); 553 CRYPEx_SetKey(hcryp, hcryp->Init.KeySize); in CRYPEx_KeyDecrypt() 599 if (hcryp->Init.KeySize == CRYP_KEYSIZE_128B) in CRYPEx_KeyDecrypt() 676 CRYPEx_SetKey(hcryp, hcryp->Init.KeySize); in CRYPEx_KeyEncrypt() 704 if (hcryp->Init.KeySize == CRYP_KEYSIZE_128B) in CRYPEx_KeyEncrypt() 770 static void CRYPEx_SetKey(const CRYP_HandleTypeDef *hcryp, uint32_t KeySize) in CRYPEx_SetKey() argument 774 switch (KeySize) in CRYPEx_SetKey()
|
D | stm32u5xx_hal_hash.c | 1725 buffersize = hhash->Init.KeySize; /* DMA transfer size (in bytes) */ in HASH_DMAXferCplt() 1728 …hhash->HashInCount = hhash->Init.KeySize; /* Initial size for second DMA transfer (input data)… in HASH_DMAXferCplt() 2156 __HAL_HASH_SET_NBVALIDBITS(hhash->Init.KeySize); /* Set NBLW for the key */ in HASH_IT() 2157 hhash->HashInCount = hhash->Init.KeySize; /* Set the key size (in bytes) */ in HASH_IT() 2312 __HAL_HASH_SET_NBVALIDBITS(hhash->Init.KeySize); in HMAC_Processing() 2388 hhash->HashKeyCount = hhash->Init.KeySize; in HMAC_Processing() 2401 __HAL_HASH_SET_NBVALIDBITS(hhash->Init.KeySize); in HMAC_Processing() 3193 …if ((pInBuffer == NULL) || (Size == 0U) || (hhash->Init.pKey == NULL) || (hhash->Init.KeySize == 0… in HMAC_Start() 3210 if (hhash->Init.KeySize > 64U) in HMAC_Start() 3233 …hhash->HashKeyCount = hhash->Init.KeySize; /* Key size, HMAC_Processing input parameter for … in HMAC_Start() [all …]
|
D | stm32u5xx_hal_cryp.c | 363 static void CRYP_SetKey(CRYP_HandleTypeDef *hcryp, uint32_t KeySize); 390 …c void CRYP_Read_KeyRegisters(CRYP_HandleTypeDef *hcryp, const uint32_t *Output, uint32_t KeySize); 391 …c void CRYP_Write_KeyRegisters(CRYP_HandleTypeDef *hcryp, const uint32_t *Input, uint32_t KeySize); 447 assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize)); in HAL_CRYP_Init() 484 …cr_value = (uint32_t)(hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm | hcryp->… in HAL_CRYP_Init() 490 cr_value = (uint32_t)(hcryp->Init.KeyMode | hcryp->Init.DataType | hcryp->Init.KeySize | \ in HAL_CRYP_Init() 578 assert_param(IS_CRYP_KEYSIZE(pConf->KeySize)); in HAL_CRYP_SetConfig() 592 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig() 607 … hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Algorithm | hcryp->Init.KeyMode); in HAL_CRYP_SetConfig() 623 AES_CR_KEYSEL | AES_CR_KEYPROT, hcryp->Init.DataType | hcryp->Init.KeySize | \ in HAL_CRYP_SetConfig() [all …]
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/stm32l5xx/hal/Src/ |
D | stm32l5xx_hal_hash.c | 1719 buffersize = hhash->Init.KeySize; /* DMA transfer size (in bytes) */ in HASH_DMAXferCplt() 1722 …hhash->HashInCount = hhash->Init.KeySize; /* Initial size for second DMA transfer (input data)… in HASH_DMAXferCplt() 2109 __HAL_HASH_SET_NBVALIDBITS(hhash->Init.KeySize); /* Set NBLW for the key */ in HASH_IT() 2110 hhash->HashInCount = hhash->Init.KeySize; /* Set the key size (in bytes) */ in HASH_IT() 2263 __HAL_HASH_SET_NBVALIDBITS(hhash->Init.KeySize); in HMAC_Processing() 2339 hhash->HashKeyCount = hhash->Init.KeySize; in HMAC_Processing() 2352 __HAL_HASH_SET_NBVALIDBITS(hhash->Init.KeySize); in HMAC_Processing() 3110 …if ((pInBuffer == NULL) || (Size == 0U) || (hhash->Init.pKey == NULL) || (hhash->Init.KeySize == 0… in HMAC_Start() 3126 if(hhash->Init.KeySize > 64U) in HMAC_Start() 3144 …hhash->HashKeyCount = hhash->Init.KeySize; /* Key size, HMAC_Processing input parameter for … in HMAC_Start() [all …]
|
D | stm32l5xx_hal_cryp.c | 371 static void CRYP_SetKey(CRYP_HandleTypeDef *hcryp, uint32_t KeySize); 397 static void CRYP_Read_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint32_t* Output, uint32_t KeySize); 398 static void CRYP_Write_KeyRegisters(CRYP_HandleTypeDef *hcryp, uint32_t* Input, uint32_t KeySize); 456 assert_param(IS_CRYP_KEYSIZE(hcryp->Init.KeySize)); in HAL_CRYP_Init() 491 …TYPE | AES_CR_KEYSIZE | AES_CR_CHMOD, hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Alg… in HAL_CRYP_Init() 577 assert_param(IS_CRYP_KEYSIZE(pConf->KeySize)); in HAL_CRYP_SetConfig() 593 hcryp->Init.KeySize = pConf->KeySize; in HAL_CRYP_SetConfig() 603 …TYPE | AES_CR_KEYSIZE | AES_CR_CHMOD, hcryp->Init.DataType | hcryp->Init.KeySize | hcryp->Init.Alg… in HAL_CRYP_SetConfig() 661 pConf->KeySize = hcryp->Init.KeySize ; in HAL_CRYP_GetConfig() 962 CRYP_Read_KeyRegisters(hcryp, hcryp->Key_saved, hcryp->Init.KeySize); in HAL_CRYP_Suspend() [all …]
|
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/rsa/ |
D | rsa_genkey.c | 1745 size_t KeySize, /* key size in bits */ in RsaGenPandQ() argument 1765 pqSizeWords = CALC_FULL_32BIT_WORDS(KeySize/2); in RsaGenPandQ() 1767 … CC_PalMemCopy( RSA_KG_debugPvect, (uint8_t*)pKeyGenData->KGData.p, KeySize/(2*CC_BITS_IN_BYTE) ); in RsaGenPandQ() 1768 … CC_PalMemCopy( RSA_KG_debugQvect, (uint8_t*)pKeyGenData->KGData.q, KeySize/(2*CC_BITS_IN_BYTE) ); in RsaGenPandQ() 1772 … CC_PalMemCopy( (uint8_t*)pKeyGenData->KGData.p, RSA_KG_debugPvect, KeySize/(2*CC_BITS_IN_BYTE) ); in RsaGenPandQ() 1773 … CC_PalMemCopy( (uint8_t*)pKeyGenData->KGData.q, RSA_KG_debugQvect, KeySize/(2*CC_BITS_IN_BYTE) ); in RsaGenPandQ() 1778 CC_COMMON_INVERSE_UINT32_IN_ARRAY( pKeyGenData->KGData.p, KeySize/(2*CC_BITS_IN_32BIT_WORD) ); in RsaGenPandQ() 1779 CC_COMMON_INVERSE_UINT32_IN_ARRAY( pKeyGenData->KGData.q, KeySize/(2*CC_BITS_IN_32BIT_WORD) ); in RsaGenPandQ() 1810 CC_PalMemCopy( RSA_KG_debugPvect, (uint8_t*)pPrimeP, KeySize/(2*CC_BITS_IN_BYTE) ); in RsaGenPandQ() 1811 CC_PalMemCopy( RSA_KG_debugQvect, (uint8_t*)pPrimeQ, KeySize/(2*CC_BITS_IN_BYTE) ); in RsaGenPandQ() [all …]
|
D | rsa.h | 80 size_t KeySize,
|
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/cert_lib/ |
D | main.c | 107 char* Key_ptr, int KeySize, in SBU_AES_CTR_EncryptFile() argument 138 memcpy (m_key, Key_ptr, KeySize); in SBU_AES_CTR_EncryptFile()
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/hal/accelerator/ |
D | ccm_alt.c | 98 ctx->hcryp_ccm.Init.KeySize = CRYP_KEYSIZE_128B;; in mbedtls_ccm_setkey() 106 ctx->hcryp_ccm.Init.KeySize = CRYP_KEYSIZE_256B; in mbedtls_ccm_setkey()
|
D | gcm_alt.c | 193 ctx->hcryp_gcm.Init.KeySize = CRYP_KEYSIZE_128B;; in mbedtls_gcm_setkey() 201 ctx->hcryp_gcm.Init.KeySize = CRYP_KEYSIZE_256B; in mbedtls_gcm_setkey()
|
D | aes_alt.c | 82 ctx->hcryp_aes.Init.KeySize = CRYP_KEYSIZE_128B;; in aes_set_key() 94 ctx->hcryp_aes.Init.KeySize = CRYP_KEYSIZE_256B; in aes_set_key()
|
/trusted-firmware-m-3.7.0/lib/ext/cryptocell-312-runtime/utils/src/cc3x_boot_cert/x509cert_lib/ |
D | main.c | 270 char* Key_ptr, int KeySize, in SBU_AES_CTR_EncryptFile() argument 301 memcpy (m_key, Key_ptr, KeySize); in SBU_AES_CTR_EncryptFile()
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/stm32l5xx/hal/Inc/ |
D | stm32l5xx_hal_cryp.h | 56 …uint32_t KeySize; /*!< Used only in AES mode : 128, 192 or 256 bit key length i… member
|
D | stm32l5xx_hal_hash.h | 52 uint32_t KeySize; /*!< The key size is used only in HMAC operation. */ member
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/stm32u5xx/hal/Inc/ |
D | stm32u5xx_hal_cryp.h | 56 …uint32_t KeySize; /*!< Used only in AES mode : 128, 192 or 256 bit key length i… member
|
D | stm32u5xx_hal_hash.h | 52 uint32_t KeySize; /*!< The key size is used only in HMAC operation. */ member
|
/trusted-firmware-m-3.7.0/platform/ext/target/stm/common/stm32h5xx/hal/Inc/ |
D | stm32h5xx_hal_cryp.h | 56 …uint32_t KeySize; /*!< Used only in AES mode : 128, 192 or 256 bit key length i… member
|
D | stm32h5xx_hal_hash.h | 53 uint32_t KeySize; /*!< The key size is used only in HMAC operation. */ member
|