Home
last modified time | relevance | path

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

123

/net-tools-3.5.0/mbedtls-2.4.0/library/
Dmd5.c135 #define P(a,b,c,d,k,s,t) \ in mbedtls_md5_process() macro
147 P( A, B, C, D, 0, 7, 0xD76AA478 ); in mbedtls_md5_process()
148 P( D, A, B, C, 1, 12, 0xE8C7B756 ); in mbedtls_md5_process()
149 P( C, D, A, B, 2, 17, 0x242070DB ); in mbedtls_md5_process()
150 P( B, C, D, A, 3, 22, 0xC1BDCEEE ); in mbedtls_md5_process()
151 P( A, B, C, D, 4, 7, 0xF57C0FAF ); in mbedtls_md5_process()
152 P( D, A, B, C, 5, 12, 0x4787C62A ); in mbedtls_md5_process()
153 P( C, D, A, B, 6, 17, 0xA8304613 ); in mbedtls_md5_process()
154 P( B, C, D, A, 7, 22, 0xFD469501 ); in mbedtls_md5_process()
155 P( A, B, C, D, 8, 7, 0x698098D8 ); in mbedtls_md5_process()
[all …]
Dsha1.c143 #define P(a,b,c,d,e,x) \ in mbedtls_sha1_process() macro
157 P( A, B, C, D, E, W[0] ); in mbedtls_sha1_process()
158 P( E, A, B, C, D, W[1] ); in mbedtls_sha1_process()
159 P( D, E, A, B, C, W[2] ); in mbedtls_sha1_process()
160 P( C, D, E, A, B, W[3] ); in mbedtls_sha1_process()
161 P( B, C, D, E, A, W[4] ); in mbedtls_sha1_process()
162 P( A, B, C, D, E, W[5] ); in mbedtls_sha1_process()
163 P( E, A, B, C, D, W[6] ); in mbedtls_sha1_process()
164 P( D, E, A, B, C, W[7] ); in mbedtls_sha1_process()
165 P( C, D, E, A, B, W[8] ); in mbedtls_sha1_process()
[all …]
Dmd4.c142 #define P(a,b,c,d,x,s) { a += F(b,c,d) + x; a = S(a,s); } in mbedtls_md4_process() macro
144 P( A, B, C, D, X[ 0], 3 ); in mbedtls_md4_process()
145 P( D, A, B, C, X[ 1], 7 ); in mbedtls_md4_process()
146 P( C, D, A, B, X[ 2], 11 ); in mbedtls_md4_process()
147 P( B, C, D, A, X[ 3], 19 ); in mbedtls_md4_process()
148 P( A, B, C, D, X[ 4], 3 ); in mbedtls_md4_process()
149 P( D, A, B, C, X[ 5], 7 ); in mbedtls_md4_process()
150 P( C, D, A, B, X[ 6], 11 ); in mbedtls_md4_process()
151 P( B, C, D, A, X[ 7], 19 ); in mbedtls_md4_process()
152 P( A, B, C, D, X[ 8], 3 ); in mbedtls_md4_process()
[all …]
Decp.c330 mbedtls_mpi_free( &grp->P ); in mbedtls_ecp_group_free()
363 int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q ) in mbedtls_ecp_copy() argument
367 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) ); in mbedtls_ecp_copy()
368 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Y, &Q->Y ) ); in mbedtls_ecp_copy()
369 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Z, &Q->Z ) ); in mbedtls_ecp_copy()
409 int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P, in mbedtls_ecp_point_cmp() argument
412 if( mbedtls_mpi_cmp_mpi( &P->X, &Q->X ) == 0 && in mbedtls_ecp_point_cmp()
413 mbedtls_mpi_cmp_mpi( &P->Y, &Q->Y ) == 0 && in mbedtls_ecp_point_cmp()
414 mbedtls_mpi_cmp_mpi( &P->Z, &Q->Z ) == 0 ) in mbedtls_ecp_point_cmp()
425 int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix, in mbedtls_ecp_point_read_string() argument
[all …]
Ddhm.c100 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()
135 if( ( ret = dhm_read_bignum( &ctx->P, p, end ) ) != 0 || in mbedtls_dhm_read_params()
140 if( ( ret = dhm_check_range( &ctx->GY, &ctx->P ) ) != 0 ) in mbedtls_dhm_read_params()
143 ctx->len = mbedtls_mpi_size( &ctx->P ); in mbedtls_dhm_read_params()
160 if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 ) in mbedtls_dhm_make_params()
170 while( mbedtls_mpi_cmp_mpi( &ctx->X, &ctx->P ) >= 0 ) in mbedtls_dhm_make_params()
176 while( dhm_check_range( &ctx->X, &ctx->P ) != 0 ); in mbedtls_dhm_make_params()
182 &ctx->P , &ctx->RP ) ); in mbedtls_dhm_make_params()
184 if( ( ret = dhm_check_range( &ctx->GX, &ctx->P ) ) != 0 ) in mbedtls_dhm_make_params()
[all …]
Dsha256.c175 #define P(a,b,c,d,e,f,g,h,x,K) \ macro
199 P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i], K[i] ); in mbedtls_sha256_process()
210 P( A[0], A[1], A[2], A[3], A[4], A[5], A[6], A[7], W[i+0], K[i+0] ); in mbedtls_sha256_process()
211 P( A[7], A[0], A[1], A[2], A[3], A[4], A[5], A[6], W[i+1], K[i+1] ); in mbedtls_sha256_process()
212 P( A[6], A[7], A[0], A[1], A[2], A[3], A[4], A[5], W[i+2], K[i+2] ); in mbedtls_sha256_process()
213 P( A[5], A[6], A[7], A[0], A[1], A[2], A[3], A[4], W[i+3], K[i+3] ); in mbedtls_sha256_process()
214 P( A[4], A[5], A[6], A[7], A[0], A[1], A[2], A[3], W[i+4], K[i+4] ); in mbedtls_sha256_process()
215 P( A[3], A[4], A[5], A[6], A[7], A[0], A[1], A[2], W[i+5], K[i+5] ); in mbedtls_sha256_process()
216 P( A[2], A[3], A[4], A[5], A[6], A[7], A[0], A[1], W[i+6], K[i+6] ); in mbedtls_sha256_process()
217 P( A[1], A[2], A[3], A[4], A[5], A[6], A[7], A[0], W[i+7], K[i+7] ); in mbedtls_sha256_process()
[all …]
Dblowfish.c70 static const uint32_t P[MBEDTLS_BLOWFISH_ROUNDS + 2] = { variable
110 Xl = Xl ^ ctx->P[i]; in blowfish_enc()
122 Xr = Xr ^ ctx->P[MBEDTLS_BLOWFISH_ROUNDS]; in blowfish_enc()
123 Xl = Xl ^ ctx->P[MBEDTLS_BLOWFISH_ROUNDS + 1]; in blowfish_enc()
139 Xl = Xl ^ ctx->P[i]; in blowfish_dec()
151 Xr = Xr ^ ctx->P[1]; in blowfish_dec()
152 Xl = Xl ^ ctx->P[0]; in blowfish_dec()
204 ctx->P[i] = P[i] ^ data; in mbedtls_blowfish_setkey()
213 ctx->P[i] = datal; in mbedtls_blowfish_setkey()
214 ctx->P[i + 1] = datar; in mbedtls_blowfish_setkey()
Decdh.c60 mbedtls_ecp_point P; in mbedtls_ecdh_compute_shared() local
62 mbedtls_ecp_point_init( &P ); in mbedtls_ecdh_compute_shared()
69 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, &P, d, Q, f_rng, p_rng ) ); in mbedtls_ecdh_compute_shared()
71 if( mbedtls_ecp_is_zero( &P ) ) in mbedtls_ecdh_compute_shared()
77 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( z, &P.X ) ); in mbedtls_ecdh_compute_shared()
80 mbedtls_ecp_point_free( &P ); in mbedtls_ecdh_compute_shared()
Dsha512.c217 #define P(a,b,c,d,e,f,g,h,x,K) \ in mbedtls_sha512_process() macro
247 P( A, B, C, D, E, F, G, H, W[i], K[i] ); i++; in mbedtls_sha512_process()
248 P( H, A, B, C, D, E, F, G, W[i], K[i] ); i++; in mbedtls_sha512_process()
249 P( G, H, A, B, C, D, E, F, W[i], K[i] ); i++; in mbedtls_sha512_process()
250 P( F, G, H, A, B, C, D, E, W[i], K[i] ); i++; in mbedtls_sha512_process()
251 P( E, F, G, H, A, B, C, D, W[i], K[i] ); i++; in mbedtls_sha512_process()
252 P( D, E, F, G, H, A, B, C, W[i], K[i] ); i++; in mbedtls_sha512_process()
253 P( C, D, E, F, G, H, A, B, W[i], K[i] ); i++; in mbedtls_sha512_process()
254 P( B, C, D, E, F, G, H, A, W[i], K[i] ); i++; in mbedtls_sha512_process()
Drsa.c119 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, 0, in mbedtls_rsa_gen_key()
125 if( mbedtls_mpi_cmp_mpi( &ctx->P, &ctx->Q ) == 0 ) in mbedtls_rsa_gen_key()
128 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->N, &ctx->P, &ctx->Q ) ); in mbedtls_rsa_gen_key()
132 if( mbedtls_mpi_cmp_mpi( &ctx->P, &ctx->Q ) < 0 ) in mbedtls_rsa_gen_key()
133 mbedtls_mpi_swap( &ctx->P, &ctx->Q ); in mbedtls_rsa_gen_key()
135 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); in mbedtls_rsa_gen_key()
151 MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->QP, &ctx->Q, &ctx->P ) ); in mbedtls_rsa_gen_key()
204 if( !ctx->P.p || !ctx->Q.p || !ctx->D.p ) in mbedtls_rsa_check_privkey()
212 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &PQ, &ctx->P, &ctx->Q ) ); in mbedtls_rsa_check_privkey()
214 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); in mbedtls_rsa_check_privkey()
[all …]
Decp_curves.c583 ecp_mpi_load( &grp->P, p, plen ); in ecp_group_load()
593 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_group_load()
619 #define NIST_MODP( P ) grp->modp = ecp_mod_ ## P; argument
621 #define NIST_MODP( P ) argument
666 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve25519()
667 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &grp->P, 255 ) ); in ecp_use_curve25519()
668 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) ); in ecp_use_curve25519()
669 grp->pbits = mbedtls_mpi_bitlen( &grp->P ); in ecp_use_curve25519()
/net-tools-3.5.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_ccm.data140 CCM encrypt and tag NIST VTT AES-128 #1 (P=24, N=13, A=32, T=4)
144 CCM encrypt and tag NIST VTT AES-128 #2 (P=24, N=13, A=32, T=6)
148 CCM encrypt and tag NIST VTT AES-128 #3 (P=24, N=13, A=32, T=8)
152 CCM encrypt and tag NIST VTT AES-128 #4 (P=24, N=13, A=32, T=10)
156 CCM encrypt and tag NIST VTT AES-128 #5 (P=24, N=13, A=32, T=12)
160 CCM encrypt and tag NIST VTT AES-128 #6 (P=24, N=13, A=32, T=14)
164 CCM encrypt and tag NIST VTT AES-128 #7 (P=24, N=13, A=32, T=16)
168 CCM encrypt and tag NIST VTT AES-192 #1 (P=24, N=13, A=32, T=4)
172 CCM encrypt and tag NIST VTT AES-192 #2 (P=24, N=13, A=32, T=6)
176 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.function35 mbedtls_ecp_point P;
38 mbedtls_ecp_point_init( &P );
42 TEST_ASSERT( mbedtls_mpi_read_string( &P.X, 16, key_hex ) == 0 );
43 TEST_ASSERT( mbedtls_mpi_lset( &P.Z, 1 ) == 0 );
45 TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &P ) == ret );
49 mbedtls_ecp_point_free( &P );
175 TEST_ASSERT( mbedtls_mpi_mod_mpi( &R, &N, &grp.P ) == 0 );
183 TEST_ASSERT( mbedtls_mpi_mod_mpi( &N, &N, &grp.P ) == 0 );
197 mbedtls_ecp_point P;
204 mbedtls_ecp_group_init( &grp ); mbedtls_ecp_point_init( &P );
[all …]
Dtest_suite_dhm.function39 TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.P, radix_P, input_P ) == 0 );
41 x_size = mbedtls_mpi_size( &ctx_srv.P );
103 mbedtls_mpi P, G;
106 mbedtls_mpi_init( &P ); mbedtls_mpi_init( &G );
108 TEST_ASSERT( mbedtls_mpi_read_string( &P, 16, p ) == 0 );
114 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &ctx.P, &P ) == 0 );
118 mbedtls_mpi_free( &P ); mbedtls_mpi_free( &G );
Dtest_suite_pkcs1_v15.function79 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
84 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
91 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
140 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
145 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
152 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
Dtest_suite_rsa.function43 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
48 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
55 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
140 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
145 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
152 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
339 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
344 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
351 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
447 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
[all …]
Dtest_suite_pkcs1_v21.function79 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
84 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
91 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
140 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.P, radix_P, input_P ) == 0 );
145 TEST_ASSERT( mbedtls_mpi_sub_int( &P1, &ctx.P, 1 ) == 0 );
152 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
/net-tools-3.5.0/mbedtls-2.4.0/programs/pkey/
Dmpi_demo.c51 mbedtls_mpi E, P, Q, N, H, D, X, Y, Z; in main() local
53 mbedtls_mpi_init( &E ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &N ); in main()
57 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P, 10, "2789" ) ); in main()
60 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &N, &P, &Q ) ); in main()
67 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " P = ", &P, 10, NULL ) ); in main()
71 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P, &P, 1 ) ); in main()
73 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P, &Q ) ); in main()
92 mbedtls_mpi_free( &E ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &N ); in main()
Ddh_genprime.c72 mbedtls_mpi G, P, Q; in main() local
81 mbedtls_mpi_init( &G ); mbedtls_mpi_init( &P ); mbedtls_mpi_init( &Q ); in main()
134 if( ( ret = mbedtls_mpi_gen_prime( &P, nbits, 1, in main()
144 if( ( ret = mbedtls_mpi_sub_int( &Q, &P, 1 ) ) != 0 ) in main()
172 if( ( ret = mbedtls_mpi_write_file( "P = ", &P, 16, fout ) != 0 ) || in main()
185 mbedtls_mpi_free( &G ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
Ddh_prime.txt1 P = FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404D…
Ddh_server.c130 ( ret = mbedtls_mpi_read_file( &rsa.P , 16, f ) ) != 0 || in main()
159 if( mbedtls_mpi_read_file( &dhm.P, 16, f ) != 0 || in main()
196 if( ( ret = mbedtls_dhm_make_params( &dhm, (int) mbedtls_mpi_size( &dhm.P ), buf, &n, in main()
Drsa_priv.txt4 P = CD083568D2D46C44C40C1FA0101AF2155E59C70B08423112AF0C1202514BBA5210765E29FF13036F56C7495894D80CF…
/net-tools-3.5.0/mbedtls-2.4.0/include/mbedtls/
Decp.h132 mbedtls_mpi P; /*!< prime modulus of the base field */ member
317 int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q );
361 int mbedtls_ecp_point_cmp( const mbedtls_ecp_point *P,
374 int mbedtls_ecp_point_read_string( mbedtls_ecp_point *P, int radix,
391 int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp, const mbedtls_ecp_point *P,
413 int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp, mbedtls_ecp_point *P,
522 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
546 const mbedtls_mpi *m, const mbedtls_ecp_point *P,
/net-tools-3.5.0/mbedtls-2.4.0/tests/data_files/
Dkeyfile.3des10 P/yWr5xZl3DrKh9r9EGb9xbTxhum3yHV7bvXLoUH+t9gowmd4Lq3Qjjf8jQXle0P

123