Home
last modified time | relevance | path

Searched refs:P (Results 1 – 25 of 65) sorted by relevance

123

/openthread-3.4.0/third_party/mbedtls/repo/library/
Dmd5.c117 #define P(a,b,c,d,k,s,t) \ in mbedtls_internal_md5_process() macro
131 P( local.A, local.B, local.C, local.D, 0, 7, 0xD76AA478 ); in mbedtls_internal_md5_process()
132 P( local.D, local.A, local.B, local.C, 1, 12, 0xE8C7B756 ); in mbedtls_internal_md5_process()
133 P( local.C, local.D, local.A, local.B, 2, 17, 0x242070DB ); in mbedtls_internal_md5_process()
134 P( local.B, local.C, local.D, local.A, 3, 22, 0xC1BDCEEE ); in mbedtls_internal_md5_process()
135 P( local.A, local.B, local.C, local.D, 4, 7, 0xF57C0FAF ); in mbedtls_internal_md5_process()
136 P( local.D, local.A, local.B, local.C, 5, 12, 0x4787C62A ); in mbedtls_internal_md5_process()
137 P( local.C, local.D, local.A, local.B, 6, 17, 0xA8304613 ); in mbedtls_internal_md5_process()
138 P( local.B, local.C, local.D, local.A, 7, 22, 0xFD469501 ); in mbedtls_internal_md5_process()
139 P( local.A, local.B, local.C, local.D, 8, 7, 0x698098D8 ); in mbedtls_internal_md5_process()
[all …]
Dmd4.c123 #define P(a,b,c,d,x,s) \ in mbedtls_internal_md4_process() macro
131 P( local.A, local.B, local.C, local.D, local.X[ 0], 3 ); in mbedtls_internal_md4_process()
132 P( local.D, local.A, local.B, local.C, local.X[ 1], 7 ); in mbedtls_internal_md4_process()
133 P( local.C, local.D, local.A, local.B, local.X[ 2], 11 ); in mbedtls_internal_md4_process()
134 P( local.B, local.C, local.D, local.A, local.X[ 3], 19 ); in mbedtls_internal_md4_process()
135 P( local.A, local.B, local.C, local.D, local.X[ 4], 3 ); in mbedtls_internal_md4_process()
136 P( local.D, local.A, local.B, local.C, local.X[ 5], 7 ); in mbedtls_internal_md4_process()
137 P( local.C, local.D, local.A, local.B, local.X[ 6], 11 ); in mbedtls_internal_md4_process()
138 P( local.B, local.C, local.D, local.A, local.X[ 7], 19 ); in mbedtls_internal_md4_process()
139 P( local.A, local.B, local.C, local.D, local.X[ 8], 3 ); in mbedtls_internal_md4_process()
[all …]
Dsha1.c141 #define P(a,b,c,d,e,x) \ in mbedtls_internal_sha1_process() macro
157 P( local.A, local.B, local.C, local.D, local.E, local.W[0] ); in mbedtls_internal_sha1_process()
158 P( local.E, local.A, local.B, local.C, local.D, local.W[1] ); in mbedtls_internal_sha1_process()
159 P( local.D, local.E, local.A, local.B, local.C, local.W[2] ); in mbedtls_internal_sha1_process()
160 P( local.C, local.D, local.E, local.A, local.B, local.W[3] ); in mbedtls_internal_sha1_process()
161 P( local.B, local.C, local.D, local.E, local.A, local.W[4] ); in mbedtls_internal_sha1_process()
162 P( local.A, local.B, local.C, local.D, local.E, local.W[5] ); in mbedtls_internal_sha1_process()
163 P( local.E, local.A, local.B, local.C, local.D, local.W[6] ); in mbedtls_internal_sha1_process()
164 P( local.D, local.E, local.A, local.B, local.C, local.W[7] ); in mbedtls_internal_sha1_process()
165 P( local.C, local.D, local.E, local.A, local.B, local.W[8] ); in mbedtls_internal_sha1_process()
[all …]
Drsa_internal.c64 mbedtls_mpi *P, mbedtls_mpi *Q ) in mbedtls_rsa_deduce_primes() argument
88 if( P == NULL || Q == NULL || P->p != NULL || Q->p != NULL ) in mbedtls_rsa_deduce_primes()
134 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
135 if( mbedtls_mpi_cmp_int( P, 1 ) != 0 ) in mbedtls_rsa_deduce_primes()
152 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
154 if( mbedtls_mpi_cmp_int( P, 1 ) == 1 && in mbedtls_rsa_deduce_primes()
155 mbedtls_mpi_cmp_mpi( P, N ) == -1 ) in mbedtls_rsa_deduce_primes()
162 MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( Q, NULL, N, P ) ); in mbedtls_rsa_deduce_primes()
197 int mbedtls_rsa_deduce_private_exponent( mbedtls_mpi const *P, in mbedtls_rsa_deduce_private_exponent() argument
208 if( mbedtls_mpi_cmp_int( P, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
[all …]
Ddhm.c101 static int dhm_check_range( const mbedtls_mpi *param, const mbedtls_mpi *P ) in dhm_check_range() argument
108 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &U, P, 2 ) ); in dhm_check_range()
139 if( ( ret = dhm_read_bignum( &ctx->P, p, end ) ) != 0 || in mbedtls_dhm_read_params()
144 if( ( ret = dhm_check_range( &ctx->GY, &ctx->P ) ) != 0 ) in mbedtls_dhm_read_params()
147 ctx->len = mbedtls_mpi_size( &ctx->P ); in mbedtls_dhm_read_params()
173 if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 ) in dhm_make_common()
178 if( (unsigned) x_size < mbedtls_mpi_size( &ctx->P ) ) in dhm_make_common()
185 ret = dhm_random_below( &ctx->X, &ctx->P, f_rng, p_rng ); in dhm_make_common()
196 &ctx->P , &ctx->RP ) ); in dhm_make_common()
198 if( ( ret = dhm_check_range( &ctx->GX, &ctx->P ) ) != 0 ) in dhm_make_common()
[all …]
Decp.c691 mbedtls_mpi_init( &grp->P ); in mbedtls_ecp_group_init()
744 mbedtls_mpi_free( &grp->P ); in mbedtls_ecp_group_free()
777 int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q ) in mbedtls_ecp_copy() argument
780 ECP_VALIDATE_RET( P != NULL ); in mbedtls_ecp_copy()
783 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) ); in mbedtls_ecp_copy()
784 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Y, &Q->Y ) ); in mbedtls_ecp_copy()
785 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Z, &Q->Z ) ); in mbedtls_ecp_copy()
831 int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P, in mbedtls_ecp_point_cmp() argument
834 ECP_VALIDATE_RET( P != NULL ); in mbedtls_ecp_point_cmp()
837 if( mbedtls_mpi_cmp_mpi( &P->X, &Q->X ) == 0 && in mbedtls_ecp_point_cmp()
[all …]
Dblowfish.c43 static const uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2] = { variable
83 Xl = Xl ^ ctx->P[i]; in blowfish_enc()
95 Xr = Xr ^ ctx->P[MBEDTLS_BLOWFISH_ROUNDS]; in blowfish_enc()
96 Xl = Xl ^ ctx->P[MBEDTLS_BLOWFISH_ROUNDS + 1]; in blowfish_enc()
112 Xl = Xl ^ ctx->P[i]; in blowfish_dec()
124 Xr = Xr ^ ctx->P[1]; in blowfish_dec()
125 Xl = Xl ^ ctx->P[0]; in blowfish_dec()
182 ctx->P[i] = P[i] ^ data; in mbedtls_blowfish_setkey()
191 ctx->P[i] = datal; in mbedtls_blowfish_setkey()
192 ctx->P[i + 1] = datar; in mbedtls_blowfish_setkey()
Dsha256.c165 #define P(a,b,c,d,e,f,g,h,x,K) \ macro
198 P( local.A[0], local.A[1], local.A[2], local.A[3], local.A[4], in mbedtls_internal_sha256_process()
213 P( local.A[0], local.A[1], local.A[2], local.A[3], local.A[4], in mbedtls_internal_sha256_process()
215 P( local.A[7], local.A[0], local.A[1], local.A[2], local.A[3], in mbedtls_internal_sha256_process()
217 P( local.A[6], local.A[7], local.A[0], local.A[1], local.A[2], in mbedtls_internal_sha256_process()
219 P( local.A[5], local.A[6], local.A[7], local.A[0], local.A[1], in mbedtls_internal_sha256_process()
221 P( local.A[4], local.A[5], local.A[6], local.A[7], local.A[0], in mbedtls_internal_sha256_process()
223 P( local.A[3], local.A[4], local.A[5], local.A[6], local.A[7], in mbedtls_internal_sha256_process()
225 P( local.A[2], local.A[3], local.A[4], local.A[5], local.A[6], in mbedtls_internal_sha256_process()
227 P( local.A[1], local.A[2], local.A[3], local.A[4], local.A[5], in mbedtls_internal_sha256_process()
[all …]
Drsa.c79 const mbedtls_mpi *P, const mbedtls_mpi *Q, in mbedtls_rsa_import() argument
86 ( P != NULL && ( ret = mbedtls_mpi_copy( &ctx->P, P ) ) != 0 ) || in mbedtls_rsa_import()
102 unsigned char const *P, size_t P_len, in mbedtls_rsa_import_raw() argument
116 if( P != NULL ) in mbedtls_rsa_import_raw()
117 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->P, P, P_len ) ); in mbedtls_rsa_import_raw()
173 ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) <= 0 || in rsa_check_context()
174 mbedtls_mpi_get_bit( &ctx->P, 0 ) == 0 || in rsa_check_context()
209 ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) <= 0 || in rsa_check_context()
241 have_P = ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) != 0 ); in mbedtls_rsa_complete()
279 if( ( ret = mbedtls_mpi_mul_mpi( &ctx->N, &ctx->P, in mbedtls_rsa_complete()
[all …]
/openthread-3.4.0/third_party/mbedtls/repo/tests/suites/
Dtest_suite_ccm.data183 CCM encrypt and tag NIST VTT AES-128 #1 (P=24, N=13, A=32, T=4)
187 CCM encrypt and tag NIST VTT AES-128 #2 (P=24, N=13, A=32, T=6)
191 CCM encrypt and tag NIST VTT AES-128 #3 (P=24, N=13, A=32, T=8)
195 CCM encrypt and tag NIST VTT AES-128 #4 (P=24, N=13, A=32, T=10)
199 CCM encrypt and tag NIST VTT AES-128 #5 (P=24, N=13, A=32, T=12)
203 CCM encrypt and tag NIST VTT AES-128 #6 (P=24, N=13, A=32, T=14)
207 CCM encrypt and tag NIST VTT AES-128 #7 (P=24, N=13, A=32, T=16)
211 CCM encrypt and tag NIST VTT AES-192 #1 (P=24, N=13, A=32, T=4)
215 CCM encrypt and tag NIST VTT AES-192 #2 (P=24, N=13, A=32, T=6)
219 CCM encrypt and tag NIST VTT AES-192 #3 (P=24, N=13, A=32, T=8)
[all …]
Dtest_suite_cipher.ccm.data1 AES-128-CCM test vector NIST #1 (P=0, N=7, A=0, T=4)
5 AES-128-CCM test vector NIST #2 (P=0, N=7, A=0, T=4)
9 AES-128-CCM test vector NIST #3 (P=0, N=7, A=0, T=16)
13 AES-128-CCM test vector NIST #4 (P=0, N=7, A=0, T=16)
17 AES-128-CCM test vector NIST #5 (P=0, N=13, A=0, T=4)
21 AES-128-CCM test vector NIST #6 (P=0, N=13, A=0, T=4)
25 AES-128-CCM test vector NIST #7 (P=0, N=13, A=0, T=16)
29 AES-128-CCM test vector NIST #8 (P=0, N=13, A=0, T=16)
33 AES-128-CCM test vector NIST #9 (P=24, N=7, A=0, T=4)
37 AES-128-CCM test vector NIST #10 (P=24, N=7, A=0, T=4)
[all …]
Dtest_suite_ecp.function47 mbedtls_ecp_point P;
70 mbedtls_ecp_copy( NULL, &P ) );
72 mbedtls_ecp_copy( &P, NULL ) );
101 mbedtls_ecp_point_cmp( NULL, &P ) );
103 mbedtls_ecp_point_cmp( &P, NULL ) );
109 mbedtls_ecp_point_read_string( &P, 2,
112 mbedtls_ecp_point_read_string( &P, 2,
116 mbedtls_ecp_point_write_binary( NULL, &P,
126 mbedtls_ecp_point_write_binary( &grp, &P,
131 mbedtls_ecp_point_write_binary( &grp, &P,
[all …]
Dtest_suite_dhm.function46 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->P ) < 0 );
49 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &ctx->GX, &ctx->P ) < 0 );
51 /* Check ske: it must contain P, G and G^X, each prefixed with a
53 if( !check_dhm_param_output( &ctx->P, ske, ske_len, &offset ) )
209 TEST_ASSERT( mbedtls_test_read_mpi( &ctx_srv.P, radix_P, input_P ) == 0 );
211 pub_cli_len = mbedtls_mpi_size( &ctx_srv.P );
298 mbedtls_mpi P, G;
302 mbedtls_mpi_init( &P );
306 TEST_ASSERT( mbedtls_mpi_lset( &P, 1 ) == 0 );
307 TEST_ASSERT( mbedtls_mpi_shift_l( &P, ( P_bytes * 8 ) - 1 ) == 0 );
[all …]
Dtest_suite_rsa.function524 mbedtls_mpi N, P, Q, E;
527 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P );
535 TEST_ASSERT( mbedtls_test_read_mpi( &P, radix_P, input_P ) == 0 );
540 TEST_ASSERT( mbedtls_rsa_import( &ctx, &N, &P, &Q, NULL, &E ) == 0 );
560 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P );
609 mbedtls_mpi N, P, Q, E;
613 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P );
619 TEST_ASSERT( mbedtls_test_read_mpi( &P, radix_P, input_P ) == 0 );
624 TEST_ASSERT( mbedtls_rsa_import( &ctx, &N, &P, &Q, NULL, &E ) == 0 );
668 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P );
[all …]
/openthread-3.4.0/third_party/mbedtls/repo/programs/pkey/
Dmpi_demo.c56 mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; in main() local
58 mbedtls_mpi_init( &E ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &N ); in main()
62 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P, 10, "2789" ) ); in main()
65 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &N, &P, &Q ) ); in main()
72 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " P = ", &P, 10, NULL ) ); in main()
76 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P, &P, 1 ) ); in main()
78 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P, &Q ) ); in main()
99 mbedtls_mpi_free( &E ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &N ); in main()
Ddh_genprime.c75 mbedtls_mpi G, P, Q; in main() local
84 mbedtls_mpi_init( &G ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in main()
137 if( ( ret = mbedtls_mpi_gen_prime( &P, nbits, 1, in main()
147 if( ( ret = mbedtls_mpi_sub_int( &Q, &P, 1 ) ) != 0 ) in main()
174 if( ( ret = mbedtls_mpi_write_file( "P = ", &P, 16, fout ) != 0 ) || in main()
189 mbedtls_mpi_free( &G ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
Drsa_genkey.c72 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local
79 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in main()
108 if( ( ret = mbedtls_rsa_export ( &rsa, &N, &P, &Q, &D, &E ) ) != 0 || in main()
140 ( ret = mbedtls_mpi_write_file( "P = " , &P , 16, fpriv ) ) != 0 || in main()
161 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
Drsa_sign.c68 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local
72 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in main()
100 ( ret = mbedtls_mpi_read_file( &P , 16, f ) ) != 0 || in main()
112 if( ( ret = mbedtls_rsa_import( &rsa, &N, &P, &Q, &D, &E ) ) != 0 ) in main()
180 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
Ddh_server.c94 mbedtls_mpi N, P, Q, D, E; in main() local
103 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in main()
139 ( ret = mbedtls_mpi_read_file( &P , 16, f ) ) != 0 || in main()
149 if( ( ret = mbedtls_rsa_import( &rsa, &N, &P, &Q, &D, &E ) ) != 0 ) in main()
176 if( mbedtls_mpi_read_file( &dhm.P, 16, f ) != 0 || in main()
213 if( ( ret = mbedtls_dhm_make_params( &dhm, (int) mbedtls_mpi_size( &dhm.P ), buf, &n, in main()
318 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
Drsa_decrypt.c69 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in main() local
96 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in main()
123 ( ret = mbedtls_mpi_read_file( &P , 16, f ) ) != 0 || in main()
136 if( ( ret = mbedtls_rsa_import( &rsa, &N, &P, &Q, &D, &E ) ) != 0 ) in main()
199 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
/openthread-3.4.0/third_party/mbedtls/repo/include/mbedtls/
Drsa_internal.h97 mbedtls_mpi *P, mbedtls_mpi *Q );
120 int mbedtls_rsa_deduce_private_exponent( mbedtls_mpi const *P,
146 int mbedtls_rsa_deduce_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q,
181 int mbedtls_rsa_validate_params( const mbedtls_mpi *N, const mbedtls_mpi *P,
216 int mbedtls_rsa_validate_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q,
Decp_internal.h170 mbedtls_ecp_point *R, const mbedtls_ecp_point *P,
195 mbedtls_ecp_point *R, const mbedtls_ecp_point *P );
252 mbedtls_ecp_point *R, mbedtls_ecp_point *S, const mbedtls_ecp_point *P,
273 mbedtls_ecp_point *P, int (*f_rng)(void *, unsigned char *, size_t),
289 mbedtls_ecp_point *P );
Decp.h263 mbedtls_mpi P; /*!< The prime modulus of the base field. */ member
668 int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q );
718 int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P,
733 int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix,
762 const mbedtls_ecp_point *P,
789 mbedtls_ecp_point *P,
960 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
994 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
1035 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
1080 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
/openthread-3.4.0/third_party/mbedtls/repo/programs/fuzz/
Dfuzz_privkey.c25 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in LLVMFuzzerTestOneInput() local
28 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in LLVMFuzzerTestOneInput()
33 if ( mbedtls_rsa_export( rsa, &N, &P, &Q, &D, &E ) != 0 ) { in LLVMFuzzerTestOneInput()
40 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in LLVMFuzzerTestOneInput()
Dfuzz_pubkey.c16 mbedtls_mpi N, P, Q, D, E, DP, DQ, QP; in LLVMFuzzerTestOneInput() local
19 mbedtls_mpi_init( &N ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in LLVMFuzzerTestOneInput()
27 if ( mbedtls_rsa_export( rsa, &N, &P, &Q, &D, &E ) != MBEDTLS_ERR_RSA_BAD_INPUT_DATA ) { in LLVMFuzzerTestOneInput()
34 mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in LLVMFuzzerTestOneInput()

123