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