• Home
  • Raw
  • Download

Lines Matching refs:bnT

30230 1038       BIGNUM             *bnT;
30264 1067 bnT = BN_CTX_get(context);
30365 1163 BN_sub(bnT, bnQ, bnP);
30367 1165 BN_sub(bnT, bnP, bnQ);
30368 1166 if(BN_num_bits(bnT) < 100) // Difference has to be at least 100 bits
30419 1212 BN_sub(bnT, bnN, bnP);
30420 1213 BN_sub(bnT, bnT, bnQ);
30421 1214 BN_add_word(bnT, 1);
30427 1220 if(BN_mod_inverse(bnT, bnE, bnT, context) == NULL || BN_is_zero(bnT))
30459 1252 || BN_mod_exp(bnQ, bnQ, bnT, bnN, context) != 1)
31538 668 BIGNUM *bnT;
31565 695 bnT = BN_CTX_get(context);
31654 774 if( BN_sub(bnT, bnN, bnP) != 1
31655 775 || BN_sub(bnT, bnT, bnQ) != 1
31656 776 || BN_add_word(bnT, 1) != 1)
31663 783 if( BN_mod_inverse(bnT, bnE, bnT, context) == NULL
31664 784 || BN_is_zero(bnT))
31686 806 || BN_mod_exp(bnQ, bnQ, bnT, bnN, context) != 1)
34190 858 BIGNUM *bnN, *bnK, *bnT, *bnD;
34226 888 bnT = BN_CTX_get(context);
34237 899 || BN_bin2bn(tOut->t.buffer, tOut->t.size, bnT) == NULL)
34241 903 OK = OK && BN_mod(bnT, bnT, bnN, context);
34245 907 OK = OK && BN_mod_mul(bnD, bnT, bnD, bnN, context) == 1;
34251 913 OK = OK && BnTo2B(&tOut->b, bnT, n->size);
34299 937 BIGNUM *bnR, *bnN, *bnK, *bnT, *bnD;
34338 976 bnT = BN_CTX_get(context);
34397 1030 BnFrom2B(bnT, &T2b.b);
34398 1031 BN_div(NULL, bnT, bnT, bnN, context);
34399 1032 BnTo2B(&rOut->b, bnT, (UINT16)BN_num_bytes(bnT));
34509 1117 BIGNUM *bnT; // temp
34527 1135 bnT = BN_CTX_get(context);
34583 1186 if(!BN_add(bnT, bnK, bnR))
34586 1189 if(BN_is_zero(bnR) || BN_ucmp(bnT, bnN) == 0)
34591 1194 BN_copy(bnT, bnD);
34592 1195 if( !BN_add_word(bnT, 1)
34593 1196 || !BN_mod_inverse(bnT, bnT, bnN, context) // (1 + dA)^-1 mod n
34597 1200 pAssert(cmp_bn2hex(bnT,
34604 1207 || !BN_mod_mul(bnS, bnT, bnS, bnN, context))// t * (k - (r * dA) mod n
34966 1498 BIGNUM *bnT;
34986 1512 bnT = BN_CTX_get(context);
35003 1529 pAssert(EC_POINT_get_affine_coordinates_GFp(group, pQ, bnT, bnS, context));
35004 1530 pAssert(cmp_bn2hex(bnT,
35035 1561 if(!BN_mod_add(bnT, bnR, bnS, &group->order, context))
35038 1564 pAssert(cmp_bn2hex(bnT,
35044 1570 if(BN_is_zero(bnT)) {
35053 1574 BN_copy(bnT, bnS);
35056 1577 if(!EC_POINT_mul(group, pQ, bnS, pQ, bnT, context))
35059 1580 if(!EC_POINT_get_affine_coordinates_GFp(group, pQ, bnT, NULL, context))
35063 1584 pAssert(cmp_bn2hex(bnT,
35068 1589 // e) compute r' := (e + x) mod n (the x coordinate is in bnT)
35069 1590 if(!BN_mod_add(bnRp, bnE, bnT, &group->order, context))