| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/general/ |
| H A D | der_encode_asn1_length.c | 14 @param out Where to write the length field to 15 @param outlen [in/out] The size of out available/written 18 int der_encode_asn1_length(unsigned long len, unsigned char *out, unsigned long *outlen) in der_encode_asn1_length() argument 35 if (out == NULL) { in der_encode_asn1_length() 47 out[x++] = (unsigned char)len; in der_encode_asn1_length() 49 out[x++] = 0x81; in der_encode_asn1_length() 50 out[x++] = (unsigned char)len; in der_encode_asn1_length() 52 out[x++] = 0x82; in der_encode_asn1_length() 53 out[x++] = (unsigned char)((len>>8UL)&255); in der_encode_asn1_length() 54 out[x++] = (unsigned char)(len&255); in der_encode_asn1_length() [all …]
|
| H A D | der_encode_asn1_identifier.c | 14 @param out Where to write the identifier to 15 @param outlen [in/out] The size of out available/written 18 int der_encode_asn1_identifier(const ltc_asn1_list *id, unsigned char *out, unsigned long *outlen) in der_encode_asn1_identifier() argument 33 if (out != NULL) { in der_encode_asn1_identifier() 34 *out = der_asn1_type_to_identifier_map[id->type]; in der_encode_asn1_identifier() 49 if (out != NULL) { in der_encode_asn1_identifier() 54 out[0] = id->klass << 6 | id->pc << 5; in der_encode_asn1_identifier() 58 if (out != NULL) { in der_encode_asn1_identifier() 59 out[0] |= id->tag & 0x1f; in der_encode_asn1_identifier() 70 if (out != NULL) { in der_encode_asn1_identifier() [all …]
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | link.mk | 1 link-out-dir = $(out-dir)/core 7 link-script-pp = $(link-out-dir)/kern.ld 8 link-script-dep = $(link-out-dir)/.kern.ld.d 35 link-ldflags += -T $(link-script-pp) -Map=$(link-out-dir)/tee.map 44 link-objs := $(filter-out \ 45 $(out-dir)/$(platform-dir)/link_dummies_paged.o \ 46 $(out-dir)/$(platform-dir)/link_dummies_init.o \ 47 $(out-dir)/$(arch-dir)/kernel/link_dummies_paged.o \ 48 $(out-dir)/$(arch-dir)/kernel/link_dummies_init.o, \ 50 link-objs-init := $(filter-out \ [all …]
|
| /optee_os/core/arch/riscv/kernel/ |
| H A D | link.mk | 1 link-out-dir = $(out-dir)/core 6 link-script-pp = $(link-out-dir)/kern.ld 7 link-script-dep = $(link-out-dir)/.kern.ld.d 16 link-ldflags += -T $(link-script-pp) -Map=$(link-out-dir)/tee.map 27 ldargs-tee.elf := $(link-ldflags) $(link-objs) $(link-out-dir)/version.o \ 31 $(filter-out $(CPPFLAGS_REMOVE) $(cppflags-remove), \ 33 $(addprefix -I,$(incdirscore) $(link-out-dir)) \ 39 cleanfiles += $(link-out-dir)/all_objs.o 40 $(link-out-dir)/all_objs.o: $(objs) $(libdeps) $(MAKEFILE_LIST) 54 $(link-out-dir)/version.o: [all …]
|
| /optee_os/lib/libmbedtls/core/ |
| H A D | sm2-kep.c | 51 goto out; in sm2_kep_compute_Z() 55 goto out; in sm2_kep_compute_Z() 59 goto out; in sm2_kep_compute_Z() 63 goto out; in sm2_kep_compute_Z() 68 goto out; in sm2_kep_compute_Z() 72 goto out; in sm2_kep_compute_Z() 77 goto out; in sm2_kep_compute_Z() 81 goto out; in sm2_kep_compute_Z() 86 goto out; in sm2_kep_compute_Z() 90 goto out; in sm2_kep_compute_Z() [all …]
|
| H A D | sm2-dsa.c | 56 goto out; in sm2_mbedtls_dsa_sign() 69 goto out; in sm2_mbedtls_dsa_sign() 78 goto out; in sm2_mbedtls_dsa_sign() 85 goto out; in sm2_mbedtls_dsa_sign() 88 goto out; in sm2_mbedtls_dsa_sign() 94 goto out; in sm2_mbedtls_dsa_sign() 102 goto out; in sm2_mbedtls_dsa_sign() 105 goto out; in sm2_mbedtls_dsa_sign() 108 goto out; in sm2_mbedtls_dsa_sign() 111 goto out; in sm2_mbedtls_dsa_sign() [all …]
|
| H A D | sm2-pke.c | 143 goto out; in sm2_mbedtls_pke_decrypt() 150 goto out; in sm2_mbedtls_pke_decrypt() 164 goto out; in sm2_mbedtls_pke_decrypt() 170 goto out; in sm2_mbedtls_pke_decrypt() 176 goto out; in sm2_mbedtls_pke_decrypt() 182 goto out; in sm2_mbedtls_pke_decrypt() 190 goto out; in sm2_mbedtls_pke_decrypt() 198 goto out; in sm2_mbedtls_pke_decrypt() 203 goto out; in sm2_mbedtls_pke_decrypt() 207 goto out; in sm2_mbedtls_pke_decrypt() [all …]
|
| /optee_os/core/lib/libtomcrypt/ |
| H A D | sm2-kep.c | 45 goto out; in sm2_kep_compute_Z() 49 goto out; in sm2_kep_compute_Z() 53 goto out; in sm2_kep_compute_Z() 57 goto out; in sm2_kep_compute_Z() 62 goto out; in sm2_kep_compute_Z() 67 goto out; in sm2_kep_compute_Z() 72 goto out; in sm2_kep_compute_Z() 77 goto out; in sm2_kep_compute_Z() 82 goto out; in sm2_kep_compute_Z() 87 goto out; in sm2_kep_compute_Z() [all …]
|
| H A D | sm2-pke.c | 140 goto out; in sm2_ltc_pke_decrypt() 147 goto out; in sm2_ltc_pke_decrypt() 152 goto out; in sm2_ltc_pke_decrypt() 160 goto out; in sm2_ltc_pke_decrypt() 166 goto out; in sm2_ltc_pke_decrypt() 172 goto out; in sm2_ltc_pke_decrypt() 179 goto out; in sm2_ltc_pke_decrypt() 190 goto out; in sm2_ltc_pke_decrypt() 198 goto out; in sm2_ltc_pke_decrypt() 205 goto out; in sm2_ltc_pke_decrypt() [all …]
|
| /optee_os/ta/ |
| H A D | link_shlib.mk | 4 link-out-dir = $(out-dir) 9 all: $(link-out-dir)/$(shlibname).so $(link-out-dir)/$(shlibname).dmp \ 10 $(link-out-dir)/$(shlibname).stripped.so \ 11 $(link-out-dir)/$(shlibuuid).elf \ 12 $(link-out-dir)/$(shlibuuid).ta 14 cleanfiles += $(link-out-dir)/$(shlibname).so 15 cleanfiles += $(link-out-dir)/$(shlibname).dmp 16 cleanfiles += $(link-out-dir)/$(shlibname).stripped.so 17 cleanfiles += $(link-out-dir)/$(shlibuuid).elf 18 cleanfiles += $(link-out-dir)/$(shlibuuid).ta [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/ssh/ |
| H A D | ssh_encode_sequence_multi.c | 15 @param out [out] Destination for data 16 @param outlen [in/out] Length of buffer and resulting length of output 20 int ssh_encode_sequence_multi(unsigned char *out, unsigned long *outlen, ...) in ssh_encode_sequence_multi() argument 32 LTC_ARGCHK(out != NULL); in ssh_encode_sequence_multi() 92 *out++ = (unsigned char)(idata & 255); in ssh_encode_sequence_multi() 101 *out++ = (idata)?1:0; in ssh_encode_sequence_multi() 105 STORE32H(u32data, out); in ssh_encode_sequence_multi() 106 out += 4; in ssh_encode_sequence_multi() 110 STORE64H(u64data, out); in ssh_encode_sequence_multi() 111 out += 8; in ssh_encode_sequence_multi() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/sequence/ |
| H A D | der_encode_sequence_ex.c | 17 @param out [out] The destination 18 @param outlen [in/out] The size of the output 23 unsigned char *out, unsigned long *outlen, int type_of) in der_encode_sequence_ex() argument 31 LTC_ARGCHK(out != NULL); in der_encode_sequence_ex() 47 out[x++] = (type_of == LTC_ASN1_SEQUENCE) ? 0x30 : 0x31; in der_encode_sequence_ex() 50 if ((err = der_encode_asn1_length(z, &out[x], &y)) != CRYPT_OK) { in der_encode_sequence_ex() 69 if ((err = der_encode_boolean(*((int *)data), out + x, &z)) != CRYPT_OK) { in der_encode_sequence_ex() 76 if ((err = der_encode_integer(data, out + x, &z)) != CRYPT_OK) { in der_encode_sequence_ex() 83 … if ((err = der_encode_short_integer(*((unsigned long*)data), out + x, &z)) != CRYPT_OK) { in der_encode_sequence_ex() 90 if ((err = der_encode_bit_string(data, size, out + x, &z)) != CRYPT_OK) { in der_encode_sequence_ex() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/misc/base32/ |
| H A D | base32_encode.c | 12 @param out [out] The destination of the Base32 encoded data 13 @param outlen [in/out] The max size and resulting size of the encoded data 18 char *out, unsigned long *outlen, in base32_encode() argument 31 LTC_ARGCHK(out != NULL); in base32_encode() 46 *out = '\0'; in base32_encode() 53 *out++ = codes[(in[0] >> 3) & 0x1F]; in base32_encode() 54 *out++ = codes[(((in[0] & 0x7) << 2) + (in[1] >> 6)) & 0x1F]; in base32_encode() 55 *out++ = codes[(in[1] >> 1) & 0x1F]; in base32_encode() 56 *out++ = codes[(((in[1] & 0x1) << 4) + (in[2] >> 4)) & 0x1F]; in base32_encode() 57 *out++ = codes[(((in[2] & 0xF) << 1) + (in[3] >> 7)) & 0x1F]; in base32_encode() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/utctime/ |
| H A D | der_decode_utctime.c | 38 @param out [out] Destination of UTC time structure 42 ltc_utctime *out) in der_decode_utctime() argument 50 LTC_ARGCHK(out != NULL); in der_decode_utctime() 80 DECODE_V(out->YY, 100); in der_decode_utctime() 81 DECODE_V(out->MM, 13); in der_decode_utctime() 82 DECODE_V(out->DD, 32); in der_decode_utctime() 83 DECODE_V(out->hh, 24); in der_decode_utctime() 84 DECODE_V(out->mm, 60); in der_decode_utctime() 87 out->off_dir = out->off_hh = out->off_mm = out->ss = 0; in der_decode_utctime() 94 out->off_dir = (buf[x++] == '+') ? 0 : 1; in der_decode_utctime() [all …]
|
| /optee_os/core/arch/arm/crypto/ |
| H A D | sm4_armv8a_neon.c | 35 void crypto_accel_sm4_ecb_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ecb_enc() argument 40 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_ecb_enc() 43 neon_sm4_ecb_encrypt(out, in, key, len); in crypto_accel_sm4_ecb_enc() 47 void crypto_accel_sm4_cbc_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_enc() argument 52 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_enc() 55 neon_sm4_cbc_encrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_enc() 59 void crypto_accel_sm4_cbc_dec(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_dec() argument 64 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_dec() 67 neon_sm4_cbc_decrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_dec() 71 void crypto_accel_sm4_ctr_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ctr_enc() argument [all …]
|
| H A D | sm4_armv8a_ce.c | 35 void crypto_accel_sm4_ecb_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ecb_enc() argument 40 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_ecb_enc() 43 ce_sm4_ecb_encrypt(out, in, key, len); in crypto_accel_sm4_ecb_enc() 47 void crypto_accel_sm4_cbc_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_enc() argument 52 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_enc() 55 ce_sm4_cbc_encrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_enc() 59 void crypto_accel_sm4_cbc_dec(void *out, const void *in, const void *key, in crypto_accel_sm4_cbc_dec() argument 64 assert(out && in && key && !(len % 16)); in crypto_accel_sm4_cbc_dec() 67 ce_sm4_cbc_decrypt(out, in, key, len, iv); in crypto_accel_sm4_cbc_dec() 71 void crypto_accel_sm4_ctr_enc(void *out, const void *in, const void *key, in crypto_accel_sm4_ctr_enc() argument [all …]
|
| /optee_os/ta/pkcs11/src/ |
| H A D | serializer.h | 37 * serialargs_get() - copy out a chunk of data and advance 39 * @out: output buffer 44 enum pkcs11_rc serialargs_get(struct serialargs *args, void *out, size_t sz); 47 * serialargs_get_u32() - copy out a uint32_t and advance 49 * @out: output buffer 54 uint32_t *out) in serialargs_get_u32() argument 56 return serialargs_get(args, out, sizeof(*out)); in serialargs_get_u32() 62 * @out: Pointer to the data retrieved in *@out 67 enum pkcs11_rc serialargs_get_ptr(struct serialargs *args, void **out, 73 * @out: Pointer to the allocated and extracted attribute in *@out [all …]
|
| H A D | processing.c | 222 TEE_Param *out = params + 2; in entry_generate_secret() local 233 out->memref.size != sizeof(obj_handle)) in entry_generate_secret() 244 goto out; in entry_generate_secret() 248 goto out; in entry_generate_secret() 252 goto out; in entry_generate_secret() 257 goto out; in entry_generate_secret() 266 goto out; in entry_generate_secret() 278 goto out; in entry_generate_secret() 285 goto out; in entry_generate_secret() 289 goto out; in entry_generate_secret() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/custom_type/ |
| H A D | der_encode_custom_type.c | 20 @param out [out] The destination 21 @param outlen [in/out] The size of the output 25 unsigned char *out, unsigned long *outlen) in der_encode_custom_type() argument 34 LTC_ARGCHK(out != NULL); in der_encode_custom_type() 66 if ((err = der_encode_asn1_length(z, &out[x], &y)) != CRYPT_OK) { in der_encode_custom_type() 90 if ((err = der_encode_boolean(*((int *)data), out + x, &z)) != CRYPT_OK) { in der_encode_custom_type() 97 if ((err = der_encode_integer(data, out + x, &z)) != CRYPT_OK) { in der_encode_custom_type() 104 … if ((err = der_encode_short_integer(*((unsigned long*)data), out + x, &z)) != CRYPT_OK) { in der_encode_custom_type() 111 if ((err = der_encode_bit_string(data, size, out + x, &z)) != CRYPT_OK) { in der_encode_custom_type() 118 if ((err = der_encode_raw_bit_string(data, size, out + x, &z)) != CRYPT_OK) { in der_encode_custom_type() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/generalizedtime/ |
| H A D | der_encode_generalizedtime.c | 16 out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \ 17 out[x++] = der_ia5_char_encode(baseten[y % 10]); \ 21 out[x++] = der_ia5_char_encode(baseten[(y/1000) % 10]); \ 22 out[x++] = der_ia5_char_encode(baseten[(y/100) % 10]); \ 23 out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \ 24 out[x++] = der_ia5_char_encode(baseten[y % 10]); \ 30 @param out The destination of the DER encoding of the GeneralizedTime structure 31 @param outlen [in/out] The length of the DER encoding 35 unsigned char *out, unsigned long *outlen) in der_encode_generalizedtime() argument 41 LTC_ARGCHK(out != NULL); in der_encode_generalizedtime() [all …]
|
| H A D | der_decode_generalizedtime.c | 46 @param out [out] Destination of Generalized time structure 50 ltc_generalizedtime *out) in der_decode_generalizedtime() argument 58 LTC_ARGCHK(out != NULL); in der_decode_generalizedtime() 96 DECODE_V4(out->YYYY, 10000); in der_decode_generalizedtime() 97 DECODE_V(out->MM, 13); in der_decode_generalizedtime() 98 DECODE_V(out->DD, 32); in der_decode_generalizedtime() 99 DECODE_V(out->hh, 24); in der_decode_generalizedtime() 100 DECODE_V(out->mm, 60); in der_decode_generalizedtime() 101 DECODE_V(out->ss, 60); in der_decode_generalizedtime() 104 out->fs = 0; in der_decode_generalizedtime() [all …]
|
| /optee_os/core/lib/libtomcrypt/src/pk/asn1/der/utf8/ |
| H A D | der_encode_utf8_string.c | 17 @param out [out] The destination for the DER encoded UTF8 STRING 18 @param outlen [in/out] The max size and resulting size of the DER UTF8 STRING 22 unsigned char *out, unsigned long *outlen) in der_encode_utf8_string() argument 28 LTC_ARGCHK(out != NULL); in der_encode_utf8_string() 49 out[x++] = 0x0C; in der_encode_utf8_string() 52 if ((err = der_encode_asn1_length(len, out + x, &y)) != CRYPT_OK) { in der_encode_utf8_string() 60 case 1: out[x++] = (unsigned char)in[y]; break; in der_encode_utf8_string() 61 case 2: out[x++] = 0xC0 | ((in[y] >> 6) & 0x1F); out[x++] = 0x80 | (in[y] & 0x3F); break; in der_encode_utf8_string() 62 …case 3: out[x++] = 0xE0 | ((in[y] >> 12) & 0x0F); out[x++] = 0x80 | ((in[y] >> 6) & 0x3F); out[x++… in der_encode_utf8_string() 64 …case 4: out[x++] = 0xF0 | ((in[y] >> 18) & 0x07); out[x++] = 0x80 | ((in[y] >> 12) & 0x3F); out[x+… in der_encode_utf8_string()
|
| /optee_os/core/arch/arm/plat-stm32mp1/ |
| H A D | link.mk | 11 all: $(link-out-dir)/tee-header_v2.stm32 12 cleanfiles += $(link-out-dir)/tee-header_v2.stm32 13 $(link-out-dir)/tee-header_v2.stm32: $(link-out-dir)/tee-header_v2.bin 16 all: $(link-out-dir)/tee-pager_v2.stm32 17 cleanfiles += $(link-out-dir)/tee-pager_v2.stm32 18 $(link-out-dir)/tee-pager_v2.stm32: $(link-out-dir)/tee-pager_v2.bin 21 all: $(link-out-dir)/tee-pageable_v2.stm32 22 cleanfiles += $(link-out-dir)/tee-pageable_v2.stm32 23 $(link-out-dir)/tee-pageable_v2.stm32: $(link-out-dir)/tee-pageable_v2.bin
|
| /optee_os/core/lib/libtomcrypt/src/misc/base64/ |
| H A D | base64_encode.c | 34 char *out, unsigned long *outlen, in s_base64_encode_internal() argument 57 LTC_ARGCHK(out != NULL); in s_base64_encode_internal() 59 if ((void*)in == out) { in s_base64_encode_internal() 63 p = out; in s_base64_encode_internal() 71 if ((p - out) % linelen == 0) { in s_base64_encode_internal() 96 *outlen = (unsigned long)(p - out); /* the length without terminating NUL */ in s_base64_encode_internal() 105 @param out [out] The destination of the base64 encoded data 106 @param outlen [in/out] The max size and resulting size 110 char *out, unsigned long *outlen) in base64_encode() argument 112 return s_base64_encode_internal(in, inlen, out, outlen, codes_base64, pad); in base64_encode() [all …]
|
| H A D | base64_decode.c | 79 unsigned char *out, unsigned long *outlen, in s_base64_decode_internal() argument 87 LTC_ARGCHK(out != NULL); in s_base64_decode_internal() 121 out[z++] = (unsigned char)((t>>16)&255); in s_base64_decode_internal() 122 out[z++] = (unsigned char)((t>>8)&255); in s_base64_decode_internal() 123 out[z++] = (unsigned char)(t&255); in s_base64_decode_internal() 133 if (y >= 2) out[z++] = (unsigned char) ((t >> 16) & 255); in s_base64_decode_internal() 134 if (y == 3) out[z++] = (unsigned char) ((t >> 8) & 255); in s_base64_decode_internal() 145 @param out [out] The destination of the binary decoded data 146 @param outlen [in/out] The max size and resulting size of the decoded data 150 unsigned char *out, unsigned long *outlen) in base64_decode() argument [all …]
|