Lines Matching refs:Z
13 mbedtls_mpi X, Y, Z;
17 mbedtls_mpi_init( &Z );
244 mbedtls_mpi A, X, Y, Z;
245 mbedtls_mpi_init( &A ); mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z );
250 TEST_ASSERT( mbedtls_mpi_gcd( &Z, &X, &Y ) == 0 );
251 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
254 mbedtls_mpi_free( &A ); mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z );
435 mbedtls_mpi X, Y, Z, A;
436 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
441 TEST_ASSERT( mbedtls_mpi_add_mpi( &Z, &X, &Y ) == 0 );
442 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
445 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
479 mbedtls_mpi X, Y, Z, A;
480 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
485 TEST_ASSERT( mbedtls_mpi_add_abs( &Z, &X, &Y ) == 0 );
486 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
489 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
533 mbedtls_mpi X, Z, A;
534 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
538 TEST_ASSERT( mbedtls_mpi_add_int( &Z, &X, input_Y ) == 0 );
539 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
542 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
550 mbedtls_mpi X, Y, Z, A;
551 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
556 TEST_ASSERT( mbedtls_mpi_sub_mpi( &Z, &X, &Y ) == 0 );
557 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
560 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
568 mbedtls_mpi X, Y, Z, A;
570 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
576 res = mbedtls_mpi_sub_abs( &Z, &X, &Y );
579 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
582 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
590 mbedtls_mpi X, Z, A;
591 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
595 TEST_ASSERT( mbedtls_mpi_sub_int( &Z, &X, input_Y ) == 0 );
596 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
599 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
607 mbedtls_mpi X, Y, Z, A;
608 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
613 TEST_ASSERT( mbedtls_mpi_mul_mpi( &Z, &X, &Y ) == 0 );
614 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
617 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
625 mbedtls_mpi X, Z, A;
626 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
630 TEST_ASSERT( mbedtls_mpi_mul_int( &Z, &X, input_Y ) == 0 );
632 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
634 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) != 0 );
639 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );
747 mbedtls_mpi A, E, N, RR, Z, X;
750 mbedtls_mpi_init( &RR ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &X );
760 res = mbedtls_mpi_exp_mod( &Z, &A, &E, &N, &RR );
764 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &X ) == 0 );
769 mbedtls_mpi_free( &RR ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &X );
777 mbedtls_mpi X, Y, Z, A;
779 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
784 res = mbedtls_mpi_inv_mod( &Z, &X, &Y );
788 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Z, &A ) == 0 );
792 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &Z ); mbedtls_mpi_free( &A );