Home | History | Annotate | Download | only in bn

Lines Matching refs:bp

94 int test_add(BIO *bp);
95 int test_sub(BIO *bp);
96 int test_lshift1(BIO *bp);
97 int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_);
98 int test_rshift1(BIO *bp);
99 int test_rshift(BIO *bp,BN_CTX *ctx);
100 int test_div(BIO *bp,BN_CTX *ctx);
101 int test_div_word(BIO *bp);
102 int test_div_recp(BIO *bp,BN_CTX *ctx);
103 int test_mul(BIO *bp);
104 int test_sqr(BIO *bp,BN_CTX *ctx);
105 int test_mont(BIO *bp,BN_CTX *ctx);
106 int test_mod(BIO *bp,BN_CTX *ctx);
107 int test_mod_mul(BIO *bp,BN_CTX *ctx);
108 int test_mod_exp(BIO *bp,BN_CTX *ctx);
109 int test_mod_exp_mont_consttime(BIO *bp,BN_CTX *ctx);
110 int test_exp(BIO *bp,BN_CTX *ctx);
111 int test_gf2m_add(BIO *bp);
112 int test_gf2m_mod(BIO *bp);
113 int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx);
114 int test_gf2m_mod_sqr(BIO *bp,BN_CTX *ctx);
115 int test_gf2m_mod_inv(BIO *bp,BN_CTX *ctx);
116 int test_gf2m_mod_div(BIO *bp,BN_CTX *ctx);
117 int test_gf2m_mod_exp(BIO *bp,BN_CTX *ctx);
118 int test_gf2m_mod_sqrt(BIO *bp,BN_CTX *ctx);
119 int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx);
120 int test_kron(BIO *bp,BN_CTX *ctx);
121 int test_sqrt(BIO *bp,BN_CTX *ctx);
317 int test_add(BIO *bp)
333 if (bp != NULL)
337 BN_print(bp,&a);
338 BIO_puts(bp," + ");
339 BN_print(bp,&b);
340 BIO_puts(bp," - ");
342 BN_print(bp,&c);
343 BIO_puts(bp,"\n");
361 int test_sub(BIO *bp)
386 if (bp != NULL)
390 BN_print(bp,&a);
391 BIO_puts(bp," - ");
392 BN_print(bp,&b);
393 BIO_puts(bp," - ");
395 BN_print(bp,&c);
396 BIO_puts(bp,"\n");
412 int test_div(BIO *bp, BN_CTX *ctx)
437 if (bp != NULL)
441 BN_print(bp,&a);
442 BIO_puts(bp," / ");
443 BN_print(bp,&b);
444 BIO_puts(bp," - ");
446 BN_print(bp,&d);
447 BIO_puts(bp,"\n");
451 BN_print(bp,&a);
452 BIO_puts(bp," % ");
453 BN_print(bp,&b);
454 BIO_puts(bp," - ");
456 BN_print(bp,&c);
457 BIO_puts(bp,"\n");
476 static void print_word(BIO *bp,BN_ULONG w)
484 if (h) BIO_printf(bp,"%lX%08lX",h,l);
485 else BIO_printf(bp,"%lX",l);
489 BIO_printf(bp,BN_HEX_FMT1,w);
492 int test_div_word(BIO *bp)
512 if (bp != NULL)
516 BN_print(bp,&a);
517 BIO_puts(bp," / ");
518 print_word(bp,s);
519 BIO_puts(bp," - ");
521 BN_print(bp,&b);
522 BIO_puts(bp,"\n");
526 BN_print(bp,&a);
527 BIO_puts(bp," % ");
528 print_word(bp,s);
529 BIO_puts(bp," - ");
531 print_word(bp,r);
532 BIO_puts(bp,"\n");
548 int test_div_recp(BIO *bp, BN_CTX *ctx)
576 if (bp != NULL)
580 BN_print(bp,&a);
581 BIO_puts(bp," / ");
582 BN_print(bp,&b);
583 BIO_puts(bp," - ");
585 BN_print(bp,&d);
586 BIO_puts(bp,"\n");
590 BN_print(bp,&a);
591 BIO_puts(bp," % ");
592 BN_print(bp,&b);
593 BIO_puts(bp," - ");
595 BN_print(bp,&c);
596 BIO_puts(bp,"\n");
621 int test_mul(BIO *bp)
648 if (bp != NULL)
652 BN_print(bp,&a);
653 BIO_puts(bp," * ");
654 BN_print(bp,&b);
655 BIO_puts(bp," - ");
657 BN_print(bp,&c);
658 BIO_puts(bp,"\n");
677 int test_sqr(BIO *bp, BN_CTX *ctx)
692 if (bp != NULL)
696 BN_print(bp,&a);
697 BIO_puts(bp," * ");
698 BN_print(bp,&a);
699 BIO_puts(bp," - ");
701 BN_print(bp,&c);
702 BIO_puts(bp,"\n");
719 int test_mont(BIO *bp, BN_CTX *ctx)
757 if (bp != NULL)
767 BN_print(bp,&a);
768 BIO_puts(bp," * ");
769 BN_print(bp,&b);
770 BIO_puts(bp," % ");
771 BN_print(bp,&(mont->N));
772 BIO_puts(bp," - ");
774 BN_print(bp,&A);
775 BIO_puts(bp,"\n");
796 int test_mod(BIO *bp, BN_CTX *ctx)
814 if (bp != NULL)
818 BN_print(bp,a);
819 BIO_puts(bp," % ");
820 BN_print(bp,b);
821 BIO_puts(bp," - ");
823 BN_print(bp,c);
824 BIO_puts(bp,"\n");
842 int test_mod_mul(BIO *bp, BN_CTX *ctx)
870 if (bp != NULL)
874 BN_print(bp,a);
875 BIO_puts(bp," * ");
876 BN_print(bp,b);
877 BIO_puts(bp," % ");
878 BN_print(bp,c);
886 BIO_puts(bp," + ");
887 BN_print(bp,c);
889 BIO_puts(bp," - ");
891 BN_print(bp,e);
892 BIO_puts(bp,"\n");
913 int test_mod_exp(BIO *bp, BN_CTX *ctx)
933 if (bp != NULL)
937 BN_print(bp,a);
938 BIO_puts(bp," ^ ");
939 BN_print(bp,b);
940 BIO_puts(bp," % ");
941 BN_print(bp,c);
942 BIO_puts(bp," - ");
944 BN_print(bp,d);
945 BIO_puts(bp,"\n");
964 int test_mod_exp_mont_consttime(BIO *bp, BN_CTX *ctx)
984 if (bp != NULL)
988 BN_print(bp,a);
989 BIO_puts(bp," ^ ");
990 BN_print(bp,b);
991 BIO_puts(bp," % ");
992 BN_print(bp,c);
993 BIO_puts(bp," - ");
995 BN_print(bp,d);
996 BIO_puts(bp,"\n");
1015 int test_exp(BIO *bp, BN_CTX *ctx)
1035 if (bp != NULL)
1039 BN_print(bp,a);
1040 BIO_puts(bp," ^ ");
1041 BN_print(bp,b);
1042 BIO_puts(bp," - ");
1044 BN_print(bp,d);
1045 BIO_puts(bp,"\n");
1065 int test_gf2m_add(BIO *bp)
1082 if (bp != NULL)
1086 BN_print(bp,&a);
1087 BIO_puts(bp," ^ ");
1088 BN_print(bp,&b);
1089 BIO_puts(bp," = ");
1091 BN_print(bp,&c);
1092 BIO_puts(bp,"\n");
1117 int test_gf2m_mod(BIO *bp)
1141 if (bp != NULL)
1145 BN_print(bp,a);
1146 BIO_puts(bp," % ");
1147 BN_print(bp,b[j]);
1148 BIO_puts(bp," - ");
1149 BN_print(bp,c);
1150 BIO_puts(bp,"\n");
1175 int test_gf2m_mod_mul(BIO *bp,BN_CTX *ctx)
1204 if (bp != NULL)
1208 BN_print(bp,a);
1209 BIO_puts(bp," * ");
1210 BN_print(bp,c);
1211 BIO_puts(bp," % ");
1212 BN_print(bp,b[j]);
1213 BIO_puts(bp," - ");
1214 BN_print(bp,e);
1215 BIO_puts(bp,"\n");
1246 int test_gf2m_mod_sqr(BIO *bp,BN_CTX *ctx)
1271 if (bp != NULL)
1275 BN_print(bp,a);
1276 BIO_puts(bp," ^ 2 % ");
1277 BN_print(bp,b[j]);
1278 BIO_puts(bp, " = ");
1279 BN_print(bp,c);
1280 BIO_puts(bp,"; a * a = ");
1281 BN_print(bp,d);
1282 BIO_puts(bp,"\n");
1305 int test_gf2m_mod_inv(BIO *bp,BN_CTX *ctx)
1329 if (bp != NULL)
1333 BN_print(bp,a);
1334 BIO_puts(bp, " * ");
1335 BN_print(bp,c);
1336 BIO_puts(bp," - 1 % ");
1337 BN_print(bp,b[j]);
1338 BIO_puts(bp,"\n");
1360 int test_gf2m_mod_div(BIO *bp,BN_CTX *ctx)
1388 if (bp != NULL)
1392 BN_print(bp,a);
1393 BIO_puts(bp, " = ");
1394 BN_print(bp,c);
1395 BIO_puts(bp," * ");
1396 BN_print(bp,d);
1397 BIO_puts(bp, " % ");
1398 BN_print(bp,b[j]);
1399 BIO_puts(bp,"\n");
1423 int test_gf2m_mod_exp(BIO *bp,BN_CTX *ctx)
1454 if (bp != NULL)
1458 BN_print(bp,a);
1459 BIO_puts(bp, " ^ (");
1460 BN_print(bp,c);
1461 BIO_puts(bp," + ");
1462 BN_print(bp,d);
1463 BIO_puts(bp, ") = ");
1464 BN_print(bp,e);
1465 BIO_puts(bp, "; - ");
1466 BN_print(bp,f);
1467 BIO_puts(bp, " % ");
1468 BN_print(bp,b[j]);
1469 BIO_puts(bp,"\n");
1494 int test_gf2m_mod_sqrt(BIO *bp,BN_CTX *ctx)
1521 if (bp != NULL)
1525 BN_print(bp,d);
1526 BIO_puts(bp, " ^ 2 - ");
1527 BN_print(bp,a);
1528 BIO_puts(bp,"\n");
1553 int test_gf2m_mod_solve_quad(BIO *bp,BN_CTX *ctx)
1583 if (bp != NULL)
1587 BN_print(bp,c);
1588 BIO_puts(bp, " is root of z^2 + z = ");
1589 BN_print(bp,a);
1590 BIO_puts(bp, " % ");
1591 BN_print(bp,b[j]);
1592 BIO_puts(bp, "\n");
1608 if (bp != NULL)
1612 BIO_puts(bp, "There are no roots of z^2 + z = ");
1613 BN_print(bp,a);
1614 BIO_puts(bp, " % ");
1615 BN_print(bp,b[j]);
1616 BIO_puts(bp, "\n");
1653 int test_kron(BIO *bp, BN_CTX *ctx)
1744 int test_sqrt(BIO *bp, BN_CTX *ctx)
1822 int test_lshift(BIO *bp,BN_CTX *ctx,BIGNUM *a_)
1844 if (bp != NULL)
1848 BN_print(bp,a);
1849 BIO_puts(bp," * ");
1850 BN_print(bp,c);
1851 BIO_puts(bp," - ");
1853 BN_print(bp,b);
1854 BIO_puts(bp,"\n");
1880 int test_lshift1(BIO *bp)
1894 if (bp != NULL)
1898 BN_print(bp,a);
1899 BIO_puts(bp," * 2");
1900 BIO_puts(bp," - ");
1902 BN_print(bp,b);
1903 BIO_puts(bp,"\n");
1921 int test_rshift(BIO *bp,BN_CTX *ctx)
1939 if (bp != NULL)
1943 BN_print(bp,a);
1944 BIO_puts(bp," / ");
1945 BN_print(bp,c);
1946 BIO_puts(bp," - ");
1948 BN_print(bp,b);
1949 BIO_puts(bp,"\n");
1967 int test_rshift1(BIO *bp)
1981 if (bp != NULL)
1985 BN_print(bp,a);
1986 BIO_puts(bp," / 2");
1987 BIO_puts(bp," - ");
1989 BN_print(bp,b);
1990 BIO_puts(bp,"\n");