Lines Matching refs:ecc
131 struct ccp_ecc_op ecc; member
416 | (op->u.ecc.function << REQ1_ECC_FUNCTION_SHIFT) in ccp_perform_ecc()
1804 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_mm_cmd() local
1810 if (!ecc->u.mm.operand_1 || in ccp_run_ecc_mm_cmd()
1811 (ecc->u.mm.operand_1_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
1814 if (ecc->function != CCP_ECC_FUNCTION_MINV_384BIT) in ccp_run_ecc_mm_cmd()
1815 if (!ecc->u.mm.operand_2 || in ccp_run_ecc_mm_cmd()
1816 (ecc->u.mm.operand_2_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
1819 if (!ecc->u.mm.result || in ccp_run_ecc_mm_cmd()
1820 (ecc->u.mm.result_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
1843 ccp_reverse_set_dm_area(&src, ecc->mod, ecc->mod_len, in ccp_run_ecc_mm_cmd()
1848 ccp_reverse_set_dm_area(&src, ecc->u.mm.operand_1, in ccp_run_ecc_mm_cmd()
1849 ecc->u.mm.operand_1_len, in ccp_run_ecc_mm_cmd()
1853 if (ecc->function != CCP_ECC_FUNCTION_MINV_384BIT) { in ccp_run_ecc_mm_cmd()
1855 ccp_reverse_set_dm_area(&src, ecc->u.mm.operand_2, in ccp_run_ecc_mm_cmd()
1856 ecc->u.mm.operand_2_len, in ccp_run_ecc_mm_cmd()
1878 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_mm_cmd()
1886 ecc->ecc_result = le16_to_cpup( in ccp_run_ecc_mm_cmd()
1888 if (!(ecc->ecc_result & CCP_ECC_RESULT_SUCCESS)) { in ccp_run_ecc_mm_cmd()
1894 ccp_reverse_get_dm_area(&dst, ecc->u.mm.result, CCP_ECC_MODULUS_BYTES); in ccp_run_ecc_mm_cmd()
1907 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_pm_cmd() local
1913 if (!ecc->u.pm.point_1.x || in ccp_run_ecc_pm_cmd()
1914 (ecc->u.pm.point_1.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
1915 !ecc->u.pm.point_1.y || in ccp_run_ecc_pm_cmd()
1916 (ecc->u.pm.point_1.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1919 if (ecc->function == CCP_ECC_FUNCTION_PADD_384BIT) { in ccp_run_ecc_pm_cmd()
1920 if (!ecc->u.pm.point_2.x || in ccp_run_ecc_pm_cmd()
1921 (ecc->u.pm.point_2.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
1922 !ecc->u.pm.point_2.y || in ccp_run_ecc_pm_cmd()
1923 (ecc->u.pm.point_2.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1926 if (!ecc->u.pm.domain_a || in ccp_run_ecc_pm_cmd()
1927 (ecc->u.pm.domain_a_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1930 if (ecc->function == CCP_ECC_FUNCTION_PMUL_384BIT) in ccp_run_ecc_pm_cmd()
1931 if (!ecc->u.pm.scalar || in ccp_run_ecc_pm_cmd()
1932 (ecc->u.pm.scalar_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1936 if (!ecc->u.pm.result.x || in ccp_run_ecc_pm_cmd()
1937 (ecc->u.pm.result.x_len < CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
1938 !ecc->u.pm.result.y || in ccp_run_ecc_pm_cmd()
1939 (ecc->u.pm.result.y_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1962 ccp_reverse_set_dm_area(&src, ecc->mod, ecc->mod_len, in ccp_run_ecc_pm_cmd()
1967 ccp_reverse_set_dm_area(&src, ecc->u.pm.point_1.x, in ccp_run_ecc_pm_cmd()
1968 ecc->u.pm.point_1.x_len, in ccp_run_ecc_pm_cmd()
1971 ccp_reverse_set_dm_area(&src, ecc->u.pm.point_1.y, in ccp_run_ecc_pm_cmd()
1972 ecc->u.pm.point_1.y_len, in ccp_run_ecc_pm_cmd()
1980 if (ecc->function == CCP_ECC_FUNCTION_PADD_384BIT) { in ccp_run_ecc_pm_cmd()
1982 ccp_reverse_set_dm_area(&src, ecc->u.pm.point_2.x, in ccp_run_ecc_pm_cmd()
1983 ecc->u.pm.point_2.x_len, in ccp_run_ecc_pm_cmd()
1986 ccp_reverse_set_dm_area(&src, ecc->u.pm.point_2.y, in ccp_run_ecc_pm_cmd()
1987 ecc->u.pm.point_2.y_len, in ccp_run_ecc_pm_cmd()
1996 ccp_reverse_set_dm_area(&src, ecc->u.pm.domain_a, in ccp_run_ecc_pm_cmd()
1997 ecc->u.pm.domain_a_len, in ccp_run_ecc_pm_cmd()
2001 if (ecc->function == CCP_ECC_FUNCTION_PMUL_384BIT) { in ccp_run_ecc_pm_cmd()
2003 ccp_reverse_set_dm_area(&src, ecc->u.pm.scalar, in ccp_run_ecc_pm_cmd()
2004 ecc->u.pm.scalar_len, in ccp_run_ecc_pm_cmd()
2027 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_pm_cmd()
2035 ecc->ecc_result = le16_to_cpup( in ccp_run_ecc_pm_cmd()
2037 if (!(ecc->ecc_result & CCP_ECC_RESULT_SUCCESS)) { in ccp_run_ecc_pm_cmd()
2048 ccp_reverse_get_dm_area(&dst, ecc->u.pm.result.x, in ccp_run_ecc_pm_cmd()
2051 ccp_reverse_get_dm_area(&dst, ecc->u.pm.result.y, in ccp_run_ecc_pm_cmd()
2069 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_cmd() local
2071 ecc->ecc_result = 0; in ccp_run_ecc_cmd()
2073 if (!ecc->mod || in ccp_run_ecc_cmd()
2074 (ecc->mod_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_cmd()
2077 switch (ecc->function) { in ccp_run_ecc_cmd()