Lines Matching refs:A

244     mbedtls_mpi A, X, Y, Z;
245 mbedtls_mpi_init( &A ); mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z );
249 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
307 mbedtls_mpi X, Y, A;
308 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A );
312 TEST_ASSERT( mbedtls_mpi_lset( &A, input_A ) == 0 );
314 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) == 0 );
317 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) != 0 );
320 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A );
414 mbedtls_mpi X, Y, A;
415 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A );
419 TEST_ASSERT( mbedtls_mpi_lset( &A, input_X ) == 0 );
421 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
424 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) == 0 );
427 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A );
435 mbedtls_mpi X, Y, Z, A;
436 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
440 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
452 mbedtls_mpi X, A;
453 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &A );
455 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
463 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
467 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
470 mbedtls_mpi_free( &X ); 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 );
484 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
497 mbedtls_mpi X, Y, A;
498 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A );
502 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
504 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
507 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A );
515 mbedtls_mpi X, Y, A;
516 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A );
520 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
522 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Y, &A ) == 0 );
525 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A );
533 mbedtls_mpi X, Z, A;
534 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
537 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
555 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
574 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
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 );
594 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
612 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
629 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 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 );
648 mbedtls_mpi X, Y, Q, R, A, B;
651 mbedtls_mpi_init( &A ); mbedtls_mpi_init( &B );
655 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
661 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Q, &A ) == 0 );
667 mbedtls_mpi_free( &A ); mbedtls_mpi_free( &B );
675 mbedtls_mpi X, Q, R, A, B;
677 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Q ); mbedtls_mpi_init( &R ); mbedtls_mpi_init( &A );
681 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
687 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &Q, &A ) == 0 );
692 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &R ); mbedtls_mpi_free( &A );
701 mbedtls_mpi X, Y, A;
703 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &A );
707 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
712 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
716 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &A );
747 mbedtls_mpi A, E, N, RR, Z, X;
749 mbedtls_mpi_init( &A ); mbedtls_mpi_init( &E ); mbedtls_mpi_init( &N );
752 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
760 res = mbedtls_mpi_exp_mod( &Z, &A, &E, &N, &RR );
768 mbedtls_mpi_free( &A ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &N );
777 mbedtls_mpi X, Y, Z, A;
779 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &Z ); mbedtls_mpi_init( &A );
783 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
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 );
847 mbedtls_mpi X, A;
848 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &A );
851 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
853 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
856 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &A );
864 mbedtls_mpi X, A;
865 mbedtls_mpi_init( &X ); mbedtls_mpi_init( &A );
868 TEST_ASSERT( mbedtls_mpi_read_string( &A, radix_A, input_A ) == 0 );
870 TEST_ASSERT( mbedtls_mpi_cmp_mpi( &X, &A ) == 0 );
873 mbedtls_mpi_free( &X ); mbedtls_mpi_free( &A );