Home
last modified time | relevance | path

Searched refs:ipp_bn (Results 1 – 9 of 9) sorted by relevance

/external/epid-sdk/epid/common/math/src/
Dbignum.c73 bn->ipp_bn = ipp_bn_ctx; in NewBigNum()
89 SAFE_FREE((*bignum)->ipp_bn); in DeleteBigNum()
104 if (!bn->ipp_bn) return kEpidBadArgErr; in ReadBigNum()
127 sts = ippsSet_BN(IppsBigNumPOS, 1, &zero32, bn->ipp_bn); in ReadBigNum()
129 sts = ippsSetOctString_BN(bn_str, ipp_strlen, bn->ipp_bn); in ReadBigNum()
147 if (!bn->ipp_bn) return kEpidBadArgErr; in WriteBigNum()
149 sts = ippsGetOctString_BN((OctStr)bn_str, ipp_strlen, bn->ipp_bn); in WriteBigNum()
217 if (!r->ipp_bn || !a->ipp_bn || !b->ipp_bn) return kEpidBadArgErr; in BigNumAdd()
219 sts = ippsAdd_BN(a->ipp_bn, b->ipp_bn, r->ipp_bn); in BigNumAdd()
237 if (!r->ipp_bn || !a->ipp_bn || !b->ipp_bn) return kEpidBadArgErr; in BigNumSub()
[all …]
Decdsa_sign.c108 sts = ippsMod_BN(bn_hash->ipp_bn, bn_ec_order->ipp_bn, bn_hash->ipp_bn); in EcdsaSignBuffer()
122 sts = ippsCmpZero_BN(bn_reg_private->ipp_bn, &cmp0); in EcdsaSignBuffer()
124 sts = ippsCmp_BN(bn_reg_private->ipp_bn, bn_ec_order->ipp_bn, &cmp_order); in EcdsaSignBuffer()
166 sts = ippsECCPGenKeyPair(bn_eph_private->ipp_bn, ecp_eph_public, ec_ctx, in EcdsaSignBuffer()
171 sts = ippsECCPSetKeyPair(bn_eph_private->ipp_bn, ecp_eph_public, ippFalse, in EcdsaSignBuffer()
176 sts = ippsECCPSignDSA(bn_hash->ipp_bn, bn_reg_private->ipp_bn, in EcdsaSignBuffer()
177 bn_sig_x->ipp_bn, bn_sig_y->ipp_bn, ec_ctx); in EcdsaSignBuffer()
186 sts = ippsGetOctString_BN(sig->x.data, sizeof(sig->x), bn_sig_x->ipp_bn); in EcdsaSignBuffer()
188 sts = ippsGetOctString_BN(sig->y.data, sizeof(sig->y), bn_sig_y->ipp_bn); in EcdsaSignBuffer()
Decdsa_verify.c133 ipp_status = ippsECCPVerifyDSA(bn_digest->ipp_bn, bn_sig_x->ipp_bn, in EcdsaVerifyBuffer()
134 bn_sig_y->ipp_bn, &ec_result, ec_state); in EcdsaVerifyBuffer()
256 ippsECCPSetPoint(bn_pubkey_x->ipp_bn, bn_pubkey_y->ipp_bn, p, ec); in ReadCurvePoint()
302 ippsMod_BN(bn_digest->ipp_bn, bn_ec_order->ipp_bn, bn_digest->ipp_bn); in CalcHashBn()
338 ipp_status = ippsCmpZero_BN(bn_sig_x->ipp_bn, &sig_x_cmp0); in ValidateSignature()
340 ipp_status = ippsCmpZero_BN(bn_sig_y->ipp_bn, &sig_y_cmp0); in ValidateSignature()
343 ippsCmp_BN(bn_sig_x->ipp_bn, bn_ec_order->ipp_bn, &sig_x_cmp_order); in ValidateSignature()
346 ippsCmp_BN(bn_sig_y->ipp_bn, bn_ec_order->ipp_bn, &sig_y_cmp_order); in ValidateSignature()
Decgroup.c105 ipp_status = ippsRef_BN(&sgn, &order_bnu_size, &order_bnu, order->ipp_bn); in NewEcGroup()
113 ippsRef_BN(&sgn, &cofactor_bnu_size, &cofactor_bnu, cofactor->ipp_bn); in NewEcGroup()
127 order->ipp_bn, cofactor->ipp_bn, state); in NewEcGroup()
548 sts = ippsGFpECMulPoint(a->ipp_ec_pt, b_bn->ipp_bn, r->ipp_ec_pt, g->ipp_ec, in EcExp()
622 sts = ippsGFpECMulPoint(a[i]->ipp_ec_pt, b_bn->ipp_bn, ecp_t->ipp_ec_pt, in EcMultiExp()
682 if (!b[i]->ipp_bn) { in EcMultiExpBn()
707 sts = ippsGFpECMulPoint(a[i]->ipp_ec_pt, b[i]->ipp_bn, ecp_t->ipp_ec_pt, in EcMultiExpBn()
960 sts = ippsGFpECGetSubgroup(&ipp_ff, 0, 0, 0, h_bn->ipp_bn, g->ipp_ec); in Epid11EcHash()
1052 sts = ippsGFpECMulPoint(r->ipp_ec_pt, h_bn->ipp_bn, r->ipp_ec_pt, g->ipp_ec, in Epid11EcHash()
Dpairing.c225 sts = ippsSub_BN(Ffq->modulus_0->ipp_bn, one->ipp_bn, e->ipp_bn); in NewPairingState()
233 sts = ippsDiv_BN(e->ipp_bn, six->ipp_bn, e->ipp_bn, one->ipp_bn); in NewPairingState()
236 sts = ippsRef_BN(0, &bitSize, 0, e->ipp_bn); in NewPairingState()
245 sts = ippsGFpExp(xi->ipp_ff_elem, e->ipp_bn, in NewPairingState()
362 !ps->t->ipp_bn || !ps->ga || !ps->ga->ipp_ec || !ps->gb || in Pairing()
401 two->ipp_bn); in Pairing()
406 six->ipp_bn); in Pairing()
408 sts = ippsMul_BN(six->ipp_bn, ps->t->ipp_bn, s->ipp_bn); in Pairing()
411 sts = ippsSub_BN(s->ipp_bn, two->ipp_bn, s->ipp_bn); in Pairing()
414 sts = ippsAdd_BN(s->ipp_bn, two->ipp_bn, s->ipp_bn); in Pairing()
[all …]
Dbignum-internal.h40 IppsBigNumState* ipp_bn; member
Dfinitefield.c129 sts = ippsGFpInit(prime_bn->ipp_bn, bit_size, ippsGFpMethod_pArb(), in NewFiniteField()
507 sts = ippsCmp_BN(basic_ff->modulus_0->ipp_bn, pData->ipp_bn, &cmp_res); in IsValidFfElemOctString()
928 sts = ippsRef_BN(0, &exp_bit_size, 0, b->ipp_bn); in FfExp()
946 sts = ippsGFpExp(a->ipp_ff_elem, b->ipp_bn, r->ipp_ff_elem, ff->ipp_ff, in FfExp()
1034 ipp_b[i] = bignums[i]->ipp_bn; in FfMultiExp()
1105 if (!p[i] || !p[i]->ipp_ff_elem || !b[i] || !b[i]->ipp_bn) { in FfMultiExpBn()
1111 sts = ippsGetSize_BN(b[i]->ipp_bn, &b_size); in FfMultiExpBn()
1141 ipp_b[i] = b[i]->ipp_bn; in FfMultiExpBn()
Dprintutils.c102 if (!big_num->ipp_bn) { in PrintBigNum()
107 sts = ippsGetSize_BN(big_num->ipp_bn, &ipp_word_buf_size); in PrintBigNum()
121 big_num->ipp_bn); in PrintBigNum()
Dtatepairing.c198 sts = ippsGFpECGetSubgroup(NULL, NULL, NULL, p->ipp_bn, NULL, ga->ipp_ec); in NewEpid11PairingState()
202 sizeof(pairing_state_ctx->p), p->ipp_bn); in NewEpid11PairingState()