Home | History | Annotate | Download | only in tpm2

Lines Matching refs:bnT

958    BIGNUM                           *bnN, *bnK, *bnT, *bnD;
984 bnT = BN_CTX_get(context);
993 || BN_bin2bn(tOut->t.buffer, tOut->t.size, bnT) == NULL)
996 OK = OK && BN_mod(bnT, bnT, bnN, context);
999 OK = OK && BN_mod_mul(bnD, bnT, bnD, bnN, context) == 1;
1005 OK = OK && BnTo2B(&tOut->b, bnT, n->size);
1073 BIGNUM *bnR, *bnN, *bnK, *bnT, *bnD;
1107 bnT = BN_CTX_get(context);
1152 BnFrom2B(bnT, &T2b.b);
1153 BN_div(NULL, bnT, bnT, bnN, context);
1154 BnTo2B(&rOut->b, bnT, (UINT16)BN_num_bytes(bnT));
1249 BIGNUM *bnT; // temp
1264 bnT = BN_CTX_get(context);
1308 if(!BN_add(bnT, bnK, bnR))
1310 if(BN_is_zero(bnR) || BN_ucmp(bnT, bnN) == 0)
1314 BN_copy(bnT, bnD);
1315 if( !BN_add_word(bnT, 1)
1316 || !BN_mod_inverse(bnT, bnT, bnN, context) // (1 + dA)^-1 mod n
1320 pAssert(cmp_bn2hex(bnT,
1327 || !BN_mod_mul(bnS, bnT, bnS, bnN, context))// t * (k - (r * dA) mod n
1625 BIGNUM *bnT;
1640 bnT = BN_CTX_get(context);
1656 pAssert(EC_POINT_get_affine_coordinates_GFp(group, pQ, bnT, bnS, context));
1657 pAssert(cmp_bn2hex(bnT,
1684 if(!BN_mod_add(bnT, bnR, bnS, order, context))
1687 pAssert(cmp_bn2hex(bnT,
1692 if(BN_is_zero(bnT)) {
1696 BN_copy(bnT, bnS);
1699 if(!EC_POINT_mul(group, pQ, bnS, pQ, bnT, context))
1702 if(!EC_POINT_get_affine_coordinates_GFp(group, pQ, bnT, NULL, context))
1705 bnT,
1709 // e) compute r' := (e + x) mod n (the x coordinate is in bnT)
1710 if(!BN_mod_add(bnRp, bnE, bnT, order, context))