Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 489) sorted by relevance

12345678910>>...20

/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/
A Dder_encode_asn1_length.c31 x = len; in der_encode_asn1_length()
43 if (len < 128) { in der_encode_asn1_length()
53 if (len < 128) { in der_encode_asn1_length()
54 out[x++] = (unsigned char)len; in der_encode_asn1_length()
55 } else if (len <= 0xffUL) { in der_encode_asn1_length()
57 out[x++] = (unsigned char)len; in der_encode_asn1_length()
58 } else if (len <= 0xffffUL) { in der_encode_asn1_length()
61 out[x++] = (unsigned char)(len&255); in der_encode_asn1_length()
62 } else if (len <= 0xffffffUL) { in der_encode_asn1_length()
76 } else if (len <= 0xffffffffUL) { in der_encode_asn1_length()
[all …]
/optee_os/lib/libmbedtls/mbedtls/library/
A Dasn1write.c39 if( len < 0x80 ) in mbedtls_asn1_write_len()
114 size_t len = 0; in mbedtls_asn1_write_raw_buffer() local
119 len = size; in mbedtls_asn1_write_raw_buffer()
120 (*p) -= len; in mbedtls_asn1_write_raw_buffer()
130 size_t len = 0; in mbedtls_asn1_write_mpi() local
139 (*p) -= len; in mbedtls_asn1_write_mpi()
151 len += 1; in mbedtls_asn1_write_mpi()
221 len++; in mbedtls_asn1_write_bool()
238 len += 1; in asn1_write_tagged_int()
249 len += 1; in asn1_write_tagged_int()
[all …]
A Dx509write_crt.c141 size_t len = 0; in mbedtls_x509write_crt_set_basic_constraints() local
166 is_ca, buf + sizeof(buf) - len, len ) ); in mbedtls_x509write_crt_set_basic_constraints()
175 size_t len = 0; in mbedtls_x509write_crt_set_subject_key_identifier() local
181 ret = mbedtls_sha1_ret( buf + sizeof( buf ) - len, len, in mbedtls_x509write_crt_set_subject_key_identifier()
186 len = 20; in mbedtls_x509write_crt_set_subject_key_identifier()
195 0, buf + sizeof(buf) - len, len ); in mbedtls_x509write_crt_set_subject_key_identifier()
203 size_t len = 0; in mbedtls_x509write_crt_set_authority_key_identifier() local
209 ret = mbedtls_sha1_ret( buf + sizeof( buf ) - len, len, in mbedtls_x509write_crt_set_authority_key_identifier()
214 len = 20; in mbedtls_x509write_crt_set_authority_key_identifier()
229 0, buf + sizeof( buf ) - len, len ); in mbedtls_x509write_crt_set_authority_key_identifier()
[all …]
A Dasn1parse.c123 size_t len; in mbedtls_asn1_get_bool() local
128 if( len != 1 ) in mbedtls_asn1_get_bool()
142 size_t len; in asn1_get_tagged_int() local
161 --len; in asn1_get_tagged_int()
201 size_t len; in mbedtls_asn1_get_mpi() local
208 *p += len; in mbedtls_asn1_get_mpi()
258 size_t len; in mbedtls_asn1_traverse_sequence_of() local
309 --( *len ); in mbedtls_asn1_get_bitstring_null()
357 cur->buf.len = len; in asn1_get_sequence_of_cb()
384 size_t len; in mbedtls_asn1_get_alg() local
[all …]
A Dx509_create.c240 size_t len = 0; in x509_write_name() local
256 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in x509_write_name()
261 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in x509_write_name()
273 size_t len = 0; in mbedtls_x509_write_names() local
282 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( p, start, len ) ); in mbedtls_x509_write_names()
294 size_t len = 0; in mbedtls_x509_write_sig() local
299 len = size; in mbedtls_x509_write_sig()
300 (*p) -= len; in mbedtls_x509_write_sig()
307 len += 1; in mbedtls_x509_write_sig()
324 size_t len = 0; in x509_write_extension() local
[all …]
A Dentropy_poll.c81 *olen = len; in mbedtls_platform_entropy_poll()
144 size_t len; in sysctl_arnd_wrapper() local
154 buflen -= len; in sysctl_arnd_wrapper()
155 buf += len; in sysctl_arnd_wrapper()
191 *olen = len; in mbedtls_platform_entropy_poll()
202 if( read_len != len ) in mbedtls_platform_entropy_poll()
209 *olen = len; in mbedtls_platform_entropy_poll()
225 if( len < sizeof(unsigned char) ) in mbedtls_null_entropy_poll()
262 *olen = len; in mbedtls_havege_poll()
281 if( len < use_len ) in mbedtls_nv_seed_poll()
[all …]
A Dpkwrite.c76 size_t len = 0; in pk_write_rsa_pubkey() local
85 len += ret; in pk_write_rsa_pubkey()
91 len += ret; in pk_write_rsa_pubkey()
115 size_t len = 0; in pk_write_ec_pubkey() local
128 *p -= len; in pk_write_ec_pubkey()
143 size_t len = 0; in pk_write_ec_param() local
180 size_t len = 0; in mbedtls_pk_write_pubkey() local
251 len += 1; in mbedtls_pk_write_pubkey_der()
317 size_t len = 0; in mbedtls_pk_write_key_der() local
342 len += ret; in mbedtls_pk_write_key_der()
[all …]
A Dx509write_csr.c148 size_t len = 0; in x509write_csr_der_internal() local
162 if( len ) in x509write_csr_der_internal()
164 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in x509write_csr_der_internal()
170 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in x509write_csr_der_internal()
181 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in x509write_csr_der_internal()
188 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in x509write_csr_der_internal()
197 len += pub_len; in x509write_csr_der_internal()
210 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c, buf, len ) ); in x509write_csr_der_internal()
276 c2 -= len; in x509write_csr_der_internal()
281 MBEDTLS_ASN1_CHK_ADD( len, mbedtls_asn1_write_len( &c2, buf, len ) ); in x509write_csr_der_internal()
[all …]
A Dpkparse.c245 size_t len; in pk_group_from_specified() local
284 p += len; in pk_group_from_specified()
321 p += len; in pk_group_from_specified()
329 p += len; in pk_group_from_specified()
363 p += len; in pk_group_from_specified()
527 size_t len; in pk_get_rsapubkey() local
545 *p += len; in pk_get_rsapubkey()
555 *p += len; in pk_get_rsapubkey()
614 size_t len; in mbedtls_pk_parse_subpubkey() local
709 size_t len; in pk_parse_key_pkcs1_der() local
[all …]
A Decjpake.c158 size_t len; in ecjpake_write_len_point() local
174 *p += 4 + len; in ecjpake_write_len_point()
326 size_t len; in ecjpake_zkp_write() local
346 *p += len; in ecjpake_zkp_write()
349 if( end < *p || (size_t)( end - *p ) < 1 + len || len > 255 ) in ecjpake_zkp_write()
357 *p += len; in ecjpake_zkp_write()
421 size_t len; in ecjpake_kkp_write() local
431 *p += len; in ecjpake_kkp_write()
760 if( len < *olen ) in mbedtls_ecjpake_derive_secret()
978 while( len > 0 ) in ecjpake_lgc()
[all …]
A Dx509.c150 size_t len; in x509_get_hash_alg() local
171 p += md_oid.len; in x509_get_hash_alg()
210 size_t len; in mbedtls_x509_get_rsassa_pss_params() local
351 size_t len; in x509_get_attr_type_value() local
359 end = *p + len; in x509_get_attr_type_value()
569 len -= 2; in x509_parse_time()
580 len--; in x509_parse_time()
632 size_t len; in mbedtls_x509_get_sig() local
645 sig->len = len; in mbedtls_x509_get_sig()
648 *p += len; in mbedtls_x509_get_sig()
[all …]
A Dx509_crt.c300 a->len == b->len && in x509_string_cmp()
308 a->len == b->len && in x509_string_cmp()
337 a->oid.len != b->oid.len || in x509_name_cmp()
810 policy_oid.len = len; in x509_get_certificate_policies()
844 buf->len = policy_oid.len; in x509_get_certificate_policies()
1122 p += crt->raw.len - len; in x509_crt_parse_der_core()
1304 if( crt->sig_oid.len != sig_oid2.len || in x509_crt_parse_der_core()
1307 sig_params1.len != sig_params2.len || in x509_crt_parse_der_core()
1581 len = MAX_PATH - len; in mbedtls_x509_crt_parse_path()
1712 cur_oid.len = len; in x509_get_other_name()
[all …]
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/
A Dder_decode_sequence_flexi.c84 len = 0; in der_decode_sequence_flexi()
126 len = 0; in der_decode_sequence_flexi()
203 l->size = len; in der_decode_sequence_flexi()
234 len = 2; in der_decode_sequence_flexi()
245 l->size = len; in der_decode_sequence_flexi()
275 l->size = len; in der_decode_sequence_flexi()
298 l->size = len; in der_decode_sequence_flexi()
374 len = *inlen; in der_decode_sequence_flexi()
508 totlen += len; in der_decode_sequence_flexi()
509 in += len; in der_decode_sequence_flexi()
[all …]
/optee_os/core/drivers/crypto/caam/include/
A Dcaam_desc_helper.h49 size_t len = 0; in dump_desc() local
71 #define DESC_HEADER(len) (DESC_HDR(0) | HDR_JD_DESCLEN(len)) argument
76 #define DESC_HEADER_IDX(len, idx) (DESC_HDR(idx) | HDR_JD_DESCLEN(len)) argument
136 LOAD_LENGTH(len))
141 #define LD_NOCLASS_IMM(dst, len) LD_IMM(CLASS_NO, dst, len) argument
155 LOAD_LENGTH(len))
371 KEY_LENGTH(len))
380 KEY_LENGTH(len))
387 KEY_LENGTH(len))
543 #define SEQ_IN_PTR(len) (CMD_SEQ_IN_TYPE | SEQ_LENGTH(len)) argument
[all …]
A Dcaam_desc_defines.h38 #define HDR_JD_DESCLEN(len) SHIFT_U32((len) & 0x7F, 0) argument
57 #define KEY_LENGTH(len) SHIFT_U32((len) & 0x3FF, 0) argument
71 #define LOAD_LENGTH(len) SHIFT_U32((len) & 0xFF, 0) argument
86 #define STORE_LENGTH(len) SHIFT_U32((len) & 0xFF, 0) argument
284 #define MOVE_LENGTH(len) SHIFT_U32((len) & 0xFF, 0) argument
532 #define MATH_LENGTH(len) SHIFT_U32((len) & 0xF, 0) argument
549 #define SEQ_LENGTH(len) SHIFT_U32((len) & 0xFFFF, 0) argument
658 #define PDB_DSA_SIGN_N(len) SHIFT_U32((len) & (0x7F), 0) argument
659 #define PDB_DSA_SIGN_L(len) SHIFT_U32((len) & (0x3FF), 7) argument
667 #define PDB_DSA_VERIF_N(len) SHIFT_U32((len) & (0x7F), 0) argument
[all …]
/optee_os/core/include/mm/
A Dcore_memprot.h41 #define tee_pbuf_is_non_sec(buf, len) \ argument
42 core_pbuf_is(CORE_MEM_NON_SEC, (paddr_t)(buf), (len))
44 #define tee_pbuf_is_sec(buf, len) \ argument
45 core_pbuf_is(CORE_MEM_SEC, (paddr_t)(buf), (len))
47 #define tee_vbuf_is_non_sec(buf, len) \ argument
48 core_vbuf_is(CORE_MEM_NON_SEC, (void *)(buf), (len))
50 #define tee_vbuf_is_sec(buf, len) \ argument
51 core_vbuf_is(CORE_MEM_SEC, (void *)(buf), (len))
85 void *phys_to_virt_io(paddr_t pa, size_t len);
115 vaddr_t io_pa_or_va_nsec(struct io_pa_va *p, size_t len);
[all …]
/optee_os/core/lib/zlib/
A Dinftrees.c108 for (len = 0; len <= MAXBITS; len++)
109 count[len] = 0;
133 for (len = 1; len <= MAXBITS; len++) {
135 left -= count[len];
143 for (len = 1; len < MAXBITS; len++)
144 offs[len + 1] = offs[len] + count[len];
232 incr = 1U << (len - drop);
241 incr = 1U << (len - 1);
253 if (--(count[len]) == 0) {
254 if (len == max) break;
[all …]
A Dinffast.c204 len -= op;
240 while (len > 2) {
244 len -= 3;
246 if (len) {
248 if (len > 1)
258 len -= 3;
260 if (len) {
262 if (len > 1)
294 len = bits >> 3;
295 in -= len;
[all …]
/optee_os/lib/libutee/
A Dtee_api_panic.c40 if (!len) in check_access()
47 return TEE_CheckMemoryAccessRights(flags, buf, len); in check_access()
52 void __utee_check_outbuf_annotation(void *buf, uint32_t *len) in __utee_check_outbuf_annotation() argument
55 check_access(ACCESS_RW, len, sizeof(*len))); in __utee_check_outbuf_annotation()
57 check_access(ACCESS_W_ANY, buf, *len)); in __utee_check_outbuf_annotation()
69 check_access(ACCESS_RW, len, sizeof(*len))); in __utee_check_outstring_annotation()
71 check_access(ACCESS_W_ANY, buf, *len)); in __utee_check_outstring_annotation()
74 void __utee_check_out_annotation(void *buf, const size_t len) in __utee_check_out_annotation() argument
77 check_access(ACCESS_W, buf, len)); in __utee_check_out_annotation()
86 void __utee_check_inout_annotation(void *buf, const size_t len) in __utee_check_inout_annotation() argument
[all …]
/optee_os/core/lib/libtomcrypt/src/math/
A Drand_prime.c21 int rand_prime(void *N, long len, prng_state *prng, int wprng) in rand_prime() argument
29 if (len < 0) { in rand_prime()
31 len = -len; in rand_prime()
37 if (len < 2 || len > 512) { in rand_prime()
47 buf = XCALLOC(1, len); in rand_prime()
54 if (prng_descriptor[wprng]->read(buf, len, prng) != (unsigned long)len) { in rand_prime()
61 buf[len-1] |= 0x01 | ((type & USE_BBS) ? 0x02 : 0x00); in rand_prime()
64 if ((err = mp_read_unsigned_bin(N, buf, len)) != CRYPT_OK) { in rand_prime()
77 zeromem(buf, len); in rand_prime()
/optee_os/core/kernel/
A Duser_access.c16 static TEE_Result check_access(uint32_t flags, vaddr_t va, size_t len) in check_access() argument
23 TEE_Result copy_from_user(void *kaddr, const void *uaddr, size_t len) in copy_from_user() argument
26 TEE_Result res = check_access(flags, (vaddr_t)uaddr, len); in copy_from_user()
29 memcpy(kaddr, uaddr, len); in copy_from_user()
34 TEE_Result copy_to_user(void *uaddr, const void *kaddr, size_t len) in copy_to_user() argument
37 TEE_Result res = check_access(flags, (vaddr_t)uaddr, len); in copy_to_user()
40 memcpy(uaddr, kaddr, len); in copy_to_user()
48 TEE_Result res = check_access(flags, (vaddr_t)uaddr, len); in copy_from_user_private()
51 memcpy(kaddr, uaddr, len); in copy_from_user_private()
59 TEE_Result res = check_access(flags, (vaddr_t)uaddr, len); in copy_to_user_private()
[all …]
/optee_os/core/tee/
A Dtee_supp_plugin_rpc.c19 uint32_t sub_cmd, void *buf, size_t len, in tee_invoke_supp_plugin_rpc() argument
38 if (!uuid || (len && !buf) || (!len && buf)) in tee_invoke_supp_plugin_rpc()
41 if (len) { in tee_invoke_supp_plugin_rpc()
42 mobj = thread_rpc_alloc_payload(len); in tee_invoke_supp_plugin_rpc()
48 va = mobj_get_va(mobj, 0, len); in tee_invoke_supp_plugin_rpc()
54 memcpy(va, buf, len); in tee_invoke_supp_plugin_rpc()
63 params[3] = THREAD_PARAM_MEMREF(INOUT, mobj, 0, len); in tee_invoke_supp_plugin_rpc()
70 if (len && outlen && *outlen) in tee_invoke_supp_plugin_rpc()
71 memcpy(buf, va, *outlen <= len ? *outlen : len); in tee_invoke_supp_plugin_rpc()
74 if (len) in tee_invoke_supp_plugin_rpc()
/optee_os/core/lib/libfdt/
A Dfdt_wip.c16 int len) in fdt_setprop_inplace_namelen_partial() argument
26 if (proplen < (len + idx)) in fdt_setprop_inplace_namelen_partial()
29 memcpy((char *)propval + idx, val, len); in fdt_setprop_inplace_namelen_partial()
34 const void *val, int len) in fdt_setprop_inplace() argument
43 if (proplen != len) in fdt_setprop_inplace()
48 val, len); in fdt_setprop_inplace()
51 static void fdt_nop_region_(void *start, int len) in fdt_nop_region_() argument
55 for (p = start; (char *)p < ((char *)start + len); p++) in fdt_nop_region_()
62 int len; in fdt_nop_property() local
66 return len; in fdt_nop_property()
[all …]
A Dfdt_overlay.c31 int len; in overlay_get_target_phandle() local
121 int len; in overlay_phandle_add_offset() local
125 return len; in overlay_phandle_add_offset()
432 int len; in overlay_fixup_phandle() local
440 return len; in overlay_fixup_phandle()
673 if (len == 0) in get_path_len()
674 len++; in get_path_len()
675 return len; in get_path_len()
791 len = ret; in overlay_symbol_update()
797 len + (len > 1) + rel_path_len + 1, &p); in overlay_symbol_update()
[all …]
/optee_os/core/lib/libtomcrypt/src/encauth/chachapoly/
A Dchacha20poly1305_test.c36 unsigned long len; in chacha20poly1305_test()
54 len = sizeof(emac); in chacha20poly1305_test()
55 if ((err = chacha20poly1305_done(&st1, emac, &len)) != CRYPT_OK) return err; in chacha20poly1305_test()
66 len = sizeof(dmac); in chacha20poly1305_test()
73 len = sizeof(emac); in chacha20poly1305_test()
80 len = sizeof(dmac); in chacha20poly1305_test()
91 len = sizeof(emac); in chacha20poly1305_test()
102 len = sizeof(dmac); in chacha20poly1305_test()
113 len = sizeof(emac); in chacha20poly1305_test()
121 len = sizeof(dmac); in chacha20poly1305_test()
[all …]

Completed in 46 milliseconds

12345678910>>...20