Lines Matching refs:i

100     uint32_t  i, wcnt;  in PRNG_Read()  local
104 for (i = 0U; i < wcnt; i++) in PRNG_Read()
106 u32RandKey[i] = crpt->PRNG_KEY[i]; in PRNG_Read()
178 uint32_t i, wcnt, key_reg_addr; in AES_SetKey() local
183 for (i = 0U; i < wcnt; i++) in AES_SetKey()
185 outpw(key_reg_addr, au32Keys[i]); in AES_SetKey()
199 uint32_t i, key_reg_addr; in AES_SetInitVect() local
203 for (i = 0U; i < 4U; i++) in AES_SetInitVect()
205 outpw(key_reg_addr, au32IV[i]); in AES_SetInitVect()
299 uint32_t i, reg_addr; in TDES_SetKey() local
303 for (i = 0U; i < 3U; i++) in TDES_SetKey()
305 outpw(reg_addr, au32Keys[i][0]); /* TDESn_KEYxH */ in TDES_SetKey()
307 outpw(reg_addr, au32Keys[i][1]); /* TDESn_KEYxL */ in TDES_SetKey()
424 uint32_t i, wcnt, reg_addr; in SHA_Read() local
426 i = (crpt->HMAC_CTL & CRPT_HMAC_CTL_OPMODE_Msk) >> CRPT_HMAC_CTL_OPMODE_Pos; in SHA_Read()
428 if (i == SHA_MODE_SHA1) in SHA_Read()
432 else if (i == SHA_MODE_SHA224) in SHA_Read()
436 else if (i == SHA_MODE_SHA256) in SHA_Read()
440 else if (i == SHA_MODE_SHA384) in SHA_Read()
451 for (i = 0UL; i < wcnt; i++) in SHA_Read()
453 u32Digest[i] = inpw(reg_addr); in SHA_Read()
900 int32_t i; in dump_ecc_reg() local
903 for (i = 0; i < count; i++) in dump_ecc_reg()
905 printf("0x%08x ", regs[i]); in dump_ecc_reg()
936 uint32_t i, val32; in Hex2Reg() local
944 for (i = 0UL; (i < 8UL) && (si >= 0); i++) in Hex2Reg()
947 val32 |= (uint32_t)hex << (i * 4UL); in Hex2Reg()
958 uint32_t i, val32; in Hex2RegEx() local
966 for (i = 0UL; (i < 8UL) && (si >= 0L); i++) in Hex2RegEx()
971 val32 |= (uint32_t)((hex & 0xFUL) | carry) << (i * 4UL); in Hex2RegEx()
1000 uint32_t i; in Reg2Hex() local
1007 for (i = 0UL; (i < 8UL) && (idx >= 0); i++) in Reg2Hex()
1009 output[idx] = get_Nth_nibble_char(reg[ri], i); in Reg2Hex()
1017 uint32_t i; in get_curve() local
1020 for (i = 0UL; i < sizeof(_Curve) / sizeof(ECC_CURVE); i++) in get_curve()
1022 if (ecc_curve == _Curve[i].curve_id) in get_curve()
1024 memcpy((char *)&Curve_Copy, &_Curve[i], sizeof(ECC_CURVE)); in get_curve()
1037 int32_t i, ret = 0; in ecc_init_curve() local
1048 for (i = 0; i < 18; i++) in ecc_init_curve()
1050 crpt->ECC_A[i] = 0UL; in ecc_init_curve()
1051 crpt->ECC_B[i] = 0UL; in ecc_init_curve()
1052 crpt->ECC_X1[i] = 0UL; in ecc_init_curve()
1053 crpt->ECC_Y1[i] = 0UL; in ecc_init_curve()
1054 crpt->ECC_N[i] = 0UL; in ecc_init_curve()
1167 uint32_t i; in ECC_IsPrivateKeyValid() local
1186 for (i = 0UL; i < strlen(private_k); i++) in ECC_IsPrivateKeyValid()
1188 if (get_nibble_value(private_k[i]) < get_nibble_value(pCurve->Eorder[i])) in ECC_IsPrivateKeyValid()
1193 if (get_nibble_value(private_k[i]) > get_nibble_value(pCurve->Eorder[i])) in ECC_IsPrivateKeyValid()
1214 int32_t i, ret = 0; in ECC_GeneratePublicKey() local
1223 for (i = 0; i < 18; i++) in ECC_GeneratePublicKey()
1225 crpt->ECC_K[i] = 0UL; in ECC_GeneratePublicKey()
1269 int32_t i, ret = 0; in ECC_Mutiply() local
1278 for (i = 0; i < 18; i++) in ECC_Mutiply()
1280 crpt->ECC_X1[i] = 0UL; in ECC_Mutiply()
1281 crpt->ECC_Y1[i] = 0UL; in ECC_Mutiply()
1282 crpt->ECC_K[i] = 0UL; in ECC_Mutiply()
1327 int32_t i, ret = 0; in ECC_GenerateSecretZ() local
1336 for (i = 0; i < 18; i++) in ECC_GenerateSecretZ()
1338 crpt->ECC_K[i] = 0UL; in ECC_GenerateSecretZ()
1339 crpt->ECC_X1[i] = 0UL; in ECC_GenerateSecretZ()
1340 crpt->ECC_Y1[i] = 0UL; in ECC_GenerateSecretZ()
1435 int32_t i, ret = 0; in ECC_GenerateSignature() local
1473 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1475 crpt->ECC_K[i] = 0UL; in ECC_GenerateSignature()
1482 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1484 crpt->ECC_N[i] = 0UL; in ECC_GenerateSignature()
1489 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1491 crpt->ECC_Y1[i] = 0UL; in ECC_GenerateSignature()
1497 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1499 temp_result1[i] = crpt->ECC_X1[i]; in ECC_GenerateSignature()
1538 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1540 crpt->ECC_N[i] = 0UL; in ECC_GenerateSignature()
1545 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1547 crpt->ECC_Y1[i] = 0UL; in ECC_GenerateSignature()
1552 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1554 crpt->ECC_X1[i] = 0UL; in ECC_GenerateSignature()
1567 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1569 temp_result2[i] = crpt->ECC_X1[i]; in ECC_GenerateSignature()
1578 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1580 crpt->ECC_N[i] = 0UL; in ECC_GenerateSignature()
1585 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1587 crpt->ECC_X1[i] = temp_result1[i]; in ECC_GenerateSignature()
1590 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1592 crpt->ECC_Y1[i] = 0UL; in ECC_GenerateSignature()
1604 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1606 crpt->ECC_N[i] = 0UL; in ECC_GenerateSignature()
1611 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1613 crpt->ECC_Y1[i] = 0UL; in ECC_GenerateSignature()
1625 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1627 crpt->ECC_N[i] = 0UL; in ECC_GenerateSignature()
1632 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1634 crpt->ECC_Y1[i] = temp_result2[i]; in ECC_GenerateSignature()
1640 for (i = 0; i < 18; i++) in ECC_GenerateSignature()
1642 temp_result2[i] = crpt->ECC_X1[i]; in ECC_GenerateSignature()
1670 int32_t i, ret = 0; in ECC_VerifySignature() local
1699 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1701 crpt->ECC_N[i] = 0UL; in ECC_VerifySignature()
1706 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1708 crpt->ECC_Y1[i] = 0UL; in ECC_VerifySignature()
1713 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1715 crpt->ECC_X1[i] = 0UL; in ECC_VerifySignature()
1722 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1724 temp_result2[i] = crpt->ECC_X1[i]; in ECC_VerifySignature()
1753 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1755 crpt->ECC_N[i] = 0UL; in ECC_VerifySignature()
1760 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1762 crpt->ECC_X1[i] = 0UL; in ECC_VerifySignature()
1766 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1768 crpt->ECC_Y1[i] = temp_result2[i]; in ECC_VerifySignature()
1774 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1776 temp_result1[i] = crpt->ECC_X1[i]; in ECC_VerifySignature()
1785 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1787 crpt->ECC_N[i] = 0UL; in ECC_VerifySignature()
1792 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1794 crpt->ECC_X1[i] = 0UL; in ECC_VerifySignature()
1798 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1800 crpt->ECC_Y1[i] = temp_result2[i]; in ECC_VerifySignature()
1806 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1808 temp_result2[i] = crpt->ECC_X1[i]; in ECC_VerifySignature()
1856 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1858 crpt->ECC_K[i] = temp_result1[i]; in ECC_VerifySignature()
1864 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1866 temp_x[i] = crpt->ECC_X1[i]; in ECC_VerifySignature()
1867 temp_y[i] = crpt->ECC_Y1[i]; in ECC_VerifySignature()
1881 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1883 crpt->ECC_X1[i] = 0UL; in ECC_VerifySignature()
1884 crpt->ECC_Y1[i] = 0UL; in ECC_VerifySignature()
1891 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1893 crpt->ECC_K[i] = temp_result2[i]; in ECC_VerifySignature()
1898 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1900 temp_result1[i] = crpt->ECC_X1[i]; in ECC_VerifySignature()
1901 temp_result2[i] = crpt->ECC_Y1[i]; in ECC_VerifySignature()
1915 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1917 crpt->ECC_X1[i] = temp_result1[i]; in ECC_VerifySignature()
1918 crpt->ECC_Y1[i] = temp_result2[i]; in ECC_VerifySignature()
1922 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1924 crpt->ECC_X2[i] = temp_x[i]; in ECC_VerifySignature()
1925 crpt->ECC_Y2[i] = temp_y[i]; in ECC_VerifySignature()
1931 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1933 temp_x[i] = crpt->ECC_X1[i]; in ECC_VerifySignature()
1934 temp_y[i] = crpt->ECC_Y1[i]; in ECC_VerifySignature()
1945 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1947 crpt->ECC_N[i] = 0UL; in ECC_VerifySignature()
1955 for (i = 0; i < 18; i++) in ECC_VerifySignature()
1957 crpt->ECC_X1[i] = temp_x[i]; in ECC_VerifySignature()
1958 crpt->ECC_Y1[i] = 0UL; in ECC_VerifySignature()