Lines Matching full:bignum
99 static int HexToBIGNUM(bssl::UniquePtr<BIGNUM> *out, const char *in) {
100 BIGNUM *raw = NULL;
106 static bssl::UniquePtr<BIGNUM> GetBIGNUM(FileTest *t, const char *attribute) {
112 bssl::UniquePtr<BIGNUM> ret;
121 bssl::UniquePtr<BIGNUM> ret = GetBIGNUM(t, attribute);
136 const BIGNUM *expected, const BIGNUM *actual) {
155 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
156 bssl::UniquePtr<BIGNUM> b = GetBIGNUM(t, "B");
157 bssl::UniquePtr<BIGNUM> sum = GetBIGNUM(t, "Sum");
162 bssl::UniquePtr<BIGNUM> ret(BN_new());
173 // Test that the functions work when |r| and |a| point to the same |BIGNUM|,
174 // or when |r| and |b| point to the same |BIGNUM|. TODO: Test the case where
175 // all of |r|, |a|, and |b| point to the same |BIGNUM|.
212 // Test that the functions work when |r| and |a| point to the same |BIGNUM|,
213 // or when |r| and |b| point to the same |BIGNUM|. TODO: Test the case where
214 // all of |r|, |a|, and |b| point to the same |BIGNUM|.
254 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
255 bssl::UniquePtr<BIGNUM> lshift1 = GetBIGNUM(t, "LShift1");
256 bssl::UniquePtr<BIGNUM> zero(BN_new());
263 bssl::UniquePtr<BIGNUM> ret(BN_new()), two(BN_new()), remainder(BN_new());
295 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
296 bssl::UniquePtr<BIGNUM> lshift = GetBIGNUM(t, "LShift");
302 bssl::UniquePtr<BIGNUM> ret(BN_new());
315 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
316 bssl::UniquePtr<BIGNUM> rshift = GetBIGNUM(t, "RShift");
322 bssl::UniquePtr<BIGNUM> ret(BN_new());
333 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
334 bssl::UniquePtr<BIGNUM> square = GetBIGNUM(t, "Square");
335 bssl::UniquePtr<BIGNUM> zero(BN_new());
342 bssl::UniquePtr<BIGNUM> ret(BN_new()), remainder(BN_new());
362 bssl::UniquePtr<BIGNUM> tmp(BN_new());
389 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
390 bssl::UniquePtr<BIGNUM> b = GetBIGNUM(t, "B");
391 bssl::UniquePtr<BIGNUM> product = GetBIGNUM(t, "Product");
392 bssl::UniquePtr<BIGNUM> zero(BN_new());
399 bssl::UniquePtr<BIGNUM> ret(BN_new()), remainder(BN_new());
416 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
417 bssl::UniquePtr<BIGNUM> b = GetBIGNUM(t, "B");
418 bssl::UniquePtr<BIGNUM> quotient = GetBIGNUM(t, "Quotient");
419 bssl::UniquePtr<BIGNUM> remainder = GetBIGNUM(t, "Remainder");
424 bssl::UniquePtr<BIGNUM> ret(BN_new()), ret2(BN_new());
465 bssl::UniquePtr<BIGNUM> nnmod(BN_new());
481 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
482 bssl::UniquePtr<BIGNUM> b = GetBIGNUM(t, "B");
483 bssl::UniquePtr<BIGNUM> m = GetBIGNUM(t, "M");
484 bssl::UniquePtr<BIGNUM> mod_mul = GetBIGNUM(t, "ModMul");
489 bssl::UniquePtr<BIGNUM> ret(BN_new());
499 bssl::UniquePtr<BIGNUM> a_tmp(BN_new()), b_tmp(BN_new());
519 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
520 bssl::UniquePtr<BIGNUM> m = GetBIGNUM(t, "M");
521 bssl::UniquePtr<BIGNUM> mod_square = GetBIGNUM(t, "ModSquare");
526 bssl::UniquePtr<BIGNUM> a_copy(BN_new());
527 bssl::UniquePtr<BIGNUM> ret(BN_new());
542 bssl::UniquePtr<BIGNUM> a_tmp(BN_new());
567 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
568 bssl::UniquePtr<BIGNUM> e = GetBIGNUM(t, "E");
569 bssl::UniquePtr<BIGNUM> m = GetBIGNUM(t, "M");
570 bssl::UniquePtr<BIGNUM> mod_exp = GetBIGNUM(t, "ModExp");
575 bssl::UniquePtr<BIGNUM> ret(BN_new());
598 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
599 bssl::UniquePtr<BIGNUM> e = GetBIGNUM(t, "E");
600 bssl::UniquePtr<BIGNUM> exp = GetBIGNUM(t, "Exp");
605 bssl::UniquePtr<BIGNUM> ret(BN_new());
616 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
617 bssl::UniquePtr<BIGNUM> p = GetBIGNUM(t, "P");
618 bssl::UniquePtr<BIGNUM> mod_sqrt = GetBIGNUM(t, "ModSqrt");
619 bssl::UniquePtr<BIGNUM> mod_sqrt2(BN_new());
631 bssl::UniquePtr<BIGNUM> ret(BN_new());
646 bssl::UniquePtr<BIGNUM> not_mod_square = GetBIGNUM(t, "NotModSquare");
647 bssl::UniquePtr<BIGNUM> p = GetBIGNUM(t, "P");
648 bssl::UniquePtr<BIGNUM> ret(BN_new());
669 bssl::UniquePtr<BIGNUM> a = GetBIGNUM(t, "A");
670 bssl::UniquePtr<BIGNUM> m = GetBIGNUM(t, "M");
671 bssl::UniquePtr<BIGNUM> mod_inv = GetBIGNUM(t, "ModInv");
676 bssl::UniquePtr<BIGNUM> ret(BN_new());
726 bssl::UniquePtr<BIGNUM> n(BN_new());
791 bssl::UniquePtr<BIGNUM> x(BN_new());
792 bssl::UniquePtr<BIGNUM> y(BN_new());
847 // Make sure the decoding produces the same BIGNUM.
866 static int DecimalToBIGNUM(bssl::UniquePtr<BIGNUM> *out, const char *in) {
867 BIGNUM *raw = NULL;
874 bssl::UniquePtr<BIGNUM> bn;
909 bssl::UniquePtr<BIGNUM> bn;
943 BIGNUM> ASCIIToBIGNUM(const char *in) {
944 BIGNUM *raw = NULL;
948 return bssl::UniquePtr<BIGNUM>(raw);
952 bssl::UniquePtr<BIGNUM> bn = ASCIIToBIGNUM("0");
1023 bssl::UniquePtr<BIGNUM> bn(ASCIIToBIGNUM(test.base10));
1049 bssl::UniquePtr<BIGNUM> bn2(BN_mpi2bn(scratch, mpi_len, NULL));
1065 bssl::UniquePtr<BIGNUM> bn(BN_new());
1150 bssl::UniquePtr<BIGNUM> bn = ASCIIToBIGNUM(test.value_ascii);
1156 bssl::UniquePtr<BIGNUM> bn2(BN_new());
1201 bssl::UniquePtr<BIGNUM> bn(BN_new());
1225 bssl::UniquePtr<BIGNUM> bn(BN_new());
1239 bssl::UniquePtr<BIGNUM> bn2 = ASCIIToBIGNUM(test.value_ascii);
1257 bssl::UniquePtr<BIGNUM> bn = ASCIIToBIGNUM("-1");
1273 bssl::UniquePtr<BIGNUM> a(BN_new());
1274 bssl::UniquePtr<BIGNUM> b(BN_new());
1275 bssl::UniquePtr<BIGNUM> c(BN_new());
1294 bssl::UniquePtr<BIGNUM> numerator(BN_new()), denominator(BN_new());
1380 bssl::UniquePtr<BIGNUM> a(BN_new());
1381 bssl::UniquePtr<BIGNUM> b(BN_new());
1382 bssl::UniquePtr<BIGNUM> zero(BN_new());
1467 bssl::UniquePtr<BIGNUM> zero(BN_new()), a(BN_new()), r(BN_new());
1494 bssl::UniquePtr<BIGNUM> r(BN_new());
1511 bssl::UniquePtr<BIGNUM> r(BN_new());
1593 bssl::UniquePtr<BIGNUM> bn;
1627 bssl::UniquePtr<BIGNUM> bn(BN_new()), expected;
1651 bssl::UniquePtr<BIGNUM> bn(BN_new());
1672 bssl::UniquePtr<BIGNUM>