Home
last modified time | relevance | path

Searched refs:f (Results 1 – 25 of 105) sorted by relevance

12345

/mbedtls-3.6.0/programs/pkey/
Drsa_sign.c34 FILE *f; in main() local
63 if ((f = fopen("rsa_priv.txt", "rb")) == NULL) { in main()
69 if ((ret = mbedtls_mpi_read_file(&N, 16, f)) != 0 || in main()
70 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main()
71 (ret = mbedtls_mpi_read_file(&D, 16, f)) != 0 || in main()
72 (ret = mbedtls_mpi_read_file(&P, 16, f)) != 0 || in main()
73 (ret = mbedtls_mpi_read_file(&Q, 16, f)) != 0 || in main()
74 (ret = mbedtls_mpi_read_file(&DP, 16, f)) != 0 || in main()
75 (ret = mbedtls_mpi_read_file(&DQ, 16, f)) != 0 || in main()
76 (ret = mbedtls_mpi_read_file(&QP, 16, f)) != 0) { in main()
[all …]
Drsa_decrypt.c38 FILE *f; in main() local
86 if ((f = fopen("rsa_priv.txt", "rb")) == NULL) { in main()
92 if ((ret = mbedtls_mpi_read_file(&N, 16, f)) != 0 || in main()
93 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main()
94 (ret = mbedtls_mpi_read_file(&D, 16, f)) != 0 || in main()
95 (ret = mbedtls_mpi_read_file(&P, 16, f)) != 0 || in main()
96 (ret = mbedtls_mpi_read_file(&Q, 16, f)) != 0 || in main()
97 (ret = mbedtls_mpi_read_file(&DP, 16, f)) != 0 || in main()
98 (ret = mbedtls_mpi_read_file(&DQ, 16, f)) != 0 || in main()
99 (ret = mbedtls_mpi_read_file(&QP, 16, f)) != 0) { in main()
[all …]
Ddh_server.c52 FILE *f; in main() local
101 if ((f = fopen("rsa_priv.txt", "rb")) == NULL) { in main()
109 if ((ret = mbedtls_mpi_read_file(&N, 16, f)) != 0 || in main()
110 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main()
111 (ret = mbedtls_mpi_read_file(&D, 16, f)) != 0 || in main()
112 (ret = mbedtls_mpi_read_file(&P, 16, f)) != 0 || in main()
113 (ret = mbedtls_mpi_read_file(&Q, 16, f)) != 0) { in main()
116 fclose(f); in main()
119 fclose(f); in main()
139 if ((f = fopen("dh_prime.txt", "rb")) == NULL) { in main()
[all …]
Drsa_verify.c34 FILE *f; in main() local
59 if ((f = fopen("rsa_pub.txt", "rb")) == NULL) { in main()
65 if ((ret = mbedtls_mpi_read_file(&rsa.MBEDTLS_PRIVATE(N), 16, f)) != 0 || in main()
66 (ret = mbedtls_mpi_read_file(&rsa.MBEDTLS_PRIVATE(E), 16, f)) != 0) { in main()
68 fclose(f); in main()
74 fclose(f); in main()
81 if ((f = fopen(filename, "rb")) == NULL) { in main()
87 while (fscanf(f, "%02X", (unsigned int *) &c) > 0 && in main()
92 fclose(f); in main()
Drsa_encrypt.c37 FILE *f; in main() local
79 if ((f = fopen("rsa_pub.txt", "rb")) == NULL) { in main()
85 if ((ret = mbedtls_mpi_read_file(&N, 16, f)) != 0 || in main()
86 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0) { in main()
89 fclose(f); in main()
92 fclose(f); in main()
124 if ((f = fopen("result-enc.txt", "wb+")) == NULL) { in main()
130 mbedtls_fprintf(f, "%02X%s", buf[i], in main()
134 fclose(f); in main()
Dkey_app_writer.c98 FILE *f; in write_public_key() local
123 if ((f = fopen(output_file, "w")) == NULL) { in write_public_key()
127 if (fwrite(c, 1, len, f) != len) { in write_public_key()
128 fclose(f); in write_public_key()
132 fclose(f); in write_public_key()
140 FILE *f; in write_private_key() local
165 if ((f = fopen(output_file, "w")) == NULL) { in write_private_key()
169 if (fwrite(c, 1, len, f) != len) { in write_private_key()
170 fclose(f); in write_private_key()
174 fclose(f); in write_private_key()
Dpk_sign.c38 FILE *f; in main() local
119 if ((f = fopen(filename, "wb+")) == NULL) { in main()
124 if (fwrite(buf, 1, olen, f) != olen) { in main()
126 fclose(f); in main()
130 fclose(f); in main()
Drsa_sign_pss.c39 FILE *f; in main() local
132 if ((f = fopen(filename, "wb+")) == NULL) { in main()
137 if (fwrite(buf, 1, olen, f) != olen) { in main()
139 fclose(f); in main()
143 fclose(f); in main()
/mbedtls-3.6.0/tests/data_files/dir1/
Dtest-ca.crt15 00:c0:df:37:fc:17:bb:e0:96:9d:3f:86:de:96:32:
22 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60:
23 c3:c6:9f:cb:ba:ec:60:7d:b7:e6:84:32:be:4f:fb:
27 79:a4:b2:b5:2e:12:f9:84:17:f0:62:6f:27:3e:13:
28 58:b1:54:0d:21:9a:73:37:a1:30:cf:6f:92:dc:f6:
31 ab:e9:c3:f2:cf:87:96:8f:80:02:32:9e:99:58:6f:
47 32:89:be:63:47:53:ff:b6:be:f1:2e:8c:54:c0:99:3f:a0:b9:
48 37:23:72:5f:0d:46:59:8f:d8:47:cd:97:4c:9f:07:0c:12:62:
51 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5:
52 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7:
[all …]
/mbedtls-3.6.0/tests/data_files/dir2/
Dtest-ca.crt15 00:c0:df:37:fc:17:bb:e0:96:9d:3f:86:de:96:32:
22 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60:
23 c3:c6:9f:cb:ba:ec:60:7d:b7:e6:84:32:be:4f:fb:
27 79:a4:b2:b5:2e:12:f9:84:17:f0:62:6f:27:3e:13:
28 58:b1:54:0d:21:9a:73:37:a1:30:cf:6f:92:dc:f6:
31 ab:e9:c3:f2:cf:87:96:8f:80:02:32:9e:99:58:6f:
47 32:89:be:63:47:53:ff:b6:be:f1:2e:8c:54:c0:99:3f:a0:b9:
48 37:23:72:5f:0d:46:59:8f:d8:47:cd:97:4c:9f:07:0c:12:62:
51 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5:
52 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7:
[all …]
/mbedtls-3.6.0/tests/data_files/dir3/
Dtest-ca.crt15 00:c0:df:37:fc:17:bb:e0:96:9d:3f:86:de:96:32:
22 71:f1:bd:83:d9:3f:d6:a5:e2:3c:2a:8f:ef:27:60:
23 c3:c6:9f:cb:ba:ec:60:7d:b7:e6:84:32:be:4f:fb:
27 79:a4:b2:b5:2e:12:f9:84:17:f0:62:6f:27:3e:13:
28 58:b1:54:0d:21:9a:73:37:a1:30:cf:6f:92:dc:f6:
31 ab:e9:c3:f2:cf:87:96:8f:80:02:32:9e:99:58:6f:
47 32:89:be:63:47:53:ff:b6:be:f1:2e:8c:54:c0:99:3f:a0:b9:
48 37:23:72:5f:0d:46:59:8f:d8:47:cd:97:4c:9f:07:0c:12:62:
51 2a:ce:2c:0d:08:59:05:09:05:a6:39:9f:b3:67:1b:e2:83:e5:
52 e1:8f:53:f6:67:93:c7:f9:6f:76:44:58:12:e8:3a:d4:97:e7:
[all …]
/mbedtls-3.6.0/programs/util/
Dpem2der.c107 FILE *f; in load_file() local
110 if ((f = fopen(path, "rb")) == NULL) { in load_file()
114 fseek(f, 0, SEEK_END); in load_file()
115 if ((size = ftell(f)) == -1) { in load_file()
116 fclose(f); in load_file()
119 fseek(f, 0, SEEK_SET); in load_file()
125 fclose(f); in load_file()
129 if (fread(*buf, 1, *n, f) != *n) { in load_file()
130 fclose(f); in load_file()
136 fclose(f); in load_file()
[all …]
/mbedtls-3.6.0/tests/suites/
Dtest_suite_debug.data32 …bytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\n"
35 …ytes)\nMyFile(0999)\: 0000\: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................\nM…
38f ................\nMyFile(0999)\: 0010\: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f .....…
53f e1 5d f2 84 df de 4a 14\nMyFile(0999)\: 2f 68 aa 8d 41 20 23 19 5c ee 66 88 3e 62 90 ff\nMyFile…
56f e1 5d f2 84 df de 4a\nMyFile(0999)\: 14 2f 68 aa 8d 41 20 23 19 5c ee 66 88 3e 62 90\nMyFile(09…
59f e1 5d f2 84 df de 4a\nMyFile(0999)\: 14 2f 68 aa 8d 41 20 23 19 5c ee 66 88 3e 62 90\nMyFile(09…
63f 3d 40 6a d5 55 53 8b fd 36 ee 82 65 2e\nMyFile(0999)\: 15 61 5e 89 bf b8 e8 45 90 db ee 88 16 5…
67f 87 56 fe fc 89 ba 29 43\nMyFile(0999)\: 4b 4e e0 6e c3 0e 57 53 33 39 58 d4 52 b4 91 95\nMyFile…
Dtest_suite_constant_time.function118 void mbedtls_ct_error_if(int cond, int t, int f)
122 int expected = c ? t : f;
127 TEST_CF_SECRET(&f, sizeof(f));
129 TEST_EQUAL(mbedtls_ct_error_if(c, t, f), expected);
134 TEST_CF_PUBLIC(&f, sizeof(f));
143 mbedtls_ct_uint_t f = (mbedtls_ct_uint_t) strtoull(f_str, NULL, 16);
145 mbedtls_ct_uint_t expected = c ? t : f;
150 TEST_CF_SECRET(&f, sizeof(f));
152 TEST_EQUAL(mbedtls_ct_if(c, t, f), expected);
153 TEST_EQUAL(mbedtls_ct_size_if(c, t, f), (size_t) expected);
[all …]
/mbedtls-3.6.0/scripts/
Dgenerate_query_config.pl37 -f $mbedtls_config_file or die "No such file: $mbedtls_config_file";
38 -f $psa_crypto_config_file or die "No such file: $psa_crypto_config_file";
39 -f $query_config_format_file or die "No such file: $query_config_format_file";
46 unless(-f $mbedtls_config_file && -f $query_config_format_file && -f $psa_crypto_config_file) {
48 -f $mbedtls_config_file && -f $query_config_format_file && -f $psa_crypto_config_file
/mbedtls-3.6.0/tests/data_files/
Ddh.optlen.pem7 93:8e:a1:1b:48:dc:51:5d:ab:7a:bc:bb:1e:0c:7f:
9 43:57:e1:c4:ea:07:a7:ce:1e:38:1a:2f:ca:fd:ff:
10 5f:5b:f0:0d:f8:28:80:60:20:e8:75:c0:09:26:e4:
17 ec:b0:55:6f:b7:13:12:a8:d7:c9:3b:b2:89:8e:a0:
18 8e:e5:4e:eb:59:45:48:28:5f:06:a9:73:cb:be:2a:
25 b3:12:6a:ea:f4:71:53:c7:d6:7f:40:30:30:b2:92:
30 e4:94:05:e5:90:2f:a0:59:6a:1c:ba:a8:95:cc:40:
31 2d:52:13:ed:4a:5f:1f:5b:a8:b5:e1:ed:3d:a9:51:
34 d7:23:32:2a:cf:32:7f:9e:41:3c:da:64:00:c1:5c:
35 5b:2e:a1:fa:34:40:5d:83:98:2f:ba:40:e6:d8:52:
Ddh.1000.pem16 9e:a4:a8:c4:29:fe:76:18:02:4f:76:c9:29:0e:f2:
21 4a:1a:dc:b2:d4:29:23:ab:2e:8f:7f:6a:84:1d:82:
22 23:6e:42:8c:1e:70:3d:21:bb:b9:b9:8f:f9:fd:9c:
23 53:08:e4:e8:5a:04:ca:5f:8f:73:55:ac:e1:41:20:
24 c7:43:fa:8f:99:
Ddh.998.pem3 39:5f:30:c0:7b:06:b7:6a:49:c6:c0:81:1f:39:77:
10 8f:93:78:96:8f:2c:25:8d:7d:1f:eb:5c:3c:bf:51:
/mbedtls-3.6.0/library/
Dhmac_drbg.c429 FILE *f; in mbedtls_hmac_drbg_write_seed_file() local
432 if ((f = fopen(path, "wb")) == NULL) { in mbedtls_hmac_drbg_write_seed_file()
437 mbedtls_setbuf(f, NULL); in mbedtls_hmac_drbg_write_seed_file()
443 if (fwrite(buf, 1, sizeof(buf), f) != sizeof(buf)) { in mbedtls_hmac_drbg_write_seed_file()
451 fclose(f); in mbedtls_hmac_drbg_write_seed_file()
460 FILE *f = NULL; in mbedtls_hmac_drbg_update_seed_file() local
465 if ((f = fopen(path, "rb")) == NULL) { in mbedtls_hmac_drbg_update_seed_file()
470 mbedtls_setbuf(f, NULL); in mbedtls_hmac_drbg_update_seed_file()
472 n = fread(buf, 1, sizeof(buf), f); in mbedtls_hmac_drbg_update_seed_file()
473 if (fread(&c, 1, 1, f) != 0) { in mbedtls_hmac_drbg_update_seed_file()
[all …]
Dctr_drbg.c589 FILE *f; in mbedtls_ctr_drbg_write_seed_file() local
592 if ((f = fopen(path, "wb")) == NULL) { in mbedtls_ctr_drbg_write_seed_file()
597 mbedtls_setbuf(f, NULL); in mbedtls_ctr_drbg_write_seed_file()
604 if (fwrite(buf, 1, MBEDTLS_CTR_DRBG_MAX_INPUT, f) != in mbedtls_ctr_drbg_write_seed_file()
614 fclose(f); in mbedtls_ctr_drbg_write_seed_file()
622 FILE *f = NULL; in mbedtls_ctr_drbg_update_seed_file() local
627 if ((f = fopen(path, "rb")) == NULL) { in mbedtls_ctr_drbg_update_seed_file()
632 mbedtls_setbuf(f, NULL); in mbedtls_ctr_drbg_update_seed_file()
634 n = fread(buf, 1, sizeof(buf), f); in mbedtls_ctr_drbg_update_seed_file()
635 if (fread(&c, 1, 1, f) != 0) { in mbedtls_ctr_drbg_update_seed_file()
[all …]
Dentropy.c405 FILE *f = NULL; in mbedtls_entropy_write_seed_file() local
413 if ((f = fopen(path, "wb")) == NULL) { in mbedtls_entropy_write_seed_file()
419 mbedtls_setbuf(f, NULL); in mbedtls_entropy_write_seed_file()
421 if (fwrite(buf, 1, MBEDTLS_ENTROPY_BLOCK_SIZE, f) != MBEDTLS_ENTROPY_BLOCK_SIZE) { in mbedtls_entropy_write_seed_file()
431 if (f != NULL) { in mbedtls_entropy_write_seed_file()
432 fclose(f); in mbedtls_entropy_write_seed_file()
441 FILE *f; in mbedtls_entropy_update_seed_file() local
445 if ((f = fopen(path, "rb")) == NULL) { in mbedtls_entropy_update_seed_file()
450 mbedtls_setbuf(f, NULL); in mbedtls_entropy_update_seed_file()
452 fseek(f, 0, SEEK_END); in mbedtls_entropy_update_seed_file()
[all …]
/mbedtls-3.6.0/tests/scripts/
Dgenerate_test_cert_macros.py66 with open(filename, 'rb') as f:
67 data = f.read(12)
70 data = f.read(12)
73 with open(filename) as f:
75 for line in f:
90 with open(output, 'w') as f:
91 f.write(template.render(macros=values))
Dgenerate-afl-tests.sh61 for f in *;
64 sed '/^\s*$/d' $f >testcase_$f
65 rm $f
Dcheck_files.py143 with open(filepath, "rb") as f:
144 for i, line in enumerate(iter(f.readline, b"")):
205 with open(filepath, "rb") as f:
206 first_line = f.readline()
227 with open(filepath, "rb") as f:
229 f.seek(-1, 2)
235 if f.read(1) != b"\n":
249 with open(filepath, "rb") as f:
250 if f.read().startswith(codecs.BOM_UTF8):
/mbedtls-3.6.0/programs/random/
Dgen_entropy.c29 FILE *f; in main() local
40 if ((f = fopen(argv[1], "wb+")) == NULL) { in main()
55 fwrite(buf, 1, sizeof(buf), f); in main()
70 fclose(f); in main()

12345