Home
last modified time | relevance | path

Searched refs:R (Results 1 – 25 of 33) sorted by relevance

12

/mbedtls-3.5.0/library/
Dsha1.c103 #define R(t) \ in mbedtls_internal_sha1_process() macro
144 P(local.E, local.A, local.B, local.C, local.D, R(16)); in mbedtls_internal_sha1_process()
145 P(local.D, local.E, local.A, local.B, local.C, R(17)); in mbedtls_internal_sha1_process()
146 P(local.C, local.D, local.E, local.A, local.B, R(18)); in mbedtls_internal_sha1_process()
147 P(local.B, local.C, local.D, local.E, local.A, R(19)); in mbedtls_internal_sha1_process()
155 P(local.A, local.B, local.C, local.D, local.E, R(20)); in mbedtls_internal_sha1_process()
156 P(local.E, local.A, local.B, local.C, local.D, R(21)); in mbedtls_internal_sha1_process()
157 P(local.D, local.E, local.A, local.B, local.C, R(22)); in mbedtls_internal_sha1_process()
158 P(local.C, local.D, local.E, local.A, local.B, R(23)); in mbedtls_internal_sha1_process()
159 P(local.B, local.C, local.D, local.E, local.A, R(24)); in mbedtls_internal_sha1_process()
[all …]
Decp.c132 mbedtls_ecp_point R; /* current intermediate result */ member
152 mbedtls_ecp_point_init(&ctx->R); in ecp_restart_rsm_init()
170 mbedtls_ecp_point_free(&ctx->R); in ecp_restart_rsm_free()
187 mbedtls_ecp_point R; /* R intermediate result */ member
202 mbedtls_ecp_point_init(&ctx->R); in ecp_restart_ma_init()
216 mbedtls_ecp_point_free(&ctx->R); in ecp_restart_ma_free()
1494 static int ecp_double_jac(const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, in ecp_double_jac() argument
1504 return mbedtls_internal_ecp_double_jac(grp, R, P); in ecp_double_jac()
1561 MPI_ECP_MOV(&R->X, &tmp[2]); in ecp_double_jac()
1562 MPI_ECP_MOV(&R->Y, &tmp[1]); in ecp_double_jac()
[all …]
Decdsa.c252 mbedtls_ecp_point R; in mbedtls_ecdsa_sign_restartable() local
266 mbedtls_ecp_point_init(&R); in mbedtls_ecdsa_sign_restartable()
316 MBEDTLS_MPI_CHK(mbedtls_ecp_mul_restartable(grp, &R, pk, &grp->G, in mbedtls_ecdsa_sign_restartable()
320 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(pr, &R.X, &grp->N)); in mbedtls_ecdsa_sign_restartable()
368 mbedtls_ecp_point_free(&R); in mbedtls_ecdsa_sign_restartable()
509 mbedtls_ecp_point R; in mbedtls_ecdsa_verify_restartable() local
512 mbedtls_ecp_point_init(&R); in mbedtls_ecdsa_verify_restartable()
574 &R, pu1, &grp->G, pu2, Q, ECDSA_RS_ECP)); in mbedtls_ecdsa_verify_restartable()
576 if (mbedtls_ecp_is_zero(&R)) { in mbedtls_ecdsa_verify_restartable()
585 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&R.X, &R.X, &grp->N)); in mbedtls_ecdsa_verify_restartable()
[all …]
Ddhm.c180 static int dhm_random_below(mbedtls_mpi *R, const mbedtls_mpi *M, in dhm_random_below() argument
185 MBEDTLS_MPI_CHK(mbedtls_mpi_random(R, 3, M, f_rng, p_rng)); in dhm_random_below()
186 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(R, R, 1)); in dhm_random_below()
359 mbedtls_mpi R; in dhm_update_blinding() local
361 mbedtls_mpi_init(&R); in dhm_update_blinding()
399 MBEDTLS_MPI_CHK(dhm_random_below(&R, &ctx->P, f_rng, p_rng)); in dhm_update_blinding()
400 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&ctx->Vf, &ctx->Vi, &R)); in dhm_update_blinding()
403 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&ctx->Vf, &ctx->Vf, &R)); in dhm_update_blinding()
409 mbedtls_mpi_free(&R); in dhm_update_blinding()
Decp_internal_alt.h168 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
193 mbedtls_ecp_point *R, const mbedtls_ecp_point *P);
250 mbedtls_ecp_point *R,
Dnist_kw.c278 unsigned char *R = NULL; in unwrap() local
287 R = output + (semiblocks - 2) * KW_SEMIBLOCK_LENGTH; in unwrap()
294 memcpy(inbuff + KW_SEMIBLOCK_LENGTH, R, KW_SEMIBLOCK_LENGTH); in unwrap()
305 memcpy(R, outbuff + KW_SEMIBLOCK_LENGTH, KW_SEMIBLOCK_LENGTH); in unwrap()
307 if (R == output) { in unwrap()
308 R = output + (semiblocks - 2) * KW_SEMIBLOCK_LENGTH; in unwrap()
310 R -= KW_SEMIBLOCK_LENGTH; in unwrap()
Dbignum.c1340 int mbedtls_mpi_div_mpi(mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A, in mbedtls_mpi_div_mpi() argument
1371 if (R != NULL) { in mbedtls_mpi_div_mpi()
1372 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(R, A)); in mbedtls_mpi_div_mpi()
1443 if (R != NULL) { in mbedtls_mpi_div_mpi()
1446 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(R, &X)); in mbedtls_mpi_div_mpi()
1448 if (mbedtls_mpi_cmp_int(R, 0) == 0) { in mbedtls_mpi_div_mpi()
1449 R->s = 1; in mbedtls_mpi_div_mpi()
1465 int mbedtls_mpi_div_int(mbedtls_mpi *Q, mbedtls_mpi *R, in mbedtls_mpi_div_int() argument
1478 return mbedtls_mpi_div_mpi(Q, R, A, &B); in mbedtls_mpi_div_int()
1484 int mbedtls_mpi_mod_mpi(mbedtls_mpi *R, const mbedtls_mpi *A, const mbedtls_mpi *B) in mbedtls_mpi_mod_mpi() argument
[all …]
Dsha256.c434 #define R(t) \ macro
474 R(i); in mbedtls_internal_sha256_process_c()
512 local.A[5], local.A[6], local.A[7], R(i+0), K[i+0]); in mbedtls_internal_sha256_process_c()
514 local.A[4], local.A[5], local.A[6], R(i+1), K[i+1]); in mbedtls_internal_sha256_process_c()
516 local.A[3], local.A[4], local.A[5], R(i+2), K[i+2]); in mbedtls_internal_sha256_process_c()
518 local.A[2], local.A[3], local.A[4], R(i+3), K[i+3]); in mbedtls_internal_sha256_process_c()
520 local.A[1], local.A[2], local.A[3], R(i+4), K[i+4]); in mbedtls_internal_sha256_process_c()
522 local.A[0], local.A[1], local.A[2], R(i+5), K[i+5]); in mbedtls_internal_sha256_process_c()
524 local.A[7], local.A[0], local.A[1], R(i+6), K[i+6]); in mbedtls_internal_sha256_process_c()
526 local.A[6], local.A[7], local.A[0], R(i+7), K[i+7]); in mbedtls_internal_sha256_process_c()
Decjpake.c586 static int ecjpake_ecp_add3(mbedtls_ecp_group *grp, mbedtls_ecp_point *R, in ecjpake_ecp_add3() argument
597 MBEDTLS_MPI_CHK(mbedtls_ecp_muladd(grp, R, &one, A, &one, B)); in ecjpake_ecp_add3()
598 MBEDTLS_MPI_CHK(mbedtls_ecp_muladd(grp, R, &one, R, &one, C)); in ecjpake_ecp_add3()
664 static int ecjpake_mul_secret(mbedtls_mpi *R, int sign, in ecjpake_mul_secret() argument
682 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(R, X, &b)); in ecjpake_mul_secret()
683 R->s *= sign; in ecjpake_mul_secret()
684 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(R, R, N)); in ecjpake_mul_secret()
Drsa.c781 mbedtls_mpi R; in rsa_prepare_blinding() local
783 mbedtls_mpi_init(&R); in rsa_prepare_blinding()
805 MBEDTLS_MPI_CHK(mbedtls_mpi_fill_random(&R, ctx->len - 1, f_rng, p_rng)); in rsa_prepare_blinding()
806 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&ctx->Vi, &ctx->Vf, &R)); in rsa_prepare_blinding()
821 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&ctx->Vi, &ctx->Vi, &R)); in rsa_prepare_blinding()
830 mbedtls_mpi_free(&R); in rsa_prepare_blinding()
873 mbedtls_mpi P1, Q1, R; in mbedtls_rsa_private() local
920 mbedtls_mpi_init(&R); in mbedtls_rsa_private()
964 MBEDTLS_MPI_CHK(mbedtls_mpi_fill_random(&R, RSA_EXPONENT_BLINDING, in mbedtls_rsa_private()
967 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&D_blind, &D_blind, &R)); in mbedtls_rsa_private()
[all …]
/mbedtls-3.5.0/tests/suites/
Dtest_suite_ecp.function182 mbedtls_ecp_point R, P;
190 mbedtls_ecp_point_init(&R); mbedtls_ecp_point_init(&P);
210 ECP_PT_RESET(&R);
211 ret = mbedtls_ecp_mul_restartable(&grp, &R, &dA, &grp.G,
216 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&R.X, &xA) == 0);
217 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&R.Y, &yA) == 0);
223 mbedtls_ecp_copy(&P, &R);
226 ECP_PT_RESET(&R);
227 ret = mbedtls_ecp_mul_restartable(&grp, &R, &dB, &P,
232 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&R.X, &xZ) == 0);
[all …]
Dtest_suite_bignum_mod_raw.function403 mbedtls_mpi_uint *R = NULL;
416 TEST_EQUAL(mbedtls_test_read_mpi_core(&R, &limbs_R, result), 0);
435 ASSERT_COMPARE(X, bytes, R, bytes);
440 ASSERT_COMPARE(X, bytes, R, bytes);
445 ASSERT_COMPARE(X, bytes, R, bytes);
450 ASSERT_COMPARE(X, bytes, R, bytes);
455 ASSERT_COMPARE(X, bytes, R, bytes);
460 ASSERT_COMPARE(X, bytes, R, bytes);
465 ASSERT_COMPARE(X, bytes, R, bytes);
470 ASSERT_COMPARE(X, bytes, R, bytes);
[all …]
Dtest_suite_bignum_mod_raw.generated.data1380 Convert from Mont: #1 1/R * 0 mod 53
1384 Convert from Mont: #2 1/R * 0 mod 53
1388 Convert from Mont: #3 1/R * 1 mod 53
1392 Convert from Mont: #4 1/R * 1 mod 53
1396 Convert from Mont: #5 1/R * 2 mod 53
1400 Convert from Mont: #6 1/R * 2 mod 53
1404 Convert from Mont: #7 1/R * 3 mod 53
1408 Convert from Mont: #8 1/R * 3 mod 53
1412 Convert from Mont: #9 1/R * 4 mod 53
1416 Convert from Mont: #10 1/R * 4 mod 53
[all …]
Dtest_suite_bignum.function850 mbedtls_mpi X, Y, Q, R, A, B;
852 mbedtls_mpi_init(&X); mbedtls_mpi_init(&Y); mbedtls_mpi_init(&Q); mbedtls_mpi_init(&R);
859 res = mbedtls_mpi_div_mpi(&Q, &R, &X, &Y);
863 TEST_ASSERT(sign_is_valid(&R));
865 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&R, &B) == 0);
869 mbedtls_mpi_free(&X); mbedtls_mpi_free(&Y); mbedtls_mpi_free(&Q); mbedtls_mpi_free(&R);
879 mbedtls_mpi X, Q, R, A, B;
881 mbedtls_mpi_init(&X); mbedtls_mpi_init(&Q); mbedtls_mpi_init(&R); mbedtls_mpi_init(&A);
887 res = mbedtls_mpi_div_int(&Q, &R, &X, input_Y);
891 TEST_ASSERT(sign_is_valid(&R));
[all …]
Dtest_suite_bignum_mod.function563 mbedtls_mpi_uint *R = NULL;
572 TEST_EQUAL(0, mbedtls_test_read_mpi_core(&R, &r_limbs, input_R));
577 TEST_EQUAL(ret, mbedtls_mpi_mod_residue_setup(&r, &m, R, r_limbs));
581 TEST_ASSERT(r.p == R);
587 mbedtls_free(R);
595 mbedtls_mpi_uint *R = NULL;
606 ASSERT_ALLOC(R, r_limbs);
625 TEST_EQUAL(0, mbedtls_mpi_mod_residue_setup(&r, &m, R, r_limbs));
658 mbedtls_free(R);
666 mbedtls_mpi_uint *R = NULL;
[all …]
Dtest_suite_bignum_core.function795 mbedtls_mpi A, B, N, X4, X8, T, R;
803 mbedtls_mpi_init(&R); /* for the result */
839 … TEST_EQUAL(0, mbedtls_mpi_grow(&R, limbs_AN)); /* ensure it's got the right number of limbs */
841 mbedtls_mpi_core_montmul(R.p, A.p, B.p, B.n, N.p, N.n, mm, T.p);
843 ASSERT_COMPARE(R.p, bytes, X->p, bytes);
845 /* The output (R, above) may be aliased to A - use R to save the value of A */
847 memcpy(R.p, A.p, bytes);
852 memcpy(A.p, R.p, bytes); /* restore A */
854 /* The output may be aliased to N - use R to save the value of N */
856 memcpy(R.p, N.p, bytes);
[all …]
Dtest_suite_bignum_random.function316 mbedtls_mpi R = { 1, limbs, result };
318 TEST_ASSERT(mbedtls_mpi_cmp_mpi(&R, &B) < 0);
319 TEST_ASSERT(mbedtls_mpi_cmp_int(&R, min) >= 0);
322 TEST_EQUAL(0, mbedtls_mpi_write_binary(&R, &value, 1));
327 stats[b] += mbedtls_mpi_get_bit(&R, b);
/mbedtls-3.5.0/tests/data_files/
DReadme-x509.txt47 - key type: R -> RSA, E -> EC
55 - cert_example_multi*.crt: 1/O R: subjectAltName
56 - cert_example_wildcard.crt: 1 R: wildcard in subject's CN
57 - cert_md*.crt, cert_sha*.crt: 1 R: signature hash
58 - cert_v1_with_ext.crt: 1 R: v1 with extensions (illegal)
63 - server1*.crt: 1* R C* P1*: misc *(server1-v1 see test-ca-v1.crt above)
66 - server2-v1*.crt: O R: see test-ca-v1.crt above
67 - server2*.crt: 1 R L: misc
69 - server4.crt: 2 R L: RSA cert signed by EC CA
95 - server8*.crt: I2 R L: RSA signed by EC signed by RSA (P1 for _int-ca2)
[all …]
Dtest-ca.server1.db1 R 210212144406Z 110212124407Z 01 unknown /C=NL/O=PolarSSL/CN=PolarSSL Server 1
2 R 210212144400Z 110212124407Z 03 unknown /C=NL/O=PolarSSL/CN=PolarSSL Test CA
Dtest-ca.server1.future-crl.db1 R 210212144406Z 290101124407Z 01 unknown /C=NL/O=PolarSSL/CN=PolarSSL Server 1
2 R 210212144400Z 290101124407Z 03 unknown /C=NL/O=PolarSSL/CN=PolarSSL Test CA
Drsa_pkcs8_pbes2_pbkdf2_2048_3des_sha224.pem27 PmvQ+R/23+eDqp/lymz0G6F6B10pldgqt5FHYxGaVEp7GIx6L+GtI6G2qGxpHJA9
Drsa_pkcs8_pbes2_pbkdf2_2048_des_sha224.pem10 R+0K9fyZWAJI7cZQSsuIPSO5DwDkXclWUFYaa9C0BcHRaz8ACkHu2vSF94LwG1th
Drsa_pkcs8_pbes2_pbkdf2_4096_3des_sha384.pem4 6jHvWF+R+49XZYsWssnwBFbEIPJVTNUN6qMedRUhWMmMGDpkvJNIDxvRgTfRaypg
/mbedtls-3.5.0/include/mbedtls/
Decp.h963 int mbedtls_ecp_mul(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
997 int mbedtls_ecp_mul_restartable(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
1038 int mbedtls_ecp_muladd(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
1083 mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
Dbignum.h806 int mbedtls_mpi_div_mpi(mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
827 int mbedtls_mpi_div_int(mbedtls_mpi *Q, mbedtls_mpi *R, const mbedtls_mpi *A,
847 int mbedtls_mpi_mod_mpi(mbedtls_mpi *R, const mbedtls_mpi *A,

12