Lines Matching refs:curveData
93 return curve->curveData; in GetCurveData()
147 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in EccCurveInit() local
160 pAssert(groupContext != NULL && curveData != NULL); in EccCurveInit()
175 BnFrom2B(bnP, curveData->p); in EccCurveInit()
176 BnFrom2B(bnA, curveData->a); in EccCurveInit()
177 BnFrom2B(bnB, curveData->b); in EccCurveInit()
178 BnFrom2B(bnX, curveData->x); in EccCurveInit()
179 BnFrom2B(bnY, curveData->y); in EccCurveInit()
180 BnFrom2B(bnN, curveData->n); in EccCurveInit()
181 BnFrom2B(bnH, curveData->h); in EccCurveInit()
602 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in _cpri__EccIsPointOnCurve() local
604 pAssert(Q != NULL && curveData != NULL); in _cpri__EccIsPointOnCurve()
619 || !BN_bin2bn(curveData->p->buffer, curveData->p->size, bnP) in _cpri__EccIsPointOnCurve()
620 || !BN_bin2bn(curveData->a->buffer, curveData->a->size, bnA) in _cpri__EccIsPointOnCurve()
622 || !BN_bin2bn(curveData->b->buffer, curveData->b->size, bnB) in _cpri__EccIsPointOnCurve()
679 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in _cpri__GenerateKeyEcc() local
692 pAssert( seed != NULL && dOut != NULL && Qout != NULL && curveData != NULL); in _cpri__GenerateKeyEcc()
705 pAssert((int) curveData->n->size <= MAX_ECC_KEY_BYTES); in _cpri__GenerateKeyEcc()
707 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnNm1) == NULL in _cpri__GenerateKeyEcc()
767 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in _cpri__GetEphemeralEcc() local
768 pAssert(curveData != NULL); in _cpri__GetEphemeralEcc()
774 GetRandomPrivate(dOut, curveData->p); in _cpri__GetEphemeralEcc()
812 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SignEcdsa() local
826 pAssert(curveData->n->size <= MAX_ECC_PARAMETER_BYTES); in SignEcdsa()
828 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in SignEcdsa()
844 k.t.size = curveData->n->size; in SignEcdsa()
853 GetRandomPrivate(&k, curveData->n); in SignEcdsa()
880 if(digest->size > curveData->n->size) in SignEcdsa()
884 pAssert(curveData->n->size <= MAX_ECC_KEY_BYTES); in SignEcdsa()
886 BN_bin2bn(digest->buffer, curveData->n->size, bnZ); in SignEcdsa()
916 || !BnTo2B(&sOut->b, bnD, curveData->n->size) in SignEcdsa()
920 || !BnTo2B(&rOut->b, bnR, curveData->n->size)) in SignEcdsa()
961 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in EcDaa() local
965 && kIn != NULL && curveData != NULL); in EcDaa()
967 n = curveData->n; in EcDaa()
1080 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SchnorrEcc() local
1088 && digest != NULL && curveData != NULL); in SchnorrEcc()
1090 n = curveData->n; in SchnorrEcc()
1116 if(BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in SchnorrEcc()
1254 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SignSM2() local
1255 pAssert(curveData != NULL); in SignSM2()
1269 BnFrom2B(bnN, curveData->n); in SignSM2()
1277 k.t.size = curveData->n->size; in SignSM2()
1339 BnTo2B(&rOut->b, bnR, curveData->n->size); in SignSM2()
1340 BnTo2B(&sOut->b, bnS, curveData->n->size); in SignSM2()
1446 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in ValidateSignatureEcdsa() local
1448 pAssert (curveData != NULL); in ValidateSignatureEcdsa()
1449 n = curveData->n; in ValidateSignatureEcdsa()
1491 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in ValidateSignatureEcdsa()
1559 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in ValidateSignatureEcSchnorr() local
1561 pAssert(curveData != NULL); in ValidateSignatureEcSchnorr()
1566 n = curveData->n; in ValidateSignatureEcSchnorr()
1632 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in ValidateSignatureSM2Dsa() local
1635 if((context = BN_CTX_new()) == NULL || curveData == NULL) in ValidateSignatureSM2Dsa()
1839 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in C_2_2_MQV() local
1841 pAssert( curveData != NULL && outZ != NULL && dsA != NULL in C_2_2_MQV()
1844 if(context == NULL || curveData == NULL) in C_2_2_MQV()
1868 BnFrom2B(bnH, curveData->h); in C_2_2_MQV()
1869 BnFrom2B(bnN, curveData->n); in C_2_2_MQV()
1985 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SM2KeyExchange() local
1987 pAssert( curveData != NULL && outZ != NULL && dsA != NULL in SM2KeyExchange()
1990 if(context == NULL || curveData == NULL) in SM2KeyExchange()
2009 BnFrom2B(bnH, curveData->h); in SM2KeyExchange()
2010 BnFrom2B(bnN, curveData->n); in SM2KeyExchange()
2088 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in C_2_2_ECDH() local
2090 if(context == NULL || curveData == NULL) in C_2_2_ECDH()