Lines Matching refs:bnR

474     BIGNUM                    *bnY, *bnR, *bnD;  in _cpri__EccCommitCompute()  local
488 bnR = BN_CTX_get(context); in _cpri__EccCommitCompute()
506 BnFrom2B(bnR, &r->b); in _cpri__EccCommitCompute()
533 if((retVal = PointMul(group, pL, NULL, pB, bnR, context)) != CRYPT_SUCCESS) in _cpri__EccCommitCompute()
554 retVal = PointMul(group, pE, NULL, pM, bnR, context); in _cpri__EccCommitCompute()
558 retVal = PointMul(group, pE, bnR, NULL, NULL, context); in _cpri__EccCommitCompute()
804 BIGNUM *bnR; in SignEcdsa() local
820 bnR = BN_CTX_get(context); in SignEcdsa()
864 BN_bin2bn(R.x.t.buffer, R.x.t.size, bnR); in SignEcdsa()
865 BN_mod(bnR, bnR, bnN, context); in SignEcdsa()
867 if(BN_is_zero(bnR)) in SignEcdsa()
910 if( !BN_mod_mul(bnD, bnR, bnD, bnN, context) in SignEcdsa()
920 || !BnTo2B(&rOut->b, bnR, curveData->n->size)) in SignEcdsa()
1073 BIGNUM *bnR, *bnN, *bnK, *bnT, *bnD; in SchnorrEcc() local
1104 bnR = BN_CTX_get(context); in SchnorrEcc()
1137 EC_POINT_get_affine_coordinates_GFp(group, pR, bnR, NULL, context); in SchnorrEcc()
1139 BN_mod(bnR, bnR, bnN, context); in SchnorrEcc()
1141 if(BN_is_zero(bnR)) in SchnorrEcc()
1144 BnTo2B(&T2b.b, bnR, (UINT16)(BN_num_bits(bnR)+7)/8); in SchnorrEcc()
1243 BIGNUM *bnR; in SignSM2() local
1259 bnR = BN_CTX_get(context); in SignSM2()
1300 if(!BN_mod_add(bnR, bnE, bnX1, bnN, context)) in SignSM2()
1303 pAssert(cmp_bn2hex(bnR, in SignSM2()
1308 if(!BN_add(bnT, bnK, bnR)) in SignSM2()
1310 if(BN_is_zero(bnR) || BN_ucmp(bnT, bnN) == 0) in SignSM2()
1325 if( !BN_mod_mul(bnS, bnD, bnR, bnN, context) // (r * dA) mod n in SignSM2()
1339 BnTo2B(&rOut->b, bnR, curveData->n->size); in SignSM2()
1436 BIGNUM *bnR; in ValidateSignatureEcdsa() local
1461 bnR = BN_CTX_get(context); in ValidateSignatureEcdsa()
1488 || BN_bin2bn(rIn->t.buffer, rIn->t.size, bnR) == NULL in ValidateSignatureEcdsa()
1504 || !BN_mod_mul(bnU2, bnR, bnW, bnN, context)) in ValidateSignatureEcdsa()
1518 if(BN_cmp(bnV, bnR) == 0) in ValidateSignatureEcdsa()
1623 BIGNUM *bnR; in ValidateSignatureSM2Dsa() local
1637 bnR = BN_CTX_get(context); in ValidateSignatureSM2Dsa()
1664 BnFrom2B(bnR, &rIn->b); in ValidateSignatureSM2Dsa()
1676 fail = (BN_ucmp(bnR, order) >= 0); in ValidateSignatureSM2Dsa()
1684 if(!BN_mod_add(bnT, bnR, bnS, order, context)) in ValidateSignatureSM2Dsa()
1713 fail = BN_ucmp(bnR, bnRp) != 0 || fail; in ValidateSignatureSM2Dsa()