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()
599 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in _cpri__EccIsPointOnCurve() local
601 pAssert(Q != NULL && curveData != NULL); in _cpri__EccIsPointOnCurve()
616 || !BN_bin2bn(curveData->p->buffer, curveData->p->size, bnP) in _cpri__EccIsPointOnCurve()
617 || !BN_bin2bn(curveData->a->buffer, curveData->a->size, bnA) in _cpri__EccIsPointOnCurve()
619 || !BN_bin2bn(curveData->b->buffer, curveData->b->size, bnB) in _cpri__EccIsPointOnCurve()
676 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in _cpri__GenerateKeyEcc() local
689 pAssert( seed != NULL && dOut != NULL && Qout != NULL && curveData != NULL); in _cpri__GenerateKeyEcc()
702 pAssert((int) curveData->n->size <= MAX_ECC_KEY_BYTES); in _cpri__GenerateKeyEcc()
704 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnNm1) == NULL in _cpri__GenerateKeyEcc()
764 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in _cpri__GetEphemeralEcc() local
765 pAssert(curveData != NULL); in _cpri__GetEphemeralEcc()
771 GetRandomPrivate(dOut, curveData->p); in _cpri__GetEphemeralEcc()
809 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SignEcdsa() local
823 pAssert(curveData->n->size <= MAX_ECC_PARAMETER_BYTES); in SignEcdsa()
825 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in SignEcdsa()
841 k.t.size = curveData->n->size; in SignEcdsa()
850 GetRandomPrivate(&k, curveData->n); in SignEcdsa()
877 if(digest->size > curveData->n->size) in SignEcdsa()
881 pAssert(curveData->n->size <= MAX_ECC_KEY_BYTES); in SignEcdsa()
883 BN_bin2bn(digest->buffer, curveData->n->size, bnZ); in SignEcdsa()
913 || !BnTo2B(&sOut->b, bnD, curveData->n->size) in SignEcdsa()
917 || !BnTo2B(&rOut->b, bnR, curveData->n->size)) in SignEcdsa()
958 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in EcDaa() local
962 && kIn != NULL && curveData != NULL); in EcDaa()
964 n = curveData->n; in EcDaa()
1077 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SchnorrEcc() local
1085 && digest != NULL && curveData != NULL); in SchnorrEcc()
1087 n = curveData->n; in SchnorrEcc()
1113 if(BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in SchnorrEcc()
1251 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SignSM2() local
1252 pAssert(curveData != NULL); in SignSM2()
1266 BnFrom2B(bnN, curveData->n); in SignSM2()
1274 k.t.size = curveData->n->size; in SignSM2()
1336 BnTo2B(&rOut->b, bnR, curveData->n->size); in SignSM2()
1337 BnTo2B(&sOut->b, bnS, curveData->n->size); in SignSM2()
1443 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in ValidateSignatureEcdsa() local
1445 pAssert (curveData != NULL); in ValidateSignatureEcdsa()
1446 n = curveData->n; in ValidateSignatureEcdsa()
1488 || BN_bin2bn(curveData->n->buffer, curveData->n->size, bnN) == NULL) in ValidateSignatureEcdsa()
1556 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in ValidateSignatureEcSchnorr() local
1558 pAssert(curveData != NULL); in ValidateSignatureEcSchnorr()
1563 n = curveData->n; in ValidateSignatureEcSchnorr()
1629 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in ValidateSignatureSM2Dsa() local
1632 if((context = BN_CTX_new()) == NULL || curveData == NULL) in ValidateSignatureSM2Dsa()
1836 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in C_2_2_MQV() local
1838 pAssert( curveData != NULL && outZ != NULL && dsA != NULL in C_2_2_MQV()
1841 if(context == NULL || curveData == NULL) in C_2_2_MQV()
1865 BnFrom2B(bnH, curveData->h); in C_2_2_MQV()
1866 BnFrom2B(bnN, curveData->n); in C_2_2_MQV()
1982 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in SM2KeyExchange() local
1984 pAssert( curveData != NULL && outZ != NULL && dsA != NULL in SM2KeyExchange()
1987 if(context == NULL || curveData == NULL) in SM2KeyExchange()
2006 BnFrom2B(bnH, curveData->h); in SM2KeyExchange()
2007 BnFrom2B(bnN, curveData->n); in SM2KeyExchange()
2085 const ECC_CURVE_DATA *curveData = GetCurveData(curveId); in C_2_2_ECDH() local
2087 if(context == NULL || curveData == NULL) in C_2_2_ECDH()