| /optee_os/ldelf/ |
| A D | main.c | 55 size_t blen; member 64 size_t blen = 0; in print_to_pbuf() local 67 if (pbuf->buf && pbuf->blen > pbuf->ret) { in print_to_pbuf() 69 blen = pbuf->blen - pbuf->ret; in print_to_pbuf() 72 ret = vsnprintk(buf, blen, fmt, ap); in print_to_pbuf() 82 size_t blen = 0; in copy_to_pbuf() local 84 if (pbuf->buf && pbuf->blen > pbuf->ret) { in copy_to_pbuf() 86 blen = pbuf->blen - pbuf->ret; in copy_to_pbuf() 87 memcpy(buf, b, MIN(blen, bl)); in copy_to_pbuf() 96 struct print_buf_ctx pbuf = { .buf = buf, .blen = *blen }; in ftrace_dump() [all …]
|
| /optee_os/lib/libutee/ |
| A D | base64.c | 16 bool _base64_enc(const void *data, size_t dlen, char *buf, size_t *blen) in _base64_enc() argument 23 if (*blen < n) { in _base64_enc() 24 *blen = n; in _base64_enc() 56 *blen = boffs; in _base64_enc() 73 bool _base64_dec(const char *data, size_t size, void *buf, size_t *blen) in _base64_dec() argument 96 if (b && m < *blen) in _base64_dec() 103 if (b && m < *blen) in _base64_dec() 110 if (b && m < *blen) in _base64_dec() 124 ret = (!m && !*blen) || (b && (m <= *blen)); in _base64_dec() 125 *blen = m; in _base64_dec()
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| A D | ecdh.c | 333 blen ) ) != 0 ) in ecdh_make_params_internal() 337 blen -= grp_len; in ecdh_make_params_internal() 355 unsigned char *buf, size_t blen, in mbedtls_ecdh_make_params() argument 554 buf, blen ); in ecdh_make_public_internal() 561 unsigned char *buf, size_t blen, in mbedtls_ecdh_make_public() argument 604 blen ) ) != 0 ) in ecdh_read_public_internal() 607 if( (size_t)( p - buf ) != blen ) in ecdh_read_public_internal() 623 return( ecdh_read_public_internal( ctx, buf, blen ) ); in mbedtls_ecdh_read_public() 643 size_t blen, in ecdh_calc_secret_internal() argument 680 if( mbedtls_mpi_size( &ctx->z ) > blen ) in ecdh_calc_secret_internal() [all …]
|
| A D | ecdsa.c | 228 const unsigned char *buf, size_t blen ) in derive_mpi() argument 232 size_t use_size = blen > n_size ? n_size : blen; in derive_mpi() 349 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_sign_restartable() 412 ECDSA_VALIDATE_RET( buf != NULL || blen == 0 ); in mbedtls_ecdsa_sign() 415 return( ecdsa_sign_restartable( grp, r, s, d, buf, blen, in mbedtls_ecdsa_sign() 462 MBEDTLS_MPI_CHK( derive_mpi( grp, &h, buf, blen ) ); in ecdsa_sign_det_restartable() 475 ret = mbedtls_ecdsa_sign( grp, r, s, d, buf, blen, in ecdsa_sign_det_restartable() 566 ECDSA_VALIDATE_RET( buf != NULL || blen == 0 ); in mbedtls_ecdsa_sign_det() 585 ECDSA_VALIDATE_RET( buf != NULL || blen == 0 ); in mbedtls_ecdsa_sign_det_ext() 645 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_verify_restartable() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/bit/ |
| A D | der_decode_bit_string.c | 31 unsigned long dlen, blen, x, y; in der_decode_bit_string() local 63 blen = ((dlen - 1) << 3) - (in[x++] & 7); in der_decode_bit_string() 66 if (blen > *outlen) { in der_decode_bit_string() 67 *outlen = blen; in der_decode_bit_string() 72 for (y = 0; y < blen; y++) { in der_decode_bit_string() 80 *outlen = blen; in der_decode_bit_string()
|
| A D | der_decode_raw_bit_string.c | 34 unsigned long dlen, blen, x, y; in der_decode_raw_bit_string() local 66 blen = ((dlen - 1) << 3) - (in[x++] & 7); in der_decode_raw_bit_string() 69 if (blen > *outlen) { in der_decode_raw_bit_string() 70 *outlen = blen; in der_decode_raw_bit_string() 75 for (y = 0; y < blen; y++) { in der_decode_raw_bit_string() 87 *outlen = blen; in der_decode_raw_bit_string()
|
| /optee_os/core/pta/ |
| A D | device.c | 24 uint32_t blen, uint32_t *pos, uint32_t rflags) in add_ta() argument 33 if (*pos + sizeof(*uuid) <= blen) in add_ta() 47 uint32_t blen = 0; in get_devices() local 60 blen = params[0].memref.size; in get_devices() 63 add_ta(ta->flags, &ta->uuid, buf, blen, &pos, rflags); in get_devices() 67 add_ta(eta->flags, &eta->uuid, buf, blen, &pos, in get_devices() 71 if (pos > blen) in get_devices()
|
| /optee_os/core/kernel/ |
| A D | tee_misc.c | 34 uint32_t tee_b2hs(uint8_t *b, uint8_t *hs, uint32_t blen, uint32_t hslen) in tee_b2hs() argument 38 if (blen * 2 + 1 > hslen) in tee_b2hs() 41 for (; i < blen; i++) { in tee_b2hs() 45 hs[blen * 2] = 0; in tee_b2hs() 47 return blen * 2; in tee_b2hs() 50 uint32_t tee_hs2b(uint8_t *hs, uint8_t *b, uint32_t hslen, uint32_t blen) in tee_hs2b() argument 57 if (len > blen) in tee_hs2b()
|
| /optee_os/core/drivers/crypto/se050/core/ |
| A D | rng.c | 12 static TEE_Result do_rng_read(void *buf, size_t blen) in do_rng_read() argument 18 status = sss_se05x_rng_get_random(&rng, buf, blen); in do_rng_read() 31 TEE_Result crypto_rng_read(void *buf, size_t blen) in crypto_rng_read() argument 36 return do_rng_read(buf, blen); in crypto_rng_read()
|
| A D | rsa.c | 287 size_t blen = 0; in decrypt_nopad() local 303 blen = CFG_CORE_BIGNUM_MAX_BITS / 8; in decrypt_nopad() 304 buf = mempool_calloc(mempool_default, 1, blen); in decrypt_nopad() 324 if (*dst_len < blen - offset) { in decrypt_nopad() 325 *dst_len = blen - offset; in decrypt_nopad() 330 *dst_len = blen - offset; in decrypt_nopad() 351 size_t blen = 0; in encrypt_nopad() local 365 blen = CFG_CORE_BIGNUM_MAX_BITS / 8; in encrypt_nopad() 386 if (*dst_len < blen - offset) { in encrypt_nopad() 387 *dst_len = blen - offset; in encrypt_nopad() [all …]
|
| /optee_os/lib/libmbedtls/core/ |
| A D | rsa.c | 262 buf = malloc(blen); in crypto_acipher_rsanopad_encrypt() 268 memset(buf, 0, blen); in crypto_acipher_rsanopad_encrypt() 315 buf = malloc(blen); in crypto_acipher_rsanopad_decrypt() 321 memset(buf, 0, blen); in crypto_acipher_rsanopad_decrypt() 359 size_t blen = 0; in crypto_acipher_rsaes_decrypt() local 376 blen = mod_size - 11; in crypto_acipher_rsaes_decrypt() 380 blen = src_len; in crypto_acipher_rsaes_decrypt() 384 buf = malloc(blen); in crypto_acipher_rsaes_decrypt() 422 if (*dst_len < blen) { in crypto_acipher_rsaes_decrypt() 423 *dst_len = blen; in crypto_acipher_rsaes_decrypt() [all …]
|
| /optee_os/core/tee/ |
| A D | tee_svc.c | 122 *blen = sizeof(uuid); in get_prop_tee_dev_id() 125 *blen = sizeof(uuid); in get_prop_tee_dev_id() 161 *blen = sizeof(prot); in get_prop_tee_sys_time_prot_level() 164 *blen = sizeof(prot); in get_prop_tee_sys_time_prot_level() 185 *blen = sizeof(TEE_UUID); in get_prop_ta_app_id() 188 *blen = sizeof(TEE_UUID); in get_prop_ta_app_id() 195 size_t *blen) in get_prop_feat_bti_implemented() argument 203 *blen = sizeof(bti_impl); in get_prop_feat_bti_implemented() 419 if (buf && blen) { in syscall_get_property() 428 res2 = copy_to_user(blen, &klen, sizeof(*blen)); in syscall_get_property() [all …]
|
| /optee_os/core/lib/libtomcrypt/ |
| A D | rsa.c | 194 buf = malloc(blen); in rsadorep() 225 *dst_len = blen - offset; in rsadorep() 231 *dst_len = blen - offset; in rsadorep() 286 unsigned long blen; in crypto_acipher_rsaes_decrypt() local 317 blen = mod_size - 11; in crypto_acipher_rsaes_decrypt() 321 blen = src_len; in crypto_acipher_rsaes_decrypt() 325 buf = malloc(blen); in crypto_acipher_rsaes_decrypt() 358 if (*dst_len < blen) { in crypto_acipher_rsaes_decrypt() 359 *dst_len = blen; in crypto_acipher_rsaes_decrypt() 365 *dst_len = blen; in crypto_acipher_rsaes_decrypt() [all …]
|
| /optee_os/core/arch/arm/plat-vexpress/ |
| A D | vendor_props.c | 29 void *buf, size_t *blen) in get_prop_endorsement() argument 38 if (*blen < sizeof(bin)) { in get_prop_endorsement() 39 *blen = sizeof(bin); in get_prop_endorsement() 42 *blen = sizeof(bin); in get_prop_endorsement()
|
| /optee_os/out/arm/export-ta_arm32/include/mbedtls/ |
| A D | ecdh.h | 283 unsigned char *buf, size_t blen, 365 unsigned char *buf, size_t blen, 389 const unsigned char *buf, size_t blen ); 422 unsigned char *buf, size_t blen,
|
| A D | ecdsa.h | 173 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 233 const unsigned char *buf, size_t blen, 279 const unsigned char *buf, size_t blen, 318 const unsigned char *buf, size_t blen,
|
| /optee_os/out/arm/export-ta_arm64/host_include/mbedtls/ |
| A D | ecdh.h | 283 unsigned char *buf, size_t blen, 365 unsigned char *buf, size_t blen, 389 const unsigned char *buf, size_t blen ); 422 unsigned char *buf, size_t blen,
|
| A D | ecdsa.h | 173 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 233 const unsigned char *buf, size_t blen, 279 const unsigned char *buf, size_t blen, 318 const unsigned char *buf, size_t blen,
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| A D | ecdh.h | 283 unsigned char *buf, size_t blen, 365 unsigned char *buf, size_t blen, 389 const unsigned char *buf, size_t blen ); 422 unsigned char *buf, size_t blen,
|
| A D | ecdsa.h | 173 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 233 const unsigned char *buf, size_t blen, 279 const unsigned char *buf, size_t blen, 318 const unsigned char *buf, size_t blen,
|
| /optee_os/out/arm/export-ta_arm64/include/mbedtls/ |
| A D | ecdh.h | 283 unsigned char *buf, size_t blen, 365 unsigned char *buf, size_t blen, 389 const unsigned char *buf, size_t blen ); 422 unsigned char *buf, size_t blen,
|
| A D | ecdsa.h | 173 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 233 const unsigned char *buf, size_t blen, 279 const unsigned char *buf, size_t blen, 318 const unsigned char *buf, size_t blen,
|
| /optee_os/out/arm/export-ta_arm32/host_include/mbedtls/ |
| A D | ecdh.h | 283 unsigned char *buf, size_t blen, 365 unsigned char *buf, size_t blen, 389 const unsigned char *buf, size_t blen ); 422 unsigned char *buf, size_t blen,
|
| A D | ecdsa.h | 173 const mbedtls_mpi *d, const unsigned char *buf, size_t blen, 233 const unsigned char *buf, size_t blen, 279 const unsigned char *buf, size_t blen, 318 const unsigned char *buf, size_t blen,
|
| /optee_os/core/crypto/ |
| A D | rng_fortuna.c | 341 static TEE_Result generate_random_data(void *buf, size_t blen) in generate_random_data() argument 345 res = generate_blocks(buf, blen / BLOCK_SIZE); in generate_random_data() 348 if (blen % BLOCK_SIZE) { in generate_random_data() 350 uint8_t *b = (uint8_t *)buf + ROUNDDOWN(blen, BLOCK_SIZE); in generate_random_data() 355 memcpy(b, block, blen % BLOCK_SIZE); in generate_random_data() 476 static TEE_Result fortuna_read(void *buf, size_t blen) in fortuna_read() argument 489 if (blen) { in fortuna_read() 492 res = generate_random_data(buf, blen); in fortuna_read() 514 TEE_Result crypto_rng_read(void *buf, size_t blen) in crypto_rng_read() argument 523 n = MIN(blen - offs, SIZE_1M); in crypto_rng_read()
|