Home
last modified time | relevance | path

Searched refs:outlen (Results 1 – 25 of 159) sorted by relevance

1234567

/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/
A Dder_encode_sequence_ex.c46 if (*outlen < y) { in der_encode_sequence_ex()
47 *outlen = y; in der_encode_sequence_ex()
56 y = *outlen - x; in der_encode_sequence_ex()
63 *outlen -= x; in der_encode_sequence_ex()
75 z = *outlen; in der_encode_sequence_ex()
82 z = *outlen; in der_encode_sequence_ex()
89 z = *outlen; in der_encode_sequence_ex()
96 z = *outlen; in der_encode_sequence_ex()
103 z = *outlen; in der_encode_sequence_ex()
201 *outlen -= z; in der_encode_sequence_ex()
[all …]
/optee_os/core/lib/libtomcrypt/src/headers/
A Dtomcrypt_pk.h292 unsigned char *out, unsigned long *outlen);
450 unsigned char *out, unsigned long *outlen,
595 #define der_encode_sequence(list, inlen, out, outlen) der_encode_sequence_ex(list, inlen, out, outl… argument
621 #define der_decode_sequence(in, inlen, list, outlen) der_decode_sequence_ex(in, inlen, list, outlen argument
622 …fine der_decode_sequence_strict(in, inlen, list, outlen) der_decode_sequence_ex(in, inlen, list, o… argument
625 unsigned long *outlen);
636 unsigned long *outlen,
640 #define der_decode_set(in, inlen, list, outlen) der_decode_sequence_ex(in, inlen, list, outlen, LTC… argument
659 int der_length_boolean(unsigned long *outlen);
661 unsigned char *out, unsigned long *outlen);
[all …]
A Dtomcrypt_misc.h14 char *out, unsigned long *outlen);
17 unsigned char *out, unsigned long *outlen);
19 unsigned char *out, unsigned long *outlen);
21 unsigned char *out, unsigned long *outlen);
31 unsigned char *out, unsigned long *outlen);
33 unsigned char *out, unsigned long *outlen);
47 char *out, unsigned long *outlen,
50 unsigned char *out, unsigned long *outlen,
76 unsigned char *out, unsigned long outlen);
82 unsigned char *out, unsigned long outlen);
[all …]
A Dtomcrypt_prng.h110 unsigned long (*read)(unsigned char *out, unsigned long outlen, prng_state *prng);
122 int (*pexport)(unsigned char *out, unsigned long *outlen, prng_state *prng);
140 unsigned long yarrow_read(unsigned char *out, unsigned long outlen, prng_state *prng);
142 int yarrow_export(unsigned char *out, unsigned long *outlen, prng_state *prng);
155 int fortuna_export(unsigned char *out, unsigned long *outlen, prng_state *prng);
166 unsigned long rc4_read(unsigned char *out, unsigned long outlen, prng_state *prng);
168 int rc4_export(unsigned char *out, unsigned long *outlen, prng_state *prng);
192 int sprng_export(unsigned char *out, unsigned long *outlen, prng_state *prng);
204 int sober128_export(unsigned char *out, unsigned long *outlen, prng_state *prng);
221 unsigned long outlen,
[all …]
A Dtomcrypt_pkcs.h45 unsigned long *outlen);
52 unsigned long *outlen,
60 unsigned char *out, unsigned long *outlen);
65 unsigned char *out, unsigned long *outlen,
72 unsigned char *out, unsigned long *outlen);
88 unsigned char *out, unsigned long *outlen);
96 unsigned char *out, unsigned long *outlen);
102 unsigned char *out, unsigned long *outlen);
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/custom_type/
A Dder_encode_custom_type.c49 if (*outlen < y) { in der_encode_custom_type()
50 *outlen = y; in der_encode_custom_type()
72 y = *outlen - x; in der_encode_custom_type()
80 *outlen -= x; in der_encode_custom_type()
96 z = *outlen; in der_encode_custom_type()
103 z = *outlen; in der_encode_custom_type()
110 z = *outlen; in der_encode_custom_type()
117 z = *outlen; in der_encode_custom_type()
124 z = *outlen; in der_encode_custom_type()
223 *outlen -= z; in der_encode_custom_type()
[all …]
/optee_os/core/lib/libtomcrypt/src/misc/base64/
A Dbase64_decode.c86 unsigned char *out, unsigned long *outlen, in _base64_decode_internal() argument
95 LTC_ARGCHK(outlen != NULL); in _base64_decode_internal()
127 if (z + 3 > *outlen) return CRYPT_BUFFER_OVERFLOW; in _base64_decode_internal()
139 if (z + y - 1 > *outlen) return CRYPT_BUFFER_OVERFLOW; in _base64_decode_internal()
143 *outlen = z; in _base64_decode_internal()
157 unsigned char *out, unsigned long *outlen) in base64_decode() argument
171 unsigned char *out, unsigned long *outlen) in base64_strict_decode() argument
185 unsigned char *out, unsigned long *outlen) in base64_sane_decode() argument
201 unsigned char *out, unsigned long *outlen) in base64url_decode() argument
215 unsigned char *out, unsigned long *outlen) in base64url_strict_decode() argument
[all …]
A Dbase64_encode.c32 char *out, unsigned long *outlen, in _base64_encode_internal() argument
40 LTC_ARGCHK(outlen != NULL); in _base64_encode_internal()
44 if (*outlen < len2 + 1) { in _base64_encode_internal()
45 *outlen = len2 + 1; in _base64_encode_internal()
77 *outlen = (unsigned long)(p - out); /* the length without terminating NUL */ in _base64_encode_internal()
91 char *out, unsigned long *outlen) in base64_encode() argument
93 return _base64_encode_internal(in, inlen, out, outlen, codes_base64, 1); in base64_encode()
108 char *out, unsigned long *outlen) in base64url_encode() argument
110 return _base64_encode_internal(in, inlen, out, outlen, codes_base64url, 0); in base64url_encode()
114 char *out, unsigned long *outlen) in base64url_strict_encode() argument
[all …]
/optee_os/core/lib/libtomcrypt/src/misc/pkcs5/
A Dpkcs_5_1.c43 unsigned char *out, unsigned long *outlen, in _pkcs_5_alg1_common() argument
58 LTC_ARGCHK(outlen != NULL); in _pkcs_5_alg1_common()
78 while(block * hash_descriptor[hash_idx]->hashsize < *outlen) { in _pkcs_5_alg1_common()
113 if(outidx+nb > *outlen) { in _pkcs_5_alg1_common()
114 nb = *outlen - outidx; in _pkcs_5_alg1_common()
128 *outlen = hash_descriptor[hash_idx]->hashsize; in _pkcs_5_alg1_common()
158 unsigned char *out, unsigned long *outlen) in pkcs_5_alg1() argument
161 hash_idx, out, outlen, 0); in pkcs_5_alg1()
182 unsigned char *out, unsigned long *outlen) in pkcs_5_alg1_openssl() argument
185 hash_idx, out, outlen, 1); in pkcs_5_alg1_openssl()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/object_identifier/
A Dder_decode_object_identifier.c27 unsigned long *words, unsigned long *outlen) in der_decode_object_identifier() argument
34 LTC_ARGCHK(outlen != NULL); in der_decode_object_identifier()
42 if (*outlen < 2) { in der_decode_object_identifier()
43 *outlen = 2; in der_decode_object_identifier()
71 if (y >= *outlen) { in der_decode_object_identifier()
91 if (y > *outlen) { in der_decode_object_identifier()
97 *outlen = y; in der_decode_object_identifier()
/optee_os/core/lib/libtomcrypt/src/pk/ec25519/
A Dec25519_export.c27 int ec25519_export( unsigned char *out, unsigned long *outlen, in ec25519_export() argument
39 LTC_ARGCHK(outlen != NULL); in ec25519_export()
65 err = der_encode_sequence_multi(out, outlen, in ec25519_export()
71 if (*outlen < sizeof(key->priv)) { in ec25519_export()
77 *outlen = sizeof(key->priv); in ec25519_export()
82 …err = x509_encode_subject_public_key_info(out, outlen, key->algo, key->pub, 32uL, LTC_ASN1_EOL, NU… in ec25519_export()
84 if (*outlen < sizeof(key->pub)) { in ec25519_export()
90 *outlen = sizeof(key->pub); in ec25519_export()
/optee_os/core/lib/libtomcrypt/src/pk/ecc/
A Dltc_ecc_export_point.c15 int ltc_ecc_export_point(unsigned char *out, unsigned long *outlen, void *x, void *y, unsigned long… in ltc_ecc_export_point() argument
26 if (*outlen < (1 + size)) { in ltc_ecc_export_point()
27 *outlen = 1 + size; in ltc_ecc_export_point()
37 *outlen = 1 + size; in ltc_ecc_export_point()
40 if (*outlen < (1 + 2*size)) { in ltc_ecc_export_point()
41 *outlen = 1 + 2*size; in ltc_ecc_export_point()
55 *outlen = 1 + 2*size; in ltc_ecc_export_point()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/
A Dder_encode_asn1_identifier.c25 int der_encode_asn1_identifier(const ltc_asn1_list *id, unsigned char *out, unsigned long *outlen) in der_encode_asn1_identifier() argument
31 LTC_ARGCHK(outlen != NULL); in der_encode_asn1_identifier()
43 *outlen = 1; in der_encode_asn1_identifier()
57 if (*outlen < 1) { in der_encode_asn1_identifier()
68 *outlen = 1; in der_encode_asn1_identifier()
78 if (*outlen < tag_len + 1) { in der_encode_asn1_identifier()
87 *outlen = tag_len + 1; in der_encode_asn1_identifier()
/optee_os/core/lib/libtomcrypt/src/pk/rsa/
A Drsa_encrypt_key.c35 unsigned char *out, unsigned long *outlen, in rsa_encrypt_key_ex() argument
46 LTC_ARGCHK(outlen != NULL); in rsa_encrypt_key_ex()
72 if (modulus_bytelen > *outlen) { in rsa_encrypt_key_ex()
73 *outlen = modulus_bytelen; in rsa_encrypt_key_ex()
79 x = *outlen; in rsa_encrypt_key_ex()
87 x = *outlen; in rsa_encrypt_key_ex()
96 return ltc_mp.rsa_me(out, x, out, outlen, PK_PUBLIC, key); in rsa_encrypt_key_ex()
A Drsa_verify_hash.c106 unsigned long outlen; in rsa_verify_hash_ex() local
110 outlen = ((modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0)) - 3; in rsa_verify_hash_ex()
111 out = XMALLOC(outlen); in rsa_verify_hash_ex()
117 …if ((err = pkcs_1_v1_5_decode(tmpbuf, x, LTC_PKCS_1_EMSA, modulus_bitlen, out, &outlen, &decoded))… in rsa_verify_hash_ex()
146 if ((err = der_decode_sequence_strict(out, outlen, siginfo, 2)) != CRYPT_OK) { in rsa_verify_hash_ex()
149 if ((err = der_decode_sequence_strict(out, outlen, siginfo, 2)) != CRYPT_OK) { in rsa_verify_hash_ex()
161 if ((reallen == outlen) && in rsa_verify_hash_ex()
170 if ((hashlen == outlen) && in rsa_verify_hash_ex()
177 zeromem(out, outlen); in rsa_verify_hash_ex()
/optee_os/core/tee/
A Dtee_supp_plugin_rpc.c20 size_t *outlen) in tee_invoke_supp_plugin_rpc() argument
67 if (outlen) in tee_invoke_supp_plugin_rpc()
68 *outlen = params[2].u.value.b; 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()
/optee_os/core/lib/libtomcrypt/src/misc/hkdf/
A Dhkdf.c22 unsigned char *out, unsigned long *outlen) in hkdf_extract() argument
33 return hmac_memory(hash_idx, (const unsigned char *)"", 1, in, inlen, out, outlen); in hkdf_extract()
35 return hmac_memory(hash_idx, salt, saltlen, in, inlen, out, outlen); in hkdf_extract()
40 unsigned char *out, unsigned long outlen) in hkdf_expand() argument
58 if (inlen < hashsize || outlen > hashsize * 255) { in hkdf_expand()
82 Noutlen = MIN(hashsize, outlen - outoff); in hkdf_expand()
92 if (outoff >= outlen) { /* loop exit condition */ in hkdf_expand()
112 unsigned char *out, unsigned long outlen) in hkdf() argument
134 err = hkdf_expand(hash_idx, info, infolen, extracted, hashsize, out, outlen); in hkdf()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/ia5/
A Dder_encode_ia5_string.c28 unsigned char *out, unsigned long *outlen) in der_encode_ia5_string() argument
35 LTC_ARGCHK(outlen != NULL); in der_encode_ia5_string()
43 if (len > *outlen) { in der_encode_ia5_string()
44 *outlen = len; in der_encode_ia5_string()
51 len = *outlen - x; in der_encode_ia5_string()
63 *outlen = x; in der_encode_ia5_string()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/octet/
A Dder_encode_octet_string.c29 unsigned char *out, unsigned long *outlen) in der_encode_octet_string() argument
36 LTC_ARGCHK(outlen != NULL); in der_encode_octet_string()
44 if (len > *outlen) { in der_encode_octet_string()
45 *outlen = len; in der_encode_octet_string()
52 len = *outlen - x; in der_encode_octet_string()
64 *outlen = x; in der_encode_octet_string()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/printable_string/
A Dder_encode_printable_string.c28 unsigned char *out, unsigned long *outlen) in der_encode_printable_string() argument
35 LTC_ARGCHK(outlen != NULL); in der_encode_printable_string()
43 if (len > *outlen) { in der_encode_printable_string()
44 *outlen = len; in der_encode_printable_string()
51 len = *outlen - x; in der_encode_printable_string()
63 *outlen = x; in der_encode_printable_string()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/boolean/
A Dder_encode_boolean.c28 unsigned char *out, unsigned long *outlen) in der_encode_boolean() argument
30 LTC_ARGCHK(outlen != NULL); in der_encode_boolean()
33 if (*outlen < 3) { in der_encode_boolean()
34 *outlen = 3; in der_encode_boolean()
38 *outlen = 3; in der_encode_boolean()
/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/bit/
A Dder_encode_bit_string.c29 unsigned char *out, unsigned long *outlen) in der_encode_bit_string() argument
37 LTC_ARGCHK(outlen != NULL); in der_encode_bit_string()
44 if (len > *outlen) { in der_encode_bit_string()
45 *outlen = len; in der_encode_bit_string()
54 len = *outlen - x; in der_encode_bit_string()
75 *outlen = x; in der_encode_bit_string()
A Dder_encode_raw_bit_string.c31 unsigned char *out, unsigned long *outlen) in der_encode_raw_bit_string() argument
39 LTC_ARGCHK(outlen != NULL); in der_encode_raw_bit_string()
46 if (len > *outlen) { in der_encode_raw_bit_string()
47 *outlen = len; in der_encode_raw_bit_string()
56 len = *outlen - x; in der_encode_raw_bit_string()
78 *outlen = x; in der_encode_raw_bit_string()
/optee_os/core/lib/libtomcrypt/src/pk/x25519/
A Dx25519_shared_secret.c29 unsigned char *out, unsigned long *outlen) in x25519_shared_secret() argument
34 LTC_ARGCHK(outlen != NULL); in x25519_shared_secret()
38 if(*outlen < 32uL) { in x25519_shared_secret()
39 *outlen = 32uL; in x25519_shared_secret()
44 *outlen = 32uL; in x25519_shared_secret()
/optee_os/core/lib/libtomcrypt/src/pk/dh/
A Ddh_export_key.c23 int dh_export_key(void *out, unsigned long *outlen, int type, const dh_key *key) in dh_export_key() argument
29 LTC_ARGCHK(outlen != NULL); in dh_export_key()
35 if (*outlen < len) { in dh_export_key()
36 *outlen = len; in dh_export_key()
39 *outlen = len; in dh_export_key()

Completed in 30 milliseconds

1234567