/optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/ |
A D | der_encode_sequence_ex.c | 46 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 D | tomcrypt_pk.h | 292 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 D | tomcrypt_misc.h | 14 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 D | tomcrypt_prng.h | 110 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 D | tomcrypt_pkcs.h | 45 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 D | der_encode_custom_type.c | 49 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 D | base64_decode.c | 86 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 D | base64_encode.c | 32 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 D | pkcs_5_1.c | 43 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 D | der_decode_object_identifier.c | 27 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 D | ec25519_export.c | 27 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 D | ltc_ecc_export_point.c | 15 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 D | der_encode_asn1_identifier.c | 25 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 D | rsa_encrypt_key.c | 35 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 D | rsa_verify_hash.c | 106 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 D | tee_supp_plugin_rpc.c | 20 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 D | hkdf.c | 22 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 D | der_encode_ia5_string.c | 28 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 D | der_encode_octet_string.c | 29 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 D | der_encode_printable_string.c | 28 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 D | der_encode_boolean.c | 28 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 D | der_encode_bit_string.c | 29 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 D | der_encode_raw_bit_string.c | 31 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 D | x25519_shared_secret.c | 29 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 D | dh_export_key.c | 23 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()
|