Home
last modified time | relevance | path

Searched refs:olen (Results 1 – 15 of 15) sorted by relevance

/trusted-firmware-m-3.5.0/platform/ext/accelerator/cc312/psa-adac/
Dadac_crypto_cc312_rng.c14 int hardware_rng_poll(uint8_t *output, size_t len, size_t *olen) in hardware_rng_poll() argument
22 if ((NULL == output) || (NULL == olen) || (0 == len)) { in hardware_rng_poll()
43 (uint32_t *) olen, /*out*/ in hardware_rng_poll()
53 ((*olen) <= len) ? (*olen) : len); in hardware_rng_poll()
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/codesafe/src/mbedtls_api/
Dtrng_api.c55 unsigned char *output, size_t len, size_t *olen ) in mbedtls_hardware_poll() argument
70 if ( NULL == olen ) in mbedtls_hardware_poll()
104 (uint32_t*)olen, /*out*/ in mbedtls_hardware_poll()
113 if (*olen <= len ){ in mbedtls_hardware_poll()
114 CC_PalMemCopy ( output, entrSource_ptr + CC_RND_TRNG_SRC_INNER_OFFSET_WORDS , *olen ); in mbedtls_hardware_poll()
Decdh_alt.c82 static int mbedtls_ecp_tls_write_group_edwards( const mbedtls_ecp_group *grp, size_t *olen, in mbedtls_ecp_tls_write_group_edwards() argument
93 *olen = 3; in mbedtls_ecp_tls_write_group_edwards()
94 if( blen < *olen ) in mbedtls_ecp_tls_write_group_edwards()
118 int mbedtls_ecdh_make_params_edwards( mbedtls_ecdh_context *ctx, size_t *olen, in mbedtls_ecdh_make_params_edwards() argument
127 olen == NULL || buf == NULL || in mbedtls_ecdh_make_params_edwards()
147 *olen = grp_len + pt_len; in mbedtls_ecdh_make_params_edwards()
Ddhm_alt.c249 unsigned char *output, size_t *olen, in mbedtls_dhm_make_params() argument
257 if ( (ctx == NULL) || (output == NULL) || (olen == NULL) || in mbedtls_dhm_make_params()
311 *olen = p - output; in mbedtls_dhm_make_params()
366 unsigned char *output, size_t olen, in mbedtls_dhm_make_public() argument
372 if( ctx == NULL || output == NULL || f_rng == NULL || p_rng ==NULL || olen < ctx->len ) in mbedtls_dhm_make_public()
401 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &ctx->GX, output, olen ) ); in mbedtls_dhm_make_public()
480 unsigned char *output, size_t output_size, size_t *olen, in mbedtls_dhm_calc_secret() argument
487 if( ctx == NULL || output == NULL || olen == NULL || output_size < ctx->len ) in mbedtls_dhm_calc_secret()
517 *olen = mbedtls_mpi_size( &ctx->K ); in mbedtls_dhm_calc_secret()
518 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &ctx->K, output, *olen ) ); in mbedtls_dhm_calc_secret()
Decdsa_edwards.c388 size_t *olen, in mbedtls_ecdsa_public_key_write_edwards() argument
396 (olen == NULL) || in mbedtls_ecdsa_public_key_write_edwards()
410 ret = ecdsa_export_mpi_to_buff(&Q->MBEDTLS_PRIVATE(Y), olen, buf, keySize); in mbedtls_ecdsa_public_key_write_edwards()
Drsa_alt.c1763 size_t olen; in mbedtls_rsa_rsaes_oaep_encrypt() local
1821 olen = ctx->MBEDTLS_PRIVATE(len); in mbedtls_rsa_rsaes_oaep_encrypt()
1825 if( ilen + 2 * hlen + 2 < ilen || olen < ilen + 2 * hlen + 2 ) in mbedtls_rsa_rsaes_oaep_encrypt()
2018 size_t *olen, in mbedtls_rsa_rsaes_oaep_decrypt() argument
2091 *olen = output_max_len; in mbedtls_rsa_rsaes_oaep_decrypt()
2102 olen); in mbedtls_rsa_rsaes_oaep_decrypt()
2108 if( *olen > output_max_len ) in mbedtls_rsa_rsaes_oaep_decrypt()
2134 size_t *olen, in mbedtls_rsa_rsaes_pkcs1_v15_decrypt() argument
2199 *olen = output_max_len; in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
2206 olen); in mbedtls_rsa_rsaes_pkcs1_v15_decrypt()
[all …]
/trusted-firmware-m-3.5.0/platform/ext/target/stm/common/hal/Native_Driver/
Dlow_level_rng.c133 int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t *olen) in mbedtls_hardware_poll() argument
135 RNG_GetBytes(output, len, olen); in mbedtls_hardware_poll()
136 if (*olen != len) in mbedtls_hardware_poll()
Dlow_level_rng.h20 int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t *olen);
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/host/src/tests/integration_cc3x/runtime_integration_test/tests/
Drun_integration_ecies.c110 size_t olen = 0; in runIt_eciesRandom() local
111 …PI(mbedtls_ecp_point_write_binary(pGrp, pQ, MBEDTLS_ECP_PF_UNCOMPRESSED, &olen, pBuf, MBEDTLS_ECIE… in runIt_eciesRandom()
112 RUNIT_PRINT_BUF(pBuf, olen, "public binary"); in runIt_eciesRandom()
209 size_t olen = 0; in runIt_eciesVector() local
246 …RUNIT_ASSERT(mbedtls_ecp_point_write_binary(pGrp, pQ, MBEDTLS_ECP_PF_UNCOMPRESSED, &olen, (uint8_t… in runIt_eciesVector()
247 RUNIT_PRINT_BUF(pBuf, olen, "public binary"); in runIt_eciesVector()
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/codesafe/src/psa_driver_api/src/
Dcc3xx_psa_entropy.c107 int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len, size_t *olen) in mbedtls_hardware_poll() argument
110 return cc3xx_get_entropy(0, olen, output, len); in mbedtls_hardware_poll()
/trusted-firmware-m-3.5.0/platform/ext/target/stm/common/hal/accelerator/
Drsa_alt.c1457 size_t olen; in mbedtls_rsa_rsaes_oaep_encrypt() local
1478 olen = ctx->MBEDTLS_PRIVATE(len); in mbedtls_rsa_rsaes_oaep_encrypt()
1482 if( ilen + 2 * hlen + 2 < ilen || olen < ilen + 2 * hlen + 2 ) in mbedtls_rsa_rsaes_oaep_encrypt()
1485 memset( output, 0, olen ); in mbedtls_rsa_rsaes_oaep_encrypt()
1499 p += olen - 2 * hlen - 2 - ilen; in mbedtls_rsa_rsaes_oaep_encrypt()
1509 if( ( ret = mgf_mask( output + hlen + 1, olen - hlen - 1, output + 1, hlen, in mbedtls_rsa_rsaes_oaep_encrypt()
1514 if( ( ret = mgf_mask( output + 1, hlen, output + hlen + 1, olen - hlen - 1, in mbedtls_rsa_rsaes_oaep_encrypt()
1539 size_t nb_pad, olen; in mbedtls_rsa_rsaes_pkcs1_v15_encrypt() local
1549 olen = ctx->MBEDTLS_PRIVATE(len); in mbedtls_rsa_rsaes_pkcs1_v15_encrypt()
1552 if( ilen + 11 < ilen || olen < ilen + 11 ) in mbedtls_rsa_rsaes_pkcs1_v15_encrypt()
[all …]
Decp_alt.c762 int format, size_t *olen, in mbedtls_ecp_point_write_binary() argument
769 ECP_VALIDATE_RET( olen != NULL ); in mbedtls_ecp_point_write_binary()
780 *olen = plen; in mbedtls_ecp_point_write_binary()
781 if( buflen < *olen ) in mbedtls_ecp_point_write_binary()
799 *olen = 1; in mbedtls_ecp_point_write_binary()
806 *olen = 2 * plen + 1; in mbedtls_ecp_point_write_binary()
808 if( buflen < *olen ) in mbedtls_ecp_point_write_binary()
817 *olen = plen + 1; in mbedtls_ecp_point_write_binary()
819 if( buflen < *olen ) in mbedtls_ecp_point_write_binary()
937 int format, size_t *olen, in mbedtls_ecp_tls_write_point() argument
[all …]
Decdsa_alt.c217 size_t olen; in mbedtls_ecdsa_verify() local
257 …MBEDTLS_MPI_CHK( mbedtls_ecp_point_write_binary( grp, Q, MBEDTLS_ECP_PF_UNCOMPRESSED, &olen, Q_bin… in mbedtls_ecdsa_verify()
/trusted-firmware-m-3.5.0/lib/ext/cryptocell-312-runtime/shared/include/crypto_api/cc3x/
Dmbedtls_cc_ecdh_edwards.h61 size_t *olen,
Dmbedtls_cc_ecdsa_edwards.h150 size_t *olen,