/mbedtls-3.5.0/library/ |
D | ripemd160.c | 85 uint32_t A, B, C, D, E, Ap, Bp, Cp, Dp, Ep, X[16]; in mbedtls_internal_ripemd160_process() member 109 local.E = local.Ep = ctx->state[4]; in mbedtls_internal_ripemd160_process() 139 P2(local.A, local.B, local.C, local.D, local.E, 0, 11, 5, 8); in mbedtls_internal_ripemd160_process() 140 P2(local.E, local.A, local.B, local.C, local.D, 1, 14, 14, 9); in mbedtls_internal_ripemd160_process() 141 P2(local.D, local.E, local.A, local.B, local.C, 2, 15, 7, 9); in mbedtls_internal_ripemd160_process() 142 P2(local.C, local.D, local.E, local.A, local.B, 3, 12, 0, 11); in mbedtls_internal_ripemd160_process() 143 P2(local.B, local.C, local.D, local.E, local.A, 4, 5, 9, 13); in mbedtls_internal_ripemd160_process() 144 P2(local.A, local.B, local.C, local.D, local.E, 5, 8, 2, 15); in mbedtls_internal_ripemd160_process() 145 P2(local.E, local.A, local.B, local.C, local.D, 6, 7, 11, 15); in mbedtls_internal_ripemd160_process() 146 P2(local.D, local.E, local.A, local.B, local.C, 7, 9, 4, 5); in mbedtls_internal_ripemd160_process() [all …]
|
D | sha1.c | 81 uint32_t temp, W[16], A, B, C, D, E; in mbedtls_internal_sha1_process() member 123 local.E = ctx->state[4]; in mbedtls_internal_sha1_process() 128 P(local.A, local.B, local.C, local.D, local.E, local.W[0]); in mbedtls_internal_sha1_process() 129 P(local.E, local.A, local.B, local.C, local.D, local.W[1]); in mbedtls_internal_sha1_process() 130 P(local.D, local.E, local.A, local.B, local.C, local.W[2]); in mbedtls_internal_sha1_process() 131 P(local.C, local.D, local.E, local.A, local.B, local.W[3]); in mbedtls_internal_sha1_process() 132 P(local.B, local.C, local.D, local.E, local.A, local.W[4]); in mbedtls_internal_sha1_process() 133 P(local.A, local.B, local.C, local.D, local.E, local.W[5]); in mbedtls_internal_sha1_process() 134 P(local.E, local.A, local.B, local.C, local.D, local.W[6]); in mbedtls_internal_sha1_process() 135 P(local.D, local.E, local.A, local.B, local.C, local.W[7]); in mbedtls_internal_sha1_process() [all …]
|
D | aes.c | 104 V(15, FA, FA, EF), V(EB, 59, 59, B2), V(C9, 47, 47, 8E), V(0B, F0, F0, FB), \ 108 V(5A, 36, 36, 6C), V(41, 3F, 3F, 7E), V(02, F7, F7, F5), V(4F, CC, CC, 83), \ 111 V(0C, 04, 04, 08), V(52, C7, C7, 95), V(65, 23, 23, 46), V(5E, C3, C3, 9D), \ 113 V(09, 07, 07, 0E), V(36, 12, 12, 24), V(9B, 80, 80, 1B), V(3D, E2, E2, DF), \ 114 V(26, EB, EB, CD), V(69, 27, 27, 4E), V(CD, B2, B2, 7F), V(9F, 75, 75, EA), \ 115 V(1B, 09, 09, 12), V(9E, 83, 83, 1D), V(74, 2C, 2C, 58), V(2E, 1A, 1A, 34), \ 116 V(2D, 1B, 1B, 36), V(B2, 6E, 6E, DC), V(EE, 5A, 5A, B4), V(FB, A0, A0, 5B), \ 118 V(7B, 29, 29, 52), V(3E, E3, E3, DD), V(71, 2F, 2F, 5E), V(97, 84, 84, 13), \ 130 V(30, 10, 10, 20), V(1A, FF, FF, E5), V(0E, F3, F3, FD), V(6D, D2, D2, BF), \ 132 V(E1, 5F, 5F, BE), V(A2, 97, 97, 35), V(CC, 44, 44, 88), V(39, 17, 17, 2E), \ [all …]
|
D | rsa_alt_helpers.c | 63 mbedtls_mpi const *E, mbedtls_mpi const *D, in mbedtls_rsa_deduce_primes() argument 94 mbedtls_mpi_cmp_int(E, 1) <= 0 || in mbedtls_rsa_deduce_primes() 95 mbedtls_mpi_cmp_mpi(E, N) >= 0) { in mbedtls_rsa_deduce_primes() 107 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&T, D, E)); in mbedtls_rsa_deduce_primes() 196 mbedtls_mpi const *E, in mbedtls_rsa_deduce_private_exponent() argument 208 mbedtls_mpi_cmp_int(E, 0) == 0) { in mbedtls_rsa_deduce_private_exponent() 227 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(D, E, &K)); in mbedtls_rsa_deduce_private_exponent() 273 const mbedtls_mpi *E, in mbedtls_rsa_validate_params() argument 326 if (N != NULL && D != NULL && E != NULL) { in mbedtls_rsa_validate_params() 328 mbedtls_mpi_cmp_int(E, 1) <= 0 || in mbedtls_rsa_validate_params() [all …]
|
D | rsa.c | 76 const mbedtls_mpi *D, const mbedtls_mpi *E) in mbedtls_rsa_import() argument 84 (E != NULL && (ret = mbedtls_mpi_copy(&ctx->E, E)) != 0)) { in mbedtls_rsa_import() 100 unsigned char const *E, size_t E_len) in mbedtls_rsa_import_raw() argument 121 if (E != NULL) { in mbedtls_rsa_import_raw() 122 MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(&ctx->E, E, E_len)); in mbedtls_rsa_import_raw() 182 if (mbedtls_mpi_cmp_int(&ctx->E, 0) <= 0) { in rsa_check_context() 236 have_E = (mbedtls_mpi_cmp_int(&ctx->E, 0) != 0); in mbedtls_rsa_complete() 284 ret = mbedtls_rsa_deduce_primes(&ctx->N, &ctx->E, &ctx->D, in mbedtls_rsa_complete() 293 &ctx->E, in mbedtls_rsa_complete() 326 unsigned char *E, size_t E_len) in mbedtls_rsa_export_raw() argument [all …]
|
D | rsa_alt_helpers.h | 91 int mbedtls_rsa_deduce_primes(mbedtls_mpi const *N, mbedtls_mpi const *E, 118 mbedtls_mpi const *E, 179 const mbedtls_mpi *E,
|
/mbedtls-3.5.0/tests/suites/ |
D | test_suite_pkcs1_v21.function | 19 mbedtls_mpi N, E; 26 mbedtls_mpi_init(&N); mbedtls_mpi_init(&E); 36 TEST_ASSERT(mbedtls_mpi_read_binary(&E, input_E->x, input_E->len) == 0); 37 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, NULL, NULL, NULL, &E) == 0); 54 mbedtls_mpi_free(&N); mbedtls_mpi_free(&E); 69 mbedtls_mpi N, P, Q, E; 73 mbedtls_mpi_init(&Q); mbedtls_mpi_init(&E); 88 TEST_ASSERT(mbedtls_mpi_read_binary(&E, input_E->x, input_E->len) == 0); 90 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, &P, &Q, NULL, &E) == 0); 115 mbedtls_mpi_free(&Q); mbedtls_mpi_free(&E); [all …]
|
D | test_suite_rsa.function | 169 mbedtls_mpi N, P, Q, E; 173 mbedtls_mpi_init(&Q); mbedtls_mpi_init(&E); 184 TEST_ASSERT(mbedtls_test_read_mpi(&E, input_E) == 0); 186 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, &P, &Q, NULL, &E) == 0); 203 mbedtls_mpi_free(&Q); mbedtls_mpi_free(&E); 215 mbedtls_mpi N, E; 217 mbedtls_mpi_init(&N); mbedtls_mpi_init(&E); 223 TEST_ASSERT(mbedtls_test_read_mpi(&E, input_E) == 0); 224 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, NULL, NULL, NULL, &E) == 0); 232 mbedtls_mpi_free(&N); mbedtls_mpi_free(&E); [all …]
|
D | test_suite_rsa.data | 294 RSA Check Private key #5 (No E) 321 RSA Check Public key #3 (Even E) 337 RSA Check Public key #8 (E exactly 2 bits) 340 RSA Check Public key #8 (E exactly 1 bits) 343 RSA Check Public key #8 (E exactly 64 bits) 346 RSA Check Public key #8 (E larger than 64 bits) 349 RSA Check Public key #9 (E has size N-2) 352 RSA Check Public key #10 (E has size N) 367 RSA Check Public-Private key #5 (E mismatch) 413 RSA Validate Params, toy example, E missing [all …]
|
D | test_suite_pkcs1_v15.function | 22 mbedtls_mpi N, E; 29 mbedtls_mpi_init(&N); mbedtls_mpi_init(&E); 43 TEST_ASSERT(mbedtls_test_read_mpi(&E, input_E) == 0); 44 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, NULL, NULL, NULL, &E) == 0); 63 mbedtls_mpi_free(&N); mbedtls_mpi_free(&E); 78 mbedtls_mpi N, P, Q, E; 82 mbedtls_mpi_init(&Q); mbedtls_mpi_init(&E); 96 TEST_ASSERT(mbedtls_test_read_mpi(&E, input_E) == 0); 98 TEST_ASSERT(mbedtls_rsa_import(&ctx, &N, &P, &Q, NULL, &E) == 0); 124 mbedtls_mpi_free(&Q); mbedtls_mpi_free(&E); [all …]
|
D | test_suite_pk.function | 547 TEST_ASSERT(mbedtls_test_read_mpi(&rsa->E, input_E) == 0); 587 TEST_ASSERT(mbedtls_test_read_mpi(&rsa->E, input_E) == 0); 840 mbedtls_mpi N, P, Q, E; 847 mbedtls_mpi_init(&Q); mbedtls_mpi_init(&E); 863 TEST_ASSERT(mbedtls_test_read_mpi(&rsa->E, input_E) == 0); 871 mbedtls_mpi_init(&Q); mbedtls_mpi_init(&E); 881 TEST_ASSERT(mbedtls_test_read_mpi(&E, input_E) == 0); 886 TEST_ASSERT(mbedtls_rsa_import(rsa, &N, &P, &Q, NULL, &E) == 0); 902 mbedtls_mpi_free(&Q); mbedtls_mpi_free(&E); 916 mbedtls_mpi N, P, Q, E; [all …]
|
D | test_suite_bignum.function | 986 mbedtls_mpi A, E, N, RR, Z, X; 988 mbedtls_mpi_init(&A); mbedtls_mpi_init(&E); mbedtls_mpi_init(&N); 992 TEST_ASSERT(mbedtls_test_read_mpi(&E, input_E) == 0); 996 res = mbedtls_mpi_exp_mod(&Z, &A, &E, &N, NULL); 1004 res = mbedtls_mpi_exp_mod(&Z, &A, &E, &N, &RR); 1012 res = mbedtls_mpi_exp_mod(&Z, &A, &E, &N, &RR); 1020 mbedtls_mpi_free(&A); mbedtls_mpi_free(&E); mbedtls_mpi_free(&N); 1029 mbedtls_mpi A, E, N, RR, Z; 1030 mbedtls_mpi_init(&A); mbedtls_mpi_init(&E); mbedtls_mpi_init(&N); 1038 /* Set E to 2^(E_bytes - 1) + 1 */ [all …]
|
/mbedtls-3.5.0/programs/pkey/ |
D | mpi_demo.c | 43 mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; in main() local 45 mbedtls_mpi_init(&E); mbedtls_mpi_init(&P); mbedtls_mpi_init(&Q); mbedtls_mpi_init(&N); in main() 51 MBEDTLS_MPI_CHK(mbedtls_mpi_read_string(&E, 10, "257")); in main() 56 MBEDTLS_MPI_CHK(mbedtls_mpi_write_file(" E = ", &E, 10, NULL)); in main() 66 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(&D, &E, &H)); in main() 74 MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod(&Y, &X, &E, &N, NULL)); in main() 86 mbedtls_mpi_free(&E); mbedtls_mpi_free(&P); mbedtls_mpi_free(&Q); mbedtls_mpi_free(&N); in main()
|
D | rsa_genkey.c | 59 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local 67 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in main() 93 if ((ret = mbedtls_rsa_export(&rsa, &N, &P, &Q, &D, &E)) != 0 || in main() 105 (ret = mbedtls_mpi_write_file("E = ", &E, 16, fpub)) != 0) { in main() 119 (ret = mbedtls_mpi_write_file("E = ", &E, 16, fpriv)) != 0 || in main() 144 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in main()
|
D | rsa_encrypt.c | 59 mbedtls_mpi N, E; in main() local 74 mbedtls_mpi_init(&N); mbedtls_mpi_init(&E); in main() 98 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0) { in main() 106 if ((ret = mbedtls_rsa_import(&rsa, &N, NULL, NULL, NULL, &E)) != 0) { in main() 153 mbedtls_mpi_free(&N); mbedtls_mpi_free(&E); in main()
|
D | rsa_sign.c | 53 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local 58 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in main() 81 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main() 94 if ((ret = mbedtls_rsa_import(&rsa, &N, &P, &Q, &D, &E)) != 0) { in main() 160 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in main()
|
D | key_app.c | 91 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local 103 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in main() 207 if ((ret = mbedtls_rsa_export(rsa, &N, &P, &Q, &D, &E)) != 0 || in main() 214 MBEDTLS_MPI_CHK(mbedtls_mpi_write_file("E: ", &E, 16, NULL)); in main() 265 NULL, &E)) != 0) { in main() 270 MBEDTLS_MPI_CHK(mbedtls_mpi_write_file("E: ", &E, 16, NULL)); in main() 311 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in main()
|
D | rsa_decrypt.c | 56 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local 83 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in main() 105 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main() 119 if ((ret = mbedtls_rsa_import(&rsa, &N, &P, &Q, &D, &E)) != 0) { in main() 179 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in main()
|
D | key_app_writer.c | 206 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local 220 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in main() 322 if ((ret = mbedtls_rsa_export(rsa, &N, &P, &Q, &D, &E)) != 0 || in main() 329 mbedtls_mpi_write_file("E: ", &E, 16, NULL); in main() 376 NULL, &E)) != 0) { in main() 381 mbedtls_mpi_write_file("E: ", &E, 16, NULL); in main() 418 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in main()
|
D | dh_server.c | 80 mbedtls_mpi N, P, Q, D, E; in main() local 89 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); in main() 120 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main() 131 if ((ret = mbedtls_rsa_import(&rsa, &N, &P, &Q, &D, &E)) != 0) { in main() 291 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); in main()
|
D | gen_key.c | 183 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local 196 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in main() 350 if ((ret = mbedtls_rsa_export(rsa, &N, &P, &Q, &D, &E)) != 0 || in main() 357 mbedtls_mpi_write_file("E: ", &E, 16, NULL); in main() 404 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in main()
|
/mbedtls-3.5.0/programs/fuzz/ |
D | fuzz_pubkey.c | 18 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in LLVMFuzzerTestOneInput() local 22 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in LLVMFuzzerTestOneInput() 26 if (mbedtls_rsa_export(rsa, &N, NULL, NULL, NULL, &E) != 0) { in LLVMFuzzerTestOneInput() 29 if (mbedtls_rsa_export(rsa, &N, &P, &Q, &D, &E) != MBEDTLS_ERR_RSA_BAD_INPUT_DATA) { in LLVMFuzzerTestOneInput() 37 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in LLVMFuzzerTestOneInput()
|
D | fuzz_privkey.c | 45 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in LLVMFuzzerTestOneInput() local 49 mbedtls_mpi_init(&D); mbedtls_mpi_init(&E); mbedtls_mpi_init(&DP); in LLVMFuzzerTestOneInput() 53 if (mbedtls_rsa_export(rsa, &N, &P, &Q, &D, &E) != 0) { in LLVMFuzzerTestOneInput() 61 mbedtls_mpi_free(&D); mbedtls_mpi_free(&E); mbedtls_mpi_free(&DP); in LLVMFuzzerTestOneInput()
|
/mbedtls-3.5.0/include/mbedtls/ |
D | rsa.h | 99 mbedtls_mpi MBEDTLS_PRIVATE(E); /*!< The public exponent. */ 238 const mbedtls_mpi *D, const mbedtls_mpi *E); 279 unsigned char const *E, size_t E_len); 357 mbedtls_mpi *D, mbedtls_mpi *E); 411 unsigned char *E, size_t E_len);
|
/mbedtls-3.5.0/tests/data_files/ |
D | Readme-x509.txt | 47 - key type: R -> RSA, E -> EC 59 - cli2.crt: 2 E: basic 68 - server3.crt: 1 E L: EC cert signed by RSA CA 70 - server5*.crt: 2* E L: misc *(except -selfsigned and -ss-*) 82 - server6-ss-child.crt: O E: "child" of non-CA server5-selfsigned 83 - server6.crt, server6.pem: 2 E L C: revoked 84 - server7.crt: I1 E L P1(usually): EC signed by RSA signed by EC 98 - server10.crt: I3 E L
|