Home
last modified time | relevance | path

Searched refs:Q (Results 1 – 25 of 56) sorted by relevance

123

/net-tools-3.4.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()
58 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &Q, 10, "3203" ) ); in main()
60 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &N, &P, &Q ) ); in main()
68 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " Q = ", &Q, 10, NULL ) ); in main()
72 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q, &Q, 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()
144 if( ( ret = mbedtls_mpi_sub_int( &Q, &P, 1 ) ) != 0 ) in main()
150 if( ( ret = mbedtls_mpi_div_int( &Q, NULL, &Q, 2 ) ) != 0 ) in main()
156 if( ( ret = mbedtls_mpi_is_prime( &Q, mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 ) in main()
185 mbedtls_mpi_free( &G ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); in main()
Dkey_app.c196 mbedtls_mpi_write_file( "Q: ", &rsa->Q, 16, NULL ); in main()
207 mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); in main()
208 mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); in main()
209 mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); in main()
251 mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); in main()
252 mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); in main()
253 mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); in main()
Dkey_app_writer.c307 mbedtls_mpi_write_file( "Q: ", &rsa->Q, 16, NULL ); in main()
318 mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); in main()
319 mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); in main()
320 mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); in main()
365 mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ); in main()
366 mbedtls_mpi_write_file( "Q(Y): ", &ecp->Q.Y, 16, NULL ); in main()
367 mbedtls_mpi_write_file( "Q(Z): ", &ecp->Q.Z, 16, NULL ); in main()
Decdh_curve25519.c97 ret = mbedtls_ecdh_gen_public( &ctx_cli.grp, &ctx_cli.d, &ctx_cli.Q, in main()
105 ret = mbedtls_mpi_write_binary( &ctx_cli.Q.X, cli_to_srv, 32 ); in main()
127 ret = mbedtls_ecdh_gen_public( &ctx_srv.grp, &ctx_srv.d, &ctx_srv.Q, in main()
135 ret = mbedtls_mpi_write_binary( &ctx_srv.Q.X, srv_to_cli, 32 ); in main()
Decdsa.c84 if( mbedtls_ecp_point_write_binary( &key->grp, &key->Q, in dump_pubkey()
192 if( ( ret = mbedtls_ecp_copy( &ctx_verify.Q, &ctx_sign.Q ) ) != 0 ) in main()
Drsa_priv.txt5 Q = CA0EEEA5E710E8E9811A6B846399420E3AE4A4C16647E426DDF8BBBCB11CD3F35CE2E4B6BCAD07AE2C0EC2ECBFCC601…
/net-tools-3.4.0/mbedtls-2.4.0/library/
Decdh.c44 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, in mbedtls_ecdh_gen_public() argument
48 return mbedtls_ecp_gen_keypair( grp, d, Q, f_rng, p_rng ); in mbedtls_ecdh_gen_public()
55 const mbedtls_ecp_point *Q, const mbedtls_mpi *d, in mbedtls_ecdh_compute_shared() argument
67 MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) ); 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()
102 mbedtls_ecp_point_free( &ctx->Q ); in mbedtls_ecdh_free()
129 if( ( ret = mbedtls_ecdh_gen_public( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ) in mbedtls_ecdh_make_params()
140 if( ( ret = mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, ctx->point_format, in mbedtls_ecdh_make_params()
183 return( mbedtls_ecp_copy( &ctx->Qp, &key->Q ) ); in mbedtls_ecdh_get_params()
189 if( ( ret = mbedtls_ecp_copy( &ctx->Q, &key->Q ) ) != 0 || in mbedtls_ecdh_get_params()
[all …]
Decp.c302 mbedtls_ecp_point_init( &key->Q ); in mbedtls_ecp_keypair_init()
357 mbedtls_ecp_point_free( &key->Q ); in mbedtls_ecp_keypair_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()
410 const mbedtls_ecp_point *Q ) 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()
[all …]
Decdsa.c201 const mbedtls_ecp_point *Q, const mbedtls_mpi *r, const mbedtls_mpi *s) in mbedtls_ecdsa_verify() argument
227 MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) ); in mbedtls_ecdsa_verify()
251 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, &R, &u1, &grp->G, &u2, Q ) ); in mbedtls_ecdsa_verify()
392 &ctx->Q, &r, &s ) ) != 0 ) in mbedtls_ecdsa_read_signature()
412 mbedtls_ecp_gen_keypair( &ctx->grp, &ctx->d, &ctx->Q, f_rng, p_rng ) ); in mbedtls_ecdsa_genkey()
424 ( ret = mbedtls_ecp_copy( &ctx->Q, &key->Q ) ) != 0 ) in mbedtls_ecdsa_from_keypair()
Drsa.c122 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, 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()
136 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 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()
215 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 1 ) ); in mbedtls_rsa_check_privkey()
[all …]
/net-tools-3.4.0/libcoap/src/
Dcoap_time.c40 #define Q(frac,fval) ((coap_tick_t)(((1 << (frac)) * (fval)))) macro
61 tmp = SHR_FP(tv.tv_nsec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000000.0)), FRAC); in coap_ticks()
73 tmp = SHR_FP(tv.tv_usec * Q(FRAC, (COAP_TICKS_PER_SECOND/1000000.0)), FRAC); in coap_ticks()
86 #undef Q
/net-tools-3.4.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_ecdsa.function14 mbedtls_ecp_point Q;
20 mbedtls_ecp_point_init( &Q );
28 TEST_ASSERT( mbedtls_ecp_gen_keypair( &grp, &d, &Q, &rnd_pseudo_rand, &rnd_info )
33 TEST_ASSERT( mbedtls_ecdsa_verify( &grp, buf, sizeof( buf ), &Q, &r, &s ) == 0 );
37 mbedtls_ecp_point_free( &Q );
48 mbedtls_ecp_point Q;
55 mbedtls_ecp_point_init( &Q );
62 TEST_ASSERT( mbedtls_ecp_point_read_string( &Q, 16, xQ_str, yQ_str ) == 0 );
88 TEST_ASSERT( mbedtls_ecdsa_verify( &grp, hash, hlen, &Q, &r_check, &s_check ) == 0 );
92 mbedtls_ecp_point_free( &Q );
Dtest_suite_pkcs1_v15.function80 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
85 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
91 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
141 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
146 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
152 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
Dtest_suite_rsa.function44 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
49 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
55 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
141 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
146 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
152 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
340 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
345 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
351 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
448 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
[all …]
Dtest_suite_pkcs1_v21.function80 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
85 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
91 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
141 TEST_ASSERT( mbedtls_mpi_read_string( &ctx.Q, radix_Q, input_Q ) == 0 );
146 TEST_ASSERT( mbedtls_mpi_sub_int( &Q1, &ctx.Q, 1 ) == 0 );
152 TEST_ASSERT( mbedtls_mpi_inv_mod( &ctx.QP, &ctx.Q, &ctx.P ) == 0 );
Dtest_suite_ecp.function445 TEST_ASSERT( mbedtls_ecp_point_read_string( &pub.Q, 16, Qx_pub, Qy_pub ) == 0 );
449 TEST_ASSERT( mbedtls_ecp_point_read_string( &prv.Q, 16, Qx, Qy ) == 0 );
464 mbedtls_ecp_point Q;
469 mbedtls_ecp_point_init( &Q );
475 TEST_ASSERT( mbedtls_ecp_gen_keypair( &grp, &d, &Q, &rnd_pseudo_rand, &rnd_info )
478 TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &Q ) == 0 );
483 mbedtls_ecp_point_free( &Q );
499 TEST_ASSERT( mbedtls_ecp_check_pubkey( &key.grp, &key.Q ) == 0 );
/net-tools-3.4.0/mbedtls-2.4.0/include/mbedtls/
Decp.h160 mbedtls_ecp_point Q; /*!< our public value */ member
317 int mbedtls_ecp_copy( mbedtls_ecp_point *P, const mbedtls_ecp_point *Q );
362 const mbedtls_ecp_point *Q );
547 const mbedtls_mpi *n, const mbedtls_ecp_point *Q );
606 mbedtls_mpi *d, mbedtls_ecp_point *Q,
626 int mbedtls_ecp_gen_keypair( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
Decdh.h48 mbedtls_ecp_point Q; /*!< our public value (public key) */ member
71 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q,
94 const mbedtls_ecp_point *Q, const mbedtls_mpi *d,
/net-tools-3.4.0/mbedtls-2.4.0/tests/data_files/
Dcrl.pem8 yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q
Dcrl_cat_rsa-ec.pem8 yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q
Dcrl_cat_rsabadpem-ec.pem8 yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q
Dcrl_cat_ec-rsa.pem18 yCOZJSIFomt7piT4GcgWVHLUmpyHDDeodNhYPrN0jf2mr+ECd9fQJYdz1qm0Xx+Q
/net-tools-3.4.0/mbedtls-2.4.0/tests/data_files/dir4/
Dcert31.crt7 xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q
Dcert61.crt7 xfhAD6eSupigTvov/w2IT8rS0dxo4KF6hKBL2aYlXhiEyi/NmsEPZWvVh+qk3L/Q

123