Lines Matching refs:bnS
1241 BIGNUM *bnS; in SignSM2() local
1257 bnS = BN_CTX_get(context); in SignSM2()
1322 if( !BN_mod_mul(bnS, bnD, bnR, bnN, context) // (r * dA) mod n in SignSM2()
1323 || !BN_mod_sub(bnS, bnK, bnS, bnN, context) // (k - (r * dA) mod n in SignSM2()
1324 || !BN_mod_mul(bnS, bnT, bnS, bnN, context))// t * (k - (r * dA) mod n in SignSM2()
1327 pAssert(cmp_bn2hex(bnS, in SignSM2()
1331 if(BN_is_zero(bnS)) in SignSM2()
1337 BnTo2B(&sOut->b, bnS, curveData->n->size); in SignSM2()
1434 BIGNUM *bnS; in ValidateSignatureEcdsa() local
1459 bnS = BN_CTX_get(context); in ValidateSignatureEcdsa()
1486 || BN_bin2bn(sIn->t.buffer, sIn->t.size, bnS) == NULL in ValidateSignatureEcdsa()
1497 if (BN_mod_inverse(bnW, bnS, bnN, context) == NULL) in ValidateSignatureEcdsa()
1623 BIGNUM *bnS; in ValidateSignatureSM2Dsa() local
1638 bnS = BN_CTX_get(context); in ValidateSignatureSM2Dsa()
1653 pAssert(EC_POINT_get_affine_coordinates_GFp(group, pQ, bnT, bnS, context)); in ValidateSignatureSM2Dsa()
1657 pAssert(cmp_bn2hex(bnS, in ValidateSignatureSM2Dsa()
1662 BnFrom2B(bnS, &sIn->b); in ValidateSignatureSM2Dsa()
1674 fail = (BN_ucmp(bnS, order) >= 0) || fail; in ValidateSignatureSM2Dsa()
1681 if(!BN_mod_add(bnT, bnR, bnS, order, context)) in ValidateSignatureSM2Dsa()
1693 BN_copy(bnT, bnS); in ValidateSignatureSM2Dsa()
1696 if(!EC_POINT_mul(group, pQ, bnS, pQ, bnT, context)) in ValidateSignatureSM2Dsa()