Home
last modified time | relevance | path

Searched refs:LEN_ID_N_BITS (Results 1 – 18 of 18) sorted by relevance

/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_wrst/
Dpka_ec_wrst.c36 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, z, ECC_REG_T4, z1); in PkaDoubleMdf2Mdf()
37 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, y, y1, y1); in PkaDoubleMdf2Mdf()
40 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, ECC_REG_T4, y, ECC_REG_T4); in PkaDoubleMdf2Mdf()
41 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, ECC_REG_T2, x1, x1); in PkaDoubleMdf2Mdf()
46 PKA_MOD_MUL_ACC_NFR(LEN_ID_N_BITS, x, ECC_REG_T2, ECC_REG_T2, ECC_REG_T4); in PkaDoubleMdf2Mdf()
51 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, y, y, y); in PkaDoubleMdf2Mdf()
54 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, ECC_REG_T4, ECC_REG_T4, t1); in PkaDoubleMdf2Mdf()
56 PKA_MOD_MUL_ACC_NFR(LEN_ID_N_BITS, y, ECC_REG_T3, ECC_REG_T2, y); in PkaDoubleMdf2Mdf()
72 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, z, ECC_REG_T, z1); in PkaDoubleMdf2Jcb()
73 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, y, y1, y1); in PkaDoubleMdf2Jcb()
[all …]
Dpka_ec_wrst_smul_scap.c39 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, z, t, z1); in DoubleMdf2Mdf()
40 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, y, y1, y1); in DoubleMdf2Mdf()
43 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, t, y, t); in DoubleMdf2Mdf()
44 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, ECC_REG_T2, x1, x1); in DoubleMdf2Mdf()
49 PKA_MOD_MUL_ACC_NFR(LEN_ID_N_BITS, x, ECC_REG_T2, ECC_REG_T2, t); in DoubleMdf2Mdf()
54 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, y, y, y); in DoubleMdf2Mdf()
57 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, t, t, t1); in DoubleMdf2Mdf()
59 PKA_MOD_MUL_ACC_NFR(LEN_ID_N_BITS, y, ECC_REG_T3, ECC_REG_T2, y); in DoubleMdf2Mdf()
76 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, t, z2, z2); in PkaAddJcbJcb2Mdf()
77 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, x, x1, t); in PkaAddJcbJcb2Mdf()
[all …]
Dec_wrst.c75 PKA_MOD_MUL(LEN_ID_N_BITS, PKA_REG_T/*Res*/, PKA_REG_X/*OpA*/, PKA_REG_X/*OpB*/); in EcWrstInitPubKey()
77 PKA_MOD_MUL(LEN_ID_N_BITS, PKA_REG_T/*Res*/, PKA_REG_X/*OpA*/, PKA_REG_T/*OpB*/); in EcWrstInitPubKey()
84 PKA_MOD_MUL(LEN_ID_N_BITS, PKA_REG_T, PKA_REG_Y, PKA_REG_Y); in EcWrstInitPubKey()
Dpka_ec_wrst_dsa_verify.c81 …PKA_MOD_MUL(LEN_ID_N_BITS, EC_VERIFY_REG_H1/*Res*/, EC_VERIFY_REG_F/*OpA*/, EC_VERIFY_REG_H/*OpB*/… in PkaEcdsaVerify()
83 …PKA_MOD_MUL(LEN_ID_N_BITS, EC_VERIFY_REG_H2/*Res*/, EC_VERIFY_REG_C/*OpA*/, EC_VERIFY_REG_H/*OpB*/… in PkaEcdsaVerify()
Dec_wrst_dsa.c117 PKA_MOD_MUL(LEN_ID_N_BITS, rD, rK, rC); in CalcSignature()
118 PKA_REDUCE(LEN_ID_N_BITS,rM, rM); in CalcSignature()
120 PKA_MOD_MUL(LEN_ID_N_BITS, rD, rD, rKinv); in CalcSignature()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_edw/
Dpka_ec_edw.c52 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EDW_REG_T5, EDW_REG_T3, EDW_REG_T4); in PkaEcEdwAddExtExtExt()
55 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EDW_REG_T6, EDW_REG_T3, EDW_REG_T4); in PkaEcEdwAddExtExtExt()
56 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EDW_REG_T3, rT1, rT2); in PkaEcEdwAddExtExtExt()
57 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EDW_REG_T3, EDW_REG_T3, EDW_REG_D2); in PkaEcEdwAddExtExtExt()
59 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EDW_REG_T4, EDW_REG_T4, rZ2); in PkaEcEdwAddExtExtExt()
66 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rX, rT, EDW_REG_T5); in PkaEcEdwAddExtExtExt()
67 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rY, EDW_REG_T4, EDW_REG_T6); in PkaEcEdwAddExtExtExt()
68 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rZ, EDW_REG_T5, EDW_REG_T4); in PkaEcEdwAddExtExtExt()
69 PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rT, rT, EDW_REG_T6); in PkaEcEdwAddExtExtExt()
84 … PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EDW_REG_T5, EDW_REG_T3, EDW_REG_T3); // hwmmul(t5, t3, t3, n, np); in PkaEcEdwDoublExtExt()
[all …]
Dec_edw.c546 PKA_MOD_MUL(LEN_ID_N_BITS, EDW_REG_SIGN/*res*/, EDW_REG_INTEGR, EDW_REG_USER_PRIV); in EcEdwSign()
547 PKA_MOD_ADD(LEN_ID_N_BITS, EDW_REG_SIGN/*res*/, EDW_REG_SIGN, EDW_REG_EPH_PRIV); in EcEdwSign()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/common/
Dpki_modular_arithmetic.c143 PKA_MOD_EXP(LEN_ID_N_BITS, PKA_REG_Y1, PKA_REG_Y2, PKA_REG_T); in PkiIsModSquareRootExists()
153 …PKA_MOD_EXP(LEN_ID_N_BITS, PKA_REG_T, PKA_REG_Y2, PKA_REG_Z); /* d = PKA_REG_T = PKA_REG_Y2^((PK… in PkiIsModSquareRootExists()
158 PKA_MOD_EXP(LEN_ID_N_BITS, PKA_REG_Y1, PKA_REG_Y2, PKA_REG_T); in PkiIsModSquareRootExists()
166 PKA_MOD_EXP(LEN_ID_N_BITS, PKA_REG_Z, PKA_REG_YT, PKA_REG_T); in PkiIsModSquareRootExists()
168 …PKA_MOD_MUL(LEN_ID_N_BITS, PKA_REG_Y1, PKA_REG_Z, PKA_REG_YT); /* PKA_REG_Y1 = 2*PKA_REG_Y2*(4rY… in PkiIsModSquareRootExists()
219 PKA_MOD_EXP(LEN_ID_N_BITS, PKA_REG_Z, PKA_REG_Z, PKA_REG_Y1); /* */ in PkiIsModSquareRootExists()
222 …PKA_MOD_EXP(LEN_ID_N_BITS, PKA_REG_Y1, PKA_REG_Y2, PKA_REG_Y1); /* PKA_REG_Y1 = PKA_REG_Y2^PKA_RE… in PkiIsModSquareRootExists()
224 PKA_MOD_INV(LEN_ID_N_BITS, PKA_REG_T, PKA_REG_YT); in PkiIsModSquareRootExists()
226 … PKA_MOD_MUL(LEN_ID_N_BITS, PKA_REG_YT, PKA_REG_Y1, PKA_REG_Y1); /* PKA_REG_YT = PKA_REG_Y1^2 */ in PkiIsModSquareRootExists()
227 …PKA_MOD_MUL(LEN_ID_N_BITS, PKA_REG_YT, PKA_REG_YT, PKA_REG_T); /* PKA_REG_YT = PKA_REG_YT * PKA… in PkiIsModSquareRootExists()
[all …]
Dpki.c74 … err = PkaCalcNpIntoPkaReg(LEN_ID_N_BITS, sizeNbits, rN /* regN */, rNp /* regNp */, rT2, rT4); in PkiCalcNp()
440 err = PkaCalcNpIntoPkaReg(LEN_ID_N_BITS, in PkiExecModExpBe()
456 PKA_MOD_EXP(LEN_ID_N_BITS/*LenID*/, OUT_REG, IN_REG/*OpA*/, EXP_REG/*OpB*/); in PkiExecModExpBe()
517 err = PkaCalcNpIntoPkaReg(LEN_ID_N_BITS, in PkiExecModExpLeW()
531 PKA_MOD_EXP(LEN_ID_N_BITS/*LenID*/, OUT_REG, IN_REG/*OpA*/, EXP_REG/*OpB*/); in PkiExecModExpLeW()
Dpka.c987 PKA_REDUCE(LEN_ID_N_BITS, reg1, regTmp1); in PkaIsRegModEqual()
988 PKA_REDUCE(LEN_ID_N_BITS, reg2, regTmp2); in PkaIsRegModEqual()
1086 PKA_GET_REG_SIZE(ModSizeBits, LEN_ID_N_BITS); in PkaExecFullModInv()
1094 PKA_MOD_INV(LEN_ID_N_BITS, Res, OpB); in PkaExecFullModInv()
1114 PKA_MOD_INV(LEN_ID_N_BITS/*LenID*/, Res, rT1/*mod N*/); in PkaExecFullModInv()
1122 PKA_MUL_HIGH(LEN_ID_N_BITS, rT0/*Result*/, N, Res); in PkaExecFullModInv()
1128 PKA_MUL_LOW(LEN_ID_N_BITS, rT2/*Result*/, N, Res); in PkaExecFullModInv()
1131 error = PkaDivLongNum(LEN_ID_N_BITS, /*LenID of exact size*/ in PkaExecFullModInv()
Dpka_defs.h52 LEN_ID_N_BITS = 0, // 0 - for modulus size (RSA, EC) enumerator
Dpka.h223 PKA_MOD_EXP(LEN_ID_N_BITS,(res),(a),(nm2)); \
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/ec_mont/
Dpka_ec_mont.c98 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rZ3, EC_MONT_REG_T, rX2); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
99 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rZ2, EC_MONT_REG_T1, rZ2); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
100 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EC_MONT_REG_T, EC_MONT_REG_T1, EC_MONT_REG_T1); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
101 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, EC_MONT_REG_T1, rX2, rX2); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
105 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rX2, EC_MONT_REG_T1, EC_MONT_REG_T); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
108 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rZ2, rZ2, rZ2); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
109 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rX3, rX3, rX3); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
110 PKA_MOD_MUL_ACC_NFR(LEN_ID_N_BITS, EC_MONT_REG_T, EC_MONT_REG_A24, in EcMontPkaScalarMultWithLadderExe()
112 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rZ3, EC_MONT_REG_X1, rZ2); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
113 …PKA_MOD_MUL_NFR(LEN_ID_N_BITS, rZ2, EC_MONT_REG_T1, EC_MONT_REG_T); // PkiDbgPrintReg(… in EcMontPkaScalarMultWithLadderExe()
[all …]
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/srp/
Dsrp.c49 rc = PkaCalcNpIntoPkaReg(LEN_ID_N_BITS, pCtx->groupParam.modSizeInBits, rN, rNp, rT2, rT3); in SrpPwdVerifierCalc()
60 PKA_MOD_EXP(LEN_ID_N_BITS, rT4, rT2/*g*/, rT3 /*x*/); in SrpPwdVerifierCalc()
127 PKA_MOD_EXP(LEN_ID_N_BITS, rT2, rT2/*v*/, rT3 /*u*/); in SrpHostSharedSecretCalc()
129 PKA_MOD_MUL(LEN_ID_N_BITS, rT4, rT4/*A*/, rT2 /*v^u*/); in SrpHostSharedSecretCalc()
144 PKA_ADD_IM(LEN_ID_N_BITS, rT2, rT4, 1); in SrpHostSharedSecretCalc()
152 PKA_MOD_EXP(LEN_ID_N_BITS, rT4, rT4/*(A*(v^u))*/, rT5 /*(b)*/); in SrpHostSharedSecretCalc()
227 PKA_MOD_EXP(LEN_ID_N_BITS, rT2, rT2/*g*/, rT3 /*x*/); in SrpUserSharedSecretCalc()
229 PKA_MOD_MUL(LEN_ID_N_BITS, rT2, rT7/*k*/, rT2 /*g^x*/); in SrpUserSharedSecretCalc()
231 PKA_MOD_SUB(LEN_ID_N_BITS, rT2, rT4/*B*/, rT2 /*g^x*/); in SrpUserSharedSecretCalc()
233 PKA_MOD_MUL(LEN_ID_N_BITS, rT5, rT5/*u*/, rT3 /*x*/); in SrpUserSharedSecretCalc()
[all …]
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/rsa/
Drsa_genkey.c1298 LEN_ID_N_BITS/*lenId*/, in RsaKgPrimeTest()
1306 LEN_ID_N_BITS /*lenId*/, in RsaKgPrimeTest()
1320 LEN_ID_N_BITS /*lenId*/, in RsaKgPrimeTest()
1387 …PKA_MUL_LOW(LEN_ID_N_BITS, r0, rP/*OpA*/, rQ/*OpB*/); // use LEN_ID_N_BITS, since its size is 2*… in RsaCalculateNandD()
1401 PKA_FLIP_BIT0(LEN_ID_N_BITS, rP/*Res*/, rP/*OpA*/); in RsaCalculateNandD()
1402 PKA_FLIP_BIT0(LEN_ID_N_BITS, rQ/*Res*/, rQ/*OpA*/); in RsaCalculateNandD()
1407 PKA_SHR_FILL0(LEN_ID_N_BITS, rP, rP, 0/*shift-1*/); in RsaCalculateNandD()
1408 PKA_SHR_FILL0(LEN_ID_N_BITS, rQ, rQ, 0/*shift-1*/); in RsaCalculateNandD()
1409 PKA_READ_BIT0(LEN_ID_N_BITS, rP, bit0P); in RsaCalculateNandD()
1410 PKA_READ_BIT0(LEN_ID_N_BITS, rQ, bit0Q); in RsaCalculateNandD()
[all …]
Drsa_public.c105 PKA_MOD_EXP(LEN_ID_N_BITS/*LenID*/, rT4/*Res*/, rT2/*OpA*/, rT3/*OpB*/); in RsaExecPubKeyExp()
Drsa_private.c86 PKA_MOD_EXP(LEN_ID_N_BITS/*LenID*/, rT4/*Res*/, rT2/*OpA*/, rT3/*OpB*/); in RsaExecPrivKeyExpNonCrt()
240 PKA_ADD(LEN_ID_N_BITS/*LenID*/, rT/*Res*/, rT1/*OpA*/, rT/*OpB*/); in RsaExecPrivKeyExpCrt()
/trusted-firmware-m-3.4.0/lib/ext/cryptocell-312-runtime/codesafe/src/crypto_api/pki/poly/
Dpoly.c102 PKA_MOD_ADD(LEN_ID_N_BITS, ACC_REG, ACC_REG, DATA_REG); in PolyAccRemainBlock()
103 PKA_MOD_MUL(LEN_ID_N_BITS, ACC_REG, ACC_REG, KEY_R_REG); in PolyAccRemainBlock()
200 PKA_MOD_ADD(LEN_ID_N_BITS, ACC_REG, ACC_REG, DATA_REG); in PolyAccCalcFullBlocks()
201 PKA_MOD_MUL(LEN_ID_N_BITS, ACC_REG, ACC_REG, KEY_R_REG); in PolyAccCalcFullBlocks()
381 PKA_ADD(LEN_ID_N_BITS, ACC_REG, ACC_REG, KEY_S_REG); in PolyMacCalc_finalize()
622 PKA_ADD(LEN_ID_N_BITS, ACC_REG, ACC_REG, KEY_S_REG); in PolyFinish()