Searched refs:md_ctx (Results 1 – 6 of 6) sorted by relevance
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/utils/src/common/ |
D | common_sb_ops.c | 52 EVP_MD_CTX *md_ctx = NULL; in Sign_v15() local 63 md_ctx = EVP_MD_CTX_create(); in Sign_v15() 65 if (!EVP_SignInit(md_ctx, EVP_sha256())) in Sign_v15() 68 if (!EVP_SignUpdate(md_ctx, DataIn_ptr, DataInSize)) in Sign_v15() 71 if (!EVP_SignFinal(md_ctx, Signature_ptr, &SignatureSize, pKey)) in Sign_v15() 86 if (!EVP_VerifyInit(md_ctx, EVP_sha256())) in Sign_v15() 89 if (!EVP_VerifyUpdate(md_ctx, DataIn_ptr, DataInSize)) in Sign_v15() 92 if (!EVP_VerifyFinal(md_ctx, Signature_ptr, SignatureSize, pKey)) in Sign_v15() 119 EVP_MD_CTX md_ctx; in Sign_v21() local 125 EVP_MD_CTX_init(&md_ctx); in Sign_v21() [all …]
|
D | common_crypto_asym.c | 53 EVP_MD_CTX *md_ctx = NULL; in Sign_v15() local 77 md_ctx = EVP_MD_CTX_create(); in Sign_v15() 78 if (NULL == md_ctx) { in Sign_v15() 83 if (!EVP_SignInit(md_ctx, EVP_sha256())) { in Sign_v15() 88 if (!EVP_SignUpdate(md_ctx, pDataIn, dataInSize)) { in Sign_v15() 93 if (!EVP_SignFinal(md_ctx, pSignature, &SignatureSize, pKey)) { in Sign_v15() 124 if (!EVP_VerifyInit(md_ctx, EVP_sha256())) { in Sign_v15() 129 if (!EVP_VerifyUpdate(md_ctx, pDataIn, dataInSize)) { in Sign_v15() 134 if (!EVP_VerifyFinal(md_ctx, pSignature, SignatureSize, pKey)) { in Sign_v15() 151 if (md_ctx != NULL) { in Sign_v15() [all …]
|
D | common_sb_ops.h | 46 if (md_ctx) \ 47 EVP_MD_CTX_destroy(md_ctx); \
|
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/cc3x_sym/driver/ |
D | srp_driver.c | 240 mbedtls_md_context_t *md_ctx=NULL; in SRP_uScrambleCalc() local 275 md_ctx = &hash_ctx; in SRP_uScrambleCalc() 281 mbedtls_md_init(md_ctx); in SRP_uScrambleCalc() 282 rc = mbedtls_md_setup(md_ctx, md_info, 0); // 0 = HASH, not HMAC in SRP_uScrambleCalc() 286 rc = mbedtls_md_starts(md_ctx); in SRP_uScrambleCalc() 290 rc = mbedtls_md_update(md_ctx, ephemPubA, modSize); in SRP_uScrambleCalc() 294 rc = mbedtls_md_update(md_ctx, ephemPubB, modSize); in SRP_uScrambleCalc() 299 rc = mbedtls_md_finish(md_ctx, (unsigned char *)hashResultBuff); in SRP_uScrambleCalc() 318 if((md_info!=NULL) && (md_ctx!=NULL)) { in SRP_uScrambleCalc() 319 mbedtls_md_free(md_ctx); in SRP_uScrambleCalc() [all …]
|
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/rsa/ |
D | cc_rsa_oaep.c | 84 mbedtls_md_context_t *md_ctx=NULL; in RsaPssOaepEncode() local 200 md_ctx = &(((CCRsaOaepData_t*)((void*)PrimeData_ptr->InternalBuff))->hash_ctx); in RsaPssOaepEncode() 205 mbedtls_md_init(md_ctx); in RsaPssOaepEncode() 206 Error = mbedtls_md_setup(md_ctx, md_info, 0); // 0 = HASH, not HMAC in RsaPssOaepEncode() 210 Error = mbedtls_md_starts(md_ctx); in RsaPssOaepEncode() 219 …Error = mbedtls_md_finish(md_ctx, (unsigned char *)((CCRsaOaepData_t*)((void*)PrimeData_ptr->Inter… in RsaPssOaepEncode() 353 if((md_info!=NULL) && (md_ctx!=NULL)) { in RsaPssOaepEncode() 354 mbedtls_md_free(md_ctx); in RsaPssOaepEncode() 392 mbedtls_md_context_t *md_ctx=NULL; in RsaPssOaepDecode() local 540 md_ctx = &(((CCRsaOaepData_t*)((void*)PrimeData_ptr->InternalBuff))->hash_ctx); in RsaPssOaepDecode() [all …]
|
/trusted-firmware-m-3.4.0/platform/ext/target/stm/common/hal/accelerator/ |
D | rsa_alt.c | 1398 size_t slen, mbedtls_md_context_t *md_ctx ) in mgf_mask() argument 1410 hlen = mbedtls_md_get_size( md_ctx->MBEDTLS_PRIVATE(md_info) ); in mgf_mask() 1421 if( ( ret = mbedtls_md_starts( md_ctx ) ) != 0 ) in mgf_mask() 1423 if( ( ret = mbedtls_md_update( md_ctx, src, slen ) ) != 0 ) in mgf_mask() 1425 if( ( ret = mbedtls_md_update( md_ctx, counter, 4 ) ) != 0 ) in mgf_mask() 1427 if( ( ret = mbedtls_md_finish( md_ctx, mask ) ) != 0 ) in mgf_mask() 1462 mbedtls_md_context_t md_ctx; in mbedtls_rsa_rsaes_oaep_encrypt() local 1504 mbedtls_md_init( &md_ctx ); in mbedtls_rsa_rsaes_oaep_encrypt() 1505 if( ( ret = mbedtls_md_setup( &md_ctx, md_info, 0 ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() 1510 &md_ctx ) ) != 0 ) in mbedtls_rsa_rsaes_oaep_encrypt() [all …]
|