/mbedtls-latest/library/ |
D | CMakeLists.txt | 14 aes.c 15 aesni.c 16 aesce.c 17 aria.c 18 asn1parse.c 19 asn1write.c 20 base64.c 21 bignum.c 22 bignum_core.c 23 bignum_mod.c [all …]
|
D | x509write_crt.c | 170 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_basic_constraints() local 181 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_int(&c, buf, in mbedtls_x509write_crt_set_basic_constraints() 184 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_bool(&c, buf, 1)); in mbedtls_x509write_crt_set_basic_constraints() 187 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_set_basic_constraints() 188 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, in mbedtls_x509write_crt_set_basic_constraints() 205 unsigned char *c = buf + sizeof(buf); in mbedtls_x509write_crt_set_key_identifier() local 214 mbedtls_pk_write_pubkey(&c, in mbedtls_x509write_crt_set_key_identifier() 240 c = buf + sizeof(buf) - 20; in mbedtls_x509write_crt_set_key_identifier() 243 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_x509write_crt_set_key_identifier() 244 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, tag)); in mbedtls_x509write_crt_set_key_identifier() [all …]
|
D | bn_mul.h | 38 #define MBEDTLS_BYTES_TO_T_UINT_4(a, b, c, d) \ argument 41 ((mbedtls_mpi_uint) (c) << 16) | \ 47 #define MBEDTLS_BYTES_TO_T_UINT_8(a, b, c, d, e, f, g, h) \ argument 48 MBEDTLS_BYTES_TO_T_UINT_4(a, b, c, d), \ 53 #define MBEDTLS_BYTES_TO_T_UINT_8(a, b, c, d, e, f, g, h) \ argument 56 ((mbedtls_mpi_uint) (c) << 16) | \ 63 #define MBEDTLS_BYTES_TO_T_UINT_4(a, b, c, d) \ argument 64 MBEDTLS_BYTES_TO_T_UINT_8(a, b, c, d, 0, 0, 0, 0) 126 : "=m" (t), "=m" (c), "=m" (d), "=m" (s) \ 127 : "m" (t), "m" (s), "m" (d), "m" (c), "m" (b) \ [all …]
|
D | x509_create.c | 119 static int hex_to_int(char c) in hex_to_int() argument 121 return ('0' <= c && c <= '9') ? (c - '0') : in hex_to_int() 122 ('a' <= c && c <= 'f') ? (c - 'a' + 10) : in hex_to_int() 123 ('A' <= c && c <= 'F') ? (c - 'A' + 10) : -1; in hex_to_int() 143 const char *c; in parse_attribute_value_string() local 148 for (c = s; c < end; c++) { in parse_attribute_value_string() 149 if (*c == '\\') { in parse_attribute_value_string() 150 c++; in parse_attribute_value_string() 153 if (c + 1 < end && (n = hexpair_to_int(c)) != -1) { in parse_attribute_value_string() 158 c++; in parse_attribute_value_string() [all …]
|
D | x509write_csr.c | 90 unsigned char *c; in mbedtls_x509write_csr_set_key_usage() local 93 c = buf + 4; in mbedtls_x509write_csr_set_key_usage() 95 ret = mbedtls_asn1_write_named_bitstring(&c, buf, &key_usage, 8); in mbedtls_x509write_csr_set_key_usage() 102 0, c, (size_t) ret); in mbedtls_x509write_csr_set_key_usage() 114 unsigned char *c; in mbedtls_x509write_csr_set_ns_cert_type() local 117 c = buf + 4; in mbedtls_x509write_csr_set_ns_cert_type() 119 ret = mbedtls_asn1_write_named_bitstring(&c, buf, &ns_cert_type, 8); in mbedtls_x509write_csr_set_ns_cert_type() 126 0, c, (size_t) ret); in mbedtls_x509write_csr_set_ns_cert_type() 144 unsigned char *c, *c2; in x509write_csr_der_internal() local 155 c = buf + size; in x509write_csr_der_internal() [all …]
|
D | aria.c | 110 uint32_t *c, uint32_t *d) in aria_a() argument 117 *d = ARIA_P1(*c); // 98ba in aria_a() 118 *c = ARIA_P1(tb); // fedc in aria_a() 121 ta = ARIA_P1(ta) ^ tc ^ *c; // 2301+5476+89ab+fedc in aria_a() 130 *c ^= ARIA_P1(tc) ^ ta; // 0123+1032+4567+7654+ab89+dcfe+fedc OUT in aria_a() 142 uint32_t *c, uint32_t *d, in aria_sl() argument 154 *c = ((uint32_t) sa[MBEDTLS_BYTE_0(*c)]) ^ in aria_sl() 155 (((uint32_t) sb[MBEDTLS_BYTE_1(*c)]) << 8) ^ in aria_sl() 156 (((uint32_t) sc[MBEDTLS_BYTE_2(*c)]) << 16) ^ in aria_sl() 157 (((uint32_t) sd[MBEDTLS_BYTE_3(*c)]) << 24); in aria_sl() [all …]
|
D | base64.c | 41 signed char mbedtls_ct_base64_dec_value(unsigned char c) in mbedtls_ct_base64_dec_value() argument 48 val |= mbedtls_ct_uchar_in_range_if('A', 'Z', c, c - 'A' + 0 + 1); in mbedtls_ct_base64_dec_value() 49 val |= mbedtls_ct_uchar_in_range_if('a', 'z', c, c - 'a' + 26 + 1); in mbedtls_ct_base64_dec_value() 50 val |= mbedtls_ct_uchar_in_range_if('0', '9', c, c - '0' + 52 + 1); in mbedtls_ct_base64_dec_value() 51 val |= mbedtls_ct_uchar_in_range_if('+', '+', c, c - '+' + 62 + 1); in mbedtls_ct_base64_dec_value() 52 val |= mbedtls_ct_uchar_in_range_if('/', '/', c, c - '/' + 63 + 1); in mbedtls_ct_base64_dec_value()
|
D | Makefile | 2 error.c version_features.c \ 3 ssl_debug_helpers_generated.c \ 5 psa_crypto_driver_wrappers_no_static.c 318 .c.o: 333 error.c: $(gen_file_dep) ../scripts/generate_errors.pl 334 error.c: $(gen_file_dep) ../scripts/data_files/error.fmt 335 error.c: $(gen_file_dep) $(filter-out %config%,$(wildcard ../include/mbedtls/*.h)) 336 error.c: 340 ssl_debug_helpers_generated.c: $(gen_file_dep) ../scripts/generate_ssl_debug_helpers.py 341 ssl_debug_helpers_generated.c: $(gen_file_dep) $(filter-out %config%,$(wildcard ../include/mbedtls/… [all …]
|
D | bignum_core.c | 410 mbedtls_mpi_uint c = 0; in mbedtls_mpi_core_add() local 413 mbedtls_mpi_uint t = c + A[i]; in mbedtls_mpi_core_add() 414 c = (t < A[i]); in mbedtls_mpi_core_add() 416 c += (t < B[i]); in mbedtls_mpi_core_add() 420 return c; in mbedtls_mpi_core_add() 428 mbedtls_mpi_uint c = 0; in mbedtls_mpi_core_add_if() local 434 mbedtls_mpi_uint t = c + X[i]; in mbedtls_mpi_core_add_if() 435 c = (t < X[i]); in mbedtls_mpi_core_add_if() 437 c += (t < add); in mbedtls_mpi_core_add_if() 441 return c; in mbedtls_mpi_core_add_if() [all …]
|
D | pkwrite.c | 448 unsigned char *c; in mbedtls_pk_write_pubkey_der() local 458 c = buf + size; in mbedtls_pk_write_pubkey_der() 460 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_pk_write_pubkey(&c, buf, key)); in mbedtls_pk_write_pubkey_der() 462 if (c - buf < 1) { in mbedtls_pk_write_pubkey_der() 471 *--c = 0; in mbedtls_pk_write_pubkey_der() 474 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_pk_write_pubkey_der() 475 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_tag(&c, buf, MBEDTLS_ASN1_BIT_STRING)); in mbedtls_pk_write_pubkey_der() 489 MBEDTLS_ASN1_CHK_ADD(par_len, pk_write_ec_param(&c, buf, ec_grp_id)); in mbedtls_pk_write_pubkey_der() 502 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_algorithm_identifier_ext(&c, buf, oid, oid_len, in mbedtls_pk_write_pubkey_der() 505 MBEDTLS_ASN1_CHK_ADD(len, mbedtls_asn1_write_len(&c, buf, len)); in mbedtls_pk_write_pubkey_der() [all …]
|
D | .gitignore | 6 #/error.c 7 #/version_features.c 8 #/ssl_debug_helpers_generated.c 10 #/psa_crypto_driver_wrappers_no_static.c
|
D | aesce.c | 535 uint8x16_t c, d, e; in poly_mult_128() local 539 c = vextq_u8(b, b, 8); /* :c1:c0 = b0:b1 */ in poly_mult_128() 540 d = pmull_high(a, c); /* :d2:d1:00 = a1*b0 */ in poly_mult_128() 541 e = pmull_low(a, c); /* :e2:e1:00 = a0*b1 */ in poly_mult_128() 577 uint8x16_t c, d, e, f, g, n, o; in poly_mult_reduce() local 581 c = pmull_high(h, MODULO); /* :c2:c1:00 = reduction of h3 */ in poly_mult_reduce() 583 e = veorq_u8(c, m); /* :e2:e1:00 = m2:m1:00 + c2:c1:00 */ in poly_mult_reduce() 594 void mbedtls_aesce_gcm_mult(unsigned char c[16], in mbedtls_aesce_gcm_mult() 602 vst1q_u8(&c[0], vc); in mbedtls_aesce_gcm_mult()
|
/mbedtls-latest/tests/suites/ |
D | test_suite_platform_printf.data | 65 printf "%c%c", SPACE, SPACE 66 printf_char2:"%c%c":SPACE_CHAR:SPACE_CHAR:" " 68 printf "%c%c", NEWLINE, SPACE 69 printf_char2:"%c%c":NEWLINE_CHAR:SPACE_CHAR:"\n " 71 printf "%c%c", DOUBLE QUOTE, SPACE 72 printf_char2:"%c%c":DOUBLE_QUOTE_CHAR:SPACE_CHAR:"\" " 74 printf "%c%c", COLON, SPACE 75 printf_char2:"%c%c":COLON_CHAR:SPACE_CHAR:"\: " 77 printf "%c%c", QUESTION, SPACE 78 printf_char2:"%c%c":QUESTION_CHAR:SPACE_CHAR:"? " [all …]
|
D | test_suite_debug.data | 32 …ue' (16 bytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ..........… 35 …ue' (17 bytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ..........… 38 …c 0d 0e 0f ................\nMyFile(0999)\: 0010\: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e … 53 …c ee 66 88 3e 62 90 ff\nMyFile(0999)\: e7 03 f4 ea 59 63 bf 21 27 13 ce e4 6b 10 7c 09\nMyFile(09… 56 …c ee 66 88 3e 62 90\nMyFile(0999)\: ff e7 03 f4 ea 59 63 bf 21 27 13 ce e4 6b 10 7c\nMyFile(0999)… 59 …c ee 66 88 3e 62 90\nMyFile(0999)\: ff e7 03 f4 ea 59 63 bf 21 27 13 ce e4 6b 10 7c\nMyFile(0999)… 63 …c 09 04 47 82 b0 57 39\nMyFile(0999)\: 70 ed a3 ec 15 19 1e a8 33 08 47 c1 05 42 a9 fd\nMyFile(09… 67 …c 1a 95 29 ce 2c 2d\nMyFile(0999)\: value of 'crt->eckey.Q(Y)' (384 bits) is\:\nMyFile(0999)\: 87…
|
D | test_suite_constant_time.function | 120 mbedtls_ct_condition_t c = mbedtls_ct_bool(cond); 122 int expected = c ? t : f; 123 int expected0 = c ? t : 0; 125 TEST_CF_SECRET(&c, sizeof(c)); 129 TEST_EQUAL(mbedtls_ct_error_if(c, t, f), expected); 130 TEST_EQUAL(mbedtls_ct_error_if_else_0(c, t), expected0); 132 TEST_CF_PUBLIC(&c, sizeof(c)); 141 mbedtls_ct_condition_t c = mbedtls_ct_bool(strtoull(c_str, NULL, 16)); 145 mbedtls_ct_uint_t expected = c ? t : f; 146 mbedtls_ct_uint_t expected0 = c ? t : 0; [all …]
|
D | test_suite_base64.function | 39 for (unsigned c = 0; c <= 0xff; c++) { 40 mbedtls_test_set_step(c); 42 p = memchr(base64_digits, c, sizeof(base64_digits) - 1); 48 TEST_CF_SECRET(&c, sizeof(c)); 49 signed char actual = mbedtls_ct_base64_dec_value(c); 50 TEST_CF_PUBLIC(&c, sizeof(c));
|
D | test_suite_ctr_drbg.function | 457 uint8_t c[16]; 462 memset(c, 0, 16); 469 c[15 - byte] |= 1 << bit; 472 mbedtls_ctr_increment_counter(c); 482 TEST_MEMORY_COMPARE(c, 16, r, 16); 486 MBEDTLS_PUT_UINT64_BE(msb, c, 0); 487 MBEDTLS_PUT_UINT64_BE(lsb, c, 8); 488 memcpy(r, c, 16); 489 mbedtls_ctr_increment_counter(c); 496 TEST_MEMORY_COMPARE(c, 16, r, 16); [all …]
|
/mbedtls-latest/programs/ |
D | Makefile | 126 GENERATED_FILES = psa/psa_constant_names_generated.c test/query_config.c 129 psa/psa_constant_names_generated.c: $(gen_file_dep) ../scripts/generate_psa_constants.py 130 psa/psa_constant_names_generated.c: $(gen_file_dep) ../include/psa/crypto_values.h 131 psa/psa_constant_names_generated.c: $(gen_file_dep) ../include/psa/crypto_extra.h 132 psa/psa_constant_names_generated.c: $(gen_file_dep) ../tests/suites/test_suite_psa_crypto_metadata.… 133 psa/psa_constant_names_generated.c: 137 test/query_config.c: $(gen_file_dep) ../scripts/generate_query_config.pl 144 test/query_config.c: $(gen_file_dep) ../scripts/data_files/query_config.fmt 145 test/query_config.c: 149 aes/crypt_and_hash$(EXEXT): aes/crypt_and_hash.c $(DEP) [all …]
|
D | README.md | 8 * [`aes/crypt_and_hash.c`](aes/crypt_and_hash.c): file encryption and authentication, demonstrating… 12 * [`hash/generic_sum.c`](hash/generic_sum.c): file hash calculator and verifier, demonstrating the … 14 * [`hash/hello.c`](hash/hello.c): hello-world program for MD5. 20 * [`pkey/gen_key.c`](pkey/gen_key.c): generates a key for any of the supported public-key algorithm… 22 * [`pkey/key_app.c`](pkey/key_app.c): loads a PEM or DER public key or private key file and dumps i… 24 * [`pkey/key_app_writer.c`](pkey/key_app_writer.c): loads a PEM or DER public key or private key fi… 26 * [`pkey/pk_encrypt.c`](pkey/pk_encrypt.c), [`pkey/pk_decrypt.c`](pkey/pk_decrypt.c): loads a PEM o… 28 * [`pkey/pk_sign.c`](pkey/pk_sign.c), [`pkey/pk_verify.c`](pkey/pk_verify.c): loads a PEM or DER pr… 32 * [`pkey/ecdsa.c`](pkey/ecdsa.c): generates an ECDSA key, signs a fixed message and verifies the si… 34 * [`pkey/rsa_encrypt.c`](pkey/rsa_encrypt.c), [`pkey/rsa_decrypt.c`](pkey/rsa_decrypt.c): loads an … [all …]
|
/mbedtls-latest/programs/ssl/ |
D | ssl_context_info.c | 351 int c = 0; in read_next_b64_code() local 353 while (EOF != c) { in read_next_b64_code() 356 c = fgetc(b64_file); in read_next_b64_code() 359 if (c == '=' && pad == 1) { in read_next_b64_code() 363 } else if ((c >= 'A' && c <= 'Z') || in read_next_b64_code() 364 (c >= 'a' && c <= 'z') || in read_next_b64_code() 365 (c >= '0' && c <= '9') || in read_next_b64_code() 366 c == '+' || c == '/') { in read_next_b64_code() 368 } else if (c == '=') { in read_next_b64_code() 371 } else if (c == '-') { in read_next_b64_code() [all …]
|
D | CMakeLists.txt | 27 ${CMAKE_CURRENT_BINARY_DIR}/../test/query_config.c 35 ssl_test_lib.c 37 ${CMAKE_CURRENT_BINARY_DIR}/../test/query_config.c) 39 add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test> 53 add_executable(ssl_pthread_server ssl_pthread_server.c $<TARGET_OBJECTS:mbedtls_test>)
|
/mbedtls-latest/programs/test/ |
D | CMakeLists.txt | 34 add_executable(dlopen "dlopen.c") 44 ${CMAKE_CURRENT_BINARY_DIR}/query_config.c 51 ${CMAKE_CURRENT_BINARY_DIR}/query_config.c 61 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/query_config.c) 63 link_to_source(query_config.c) 71 ${CMAKE_CURRENT_BINARY_DIR}/query_config.c) 73 add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>
|
/mbedtls-latest/tests/src/ |
D | helpers.c | 364 int mbedtls_test_ascii2uc(const char c, unsigned char *uc) in mbedtls_test_ascii2uc() argument 366 if ((c >= '0') && (c <= '9')) { in mbedtls_test_ascii2uc() 367 *uc = c - '0'; in mbedtls_test_ascii2uc() 368 } else if ((c >= 'a') && (c <= 'f')) { in mbedtls_test_ascii2uc() 369 *uc = c - 'a' + 10; in mbedtls_test_ascii2uc() 370 } else if ((c >= 'A') && (c <= 'F')) { in mbedtls_test_ascii2uc() 371 *uc = c - 'A' + 10; in mbedtls_test_ascii2uc()
|
/mbedtls-latest/tests/ |
D | Makefile | 167 src/%.o : src/%.c $(TEST_OBJS_DEPS) 171 src/drivers/%.o : src/drivers/%.c 175 src/test_helpers/%.o : src/test_helpers/%.c 179 C_FILES := $(addsuffix .c,$(APPS)) 180 c: $(C_FILES) target 197 %.c: suites/$$(firstword $$(subst ., ,$$*)).function suites/%.data ../framework/scripts/generate_te… 208 $(BINARIES): %$(EXEXT): %.c $(MBEDLIBS) $(TEST_OBJS_DEPS) $(MBEDTLS_TEST_OBJS) 214 rm -rf $(BINARIES) *.c *.datax 221 if exist *.c del /Q /F *.c
|
/mbedtls-latest/ |
D | Makefile | 183 3rdparty/*/*.c 3rdparty/*/*/*.c 3rdparty/*/*/*/*.c 3rdparty/*/*/*/*/*.c \ 188 tests/src/*.c tests/src/*/*.c \ 192 CTAGS = ctags --langmap=c:+.h.function --line-directives=no -o
|