/optee_os-3.20.0/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()
|
A D | base64.h | 12 bool _base64_enc(const void *data, size_t size, char *buf, size_t *blen); 13 bool _base64_dec(const char *data, size_t size, void *buf, size_t *blen);
|
/optee_os-3.20.0/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-3.20.0/core/lib/libtomcrypt/src/pk/asn1/der/bit/ |
A D | der_decode_bit_string.c | 24 unsigned long dlen, blen, x, y; in der_decode_bit_string() local 56 blen = ((dlen - 1) << 3) - (in[x++] & 7); in der_decode_bit_string() 59 if (blen > *outlen) { in der_decode_bit_string() 60 *outlen = blen; in der_decode_bit_string() 65 for (y = 0; y < blen; y++) { in der_decode_bit_string() 73 *outlen = blen; in der_decode_bit_string()
|
A D | der_decode_raw_bit_string.c | 27 unsigned long dlen, blen, x, y; in der_decode_raw_bit_string() local 59 blen = ((dlen - 1) << 3) - (in[x++] & 7); in der_decode_raw_bit_string() 62 if (blen > *outlen) { in der_decode_raw_bit_string() 63 *outlen = blen; in der_decode_raw_bit_string() 68 for (y = 0; y < blen; y++) { in der_decode_raw_bit_string() 80 *outlen = blen; in der_decode_raw_bit_string()
|
/optee_os-3.20.0/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 hw_get_random_bytes(void *buf, size_t blen) in hw_get_random_bytes() argument 36 return do_rng_read(buf, blen); in hw_get_random_bytes()
|
/optee_os-3.20.0/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-3.20.0/core/kernel/ |
A D | tee_misc.c | 36 uint32_t tee_b2hs(uint8_t *b, uint8_t *hs, uint32_t blen, uint32_t hslen) in tee_b2hs() argument 40 if (blen * 2 + 1 > hslen) in tee_b2hs() 43 for (; i < blen; i++) { in tee_b2hs() 47 hs[blen * 2] = 0; in tee_b2hs() 49 return blen * 2; in tee_b2hs() 52 uint32_t tee_hs2b(uint8_t *hs, uint8_t *b, uint32_t hslen, uint32_t blen) in tee_hs2b() argument 59 if (len > blen) in tee_hs2b()
|
/optee_os-3.20.0/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 …]
|
A D | ssl_tls13_keys.c | 138 unsigned char *buf, size_t blen ) in mbedtls_ssl_tls1_3_hkdf_expand_label() argument 158 if( blen > MBEDTLS_SSL_TLS1_3_KEY_SCHEDULE_MAX_EXPANSION_LEN ) in mbedtls_ssl_tls1_3_hkdf_expand_label() 168 ssl_tls1_3_hkdf_encode_label( blen, in mbedtls_ssl_tls1_3_hkdf_expand_label() 177 buf, blen ) ); in mbedtls_ssl_tls1_3_hkdf_expand_label()
|
/optee_os-3.20.0/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-3.20.0/core/tee/ |
A D | tee_svc.c | 124 *blen = sizeof(uuid); in get_prop_tee_dev_id() 127 *blen = sizeof(uuid); in get_prop_tee_dev_id() 166 *blen = sizeof(prot); in get_prop_tee_sys_time_prot_level() 197 size_t *blen) in get_prop_feat_bti_implemented() argument 215 size_t *blen) in get_prop_feat_pauth_implemented() argument 233 size_t *blen) in get_prop_feat_memtag_implemented() argument 238 *blen = sizeof(v); in get_prop_feat_memtag_implemented() 241 *blen = sizeof(v); in get_prop_feat_memtag_implemented() 472 if (buf && blen) { in syscall_get_property() 481 res2 = copy_to_user(blen, &klen, sizeof(*blen)); in syscall_get_property() [all …]
|
A D | tee_fs_rpc.c | 28 static TEE_Result create_filename(void *buf, size_t blen, in create_filename() argument 35 if (pos >= blen) in create_filename() 40 if (pos >= blen) in create_filename() 43 l = blen - pos; in create_filename()
|
/optee_os-3.20.0/core/crypto/ |
A D | rng_hw.c | 25 TEE_Result crypto_rng_read(void *buf, size_t blen) in crypto_rng_read() argument 30 return hw_get_random_bytes(buf, blen); in crypto_rng_read()
|
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()
|
/optee_os-3.20.0/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-3.20.0/core/lib/libtomcrypt/ |
A D | rsa.c | 210 unsigned long blen, offset; in rsadorep() local 249 if (*dst_len < blen - offset) { in rsadorep() 250 *dst_len = blen - offset; in rsadorep() 256 *dst_len = blen - offset; in rsadorep() 334 unsigned long blen; in sw_crypto_acipher_rsaes_decrypt() local 365 blen = mod_size - 11; in sw_crypto_acipher_rsaes_decrypt() 369 blen = src_len; in sw_crypto_acipher_rsaes_decrypt() 406 if (*dst_len < blen) { in sw_crypto_acipher_rsaes_decrypt() 407 *dst_len = blen; in sw_crypto_acipher_rsaes_decrypt() 413 *dst_len = blen; in sw_crypto_acipher_rsaes_decrypt() [all …]
|
/optee_os-3.20.0/lib/libmbedtls/core/ |
A D | rsa.c | 297 buf = malloc(blen); in sw_crypto_acipher_rsanopad_encrypt() 303 memset(buf, 0, blen); in sw_crypto_acipher_rsanopad_encrypt() 357 buf = malloc(blen); in sw_crypto_acipher_rsanopad_decrypt() 363 memset(buf, 0, blen); in sw_crypto_acipher_rsanopad_decrypt() 410 size_t blen = 0; in sw_crypto_acipher_rsaes_decrypt() local 427 blen = mod_size - 11; in sw_crypto_acipher_rsaes_decrypt() 431 blen = src_len; in sw_crypto_acipher_rsaes_decrypt() 435 buf = malloc(blen); in sw_crypto_acipher_rsaes_decrypt() 473 if (*dst_len < blen) { in sw_crypto_acipher_rsaes_decrypt() 474 *dst_len = blen; in sw_crypto_acipher_rsaes_decrypt() [all …]
|
/optee_os-3.20.0/core/include/kernel/ |
A D | tee_misc.h | 21 uint32_t tee_b2hs(uint8_t *b, uint8_t *hs, uint32_t blen, uint32_t hslen); 27 uint32_t tee_hs2b(uint8_t *hs, uint8_t *b, uint32_t hslen, uint32_t blen);
|
/optee_os-3.20.0/core/arch/arm/include/kernel/ |
A D | spmc_sp_handler.h | 26 size_t blen, uint64_t *global_handle, 34 size_t blen __unused, in spmc_sp_add_share()
|
/optee_os-3.20.0/ta/pkcs11/src/ |
A D | serializer.c | 176 enum pkcs11_rc serialize(char **bstart, size_t *blen, void *data, size_t len) in serialize() argument 181 if (ADD_OVERFLOW(*blen, len, &nlen)) in serialize() 188 TEE_MemMove(buf + *blen, data, len); in serialize() 190 *blen = nlen; in serialize()
|
/optee_os-3.20.0/core/include/tee/ |
A D | tee_svc.h | 25 void *buf, size_t *blen); 46 void *buf, uint32_t *blen,
|
/optee_os-3.20.0/core/include/ |
A D | rng_support.h | 10 TEE_Result hw_get_random_bytes(void *buf, size_t blen);
|