Lines Matching refs:ecc
130 struct ccp_ecc_op ecc; member
415 | (op->u.ecc.function << REQ1_ECC_FUNCTION_SHIFT) in ccp_perform_ecc()
1814 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_mm_cmd() local
1820 if (!ecc->u.mm.operand_1 || in ccp_run_ecc_mm_cmd()
1821 (ecc->u.mm.operand_1_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
1824 if (ecc->function != CCP_ECC_FUNCTION_MINV_384BIT) in ccp_run_ecc_mm_cmd()
1825 if (!ecc->u.mm.operand_2 || in ccp_run_ecc_mm_cmd()
1826 (ecc->u.mm.operand_2_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
1829 if (!ecc->u.mm.result || in ccp_run_ecc_mm_cmd()
1830 (ecc->u.mm.result_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
1853 ret = ccp_reverse_set_dm_area(&src, ecc->mod, ecc->mod_len, in ccp_run_ecc_mm_cmd()
1860 ret = ccp_reverse_set_dm_area(&src, ecc->u.mm.operand_1, in ccp_run_ecc_mm_cmd()
1861 ecc->u.mm.operand_1_len, in ccp_run_ecc_mm_cmd()
1867 if (ecc->function != CCP_ECC_FUNCTION_MINV_384BIT) { in ccp_run_ecc_mm_cmd()
1869 ret = ccp_reverse_set_dm_area(&src, ecc->u.mm.operand_2, in ccp_run_ecc_mm_cmd()
1870 ecc->u.mm.operand_2_len, in ccp_run_ecc_mm_cmd()
1894 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_mm_cmd()
1902 ecc->ecc_result = le16_to_cpup( in ccp_run_ecc_mm_cmd()
1904 if (!(ecc->ecc_result & CCP_ECC_RESULT_SUCCESS)) { in ccp_run_ecc_mm_cmd()
1910 ccp_reverse_get_dm_area(&dst, ecc->u.mm.result, CCP_ECC_MODULUS_BYTES); in ccp_run_ecc_mm_cmd()
1923 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_pm_cmd() local
1929 if (!ecc->u.pm.point_1.x || in ccp_run_ecc_pm_cmd()
1930 (ecc->u.pm.point_1.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
1931 !ecc->u.pm.point_1.y || in ccp_run_ecc_pm_cmd()
1932 (ecc->u.pm.point_1.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1935 if (ecc->function == CCP_ECC_FUNCTION_PADD_384BIT) { in ccp_run_ecc_pm_cmd()
1936 if (!ecc->u.pm.point_2.x || in ccp_run_ecc_pm_cmd()
1937 (ecc->u.pm.point_2.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
1938 !ecc->u.pm.point_2.y || in ccp_run_ecc_pm_cmd()
1939 (ecc->u.pm.point_2.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1942 if (!ecc->u.pm.domain_a || in ccp_run_ecc_pm_cmd()
1943 (ecc->u.pm.domain_a_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1946 if (ecc->function == CCP_ECC_FUNCTION_PMUL_384BIT) in ccp_run_ecc_pm_cmd()
1947 if (!ecc->u.pm.scalar || in ccp_run_ecc_pm_cmd()
1948 (ecc->u.pm.scalar_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1952 if (!ecc->u.pm.result.x || in ccp_run_ecc_pm_cmd()
1953 (ecc->u.pm.result.x_len < CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
1954 !ecc->u.pm.result.y || in ccp_run_ecc_pm_cmd()
1955 (ecc->u.pm.result.y_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
1978 ret = ccp_reverse_set_dm_area(&src, ecc->mod, ecc->mod_len, in ccp_run_ecc_pm_cmd()
1985 ret = ccp_reverse_set_dm_area(&src, ecc->u.pm.point_1.x, in ccp_run_ecc_pm_cmd()
1986 ecc->u.pm.point_1.x_len, in ccp_run_ecc_pm_cmd()
1991 ret = ccp_reverse_set_dm_area(&src, ecc->u.pm.point_1.y, in ccp_run_ecc_pm_cmd()
1992 ecc->u.pm.point_1.y_len, in ccp_run_ecc_pm_cmd()
2002 if (ecc->function == CCP_ECC_FUNCTION_PADD_384BIT) { in ccp_run_ecc_pm_cmd()
2004 ret = ccp_reverse_set_dm_area(&src, ecc->u.pm.point_2.x, in ccp_run_ecc_pm_cmd()
2005 ecc->u.pm.point_2.x_len, in ccp_run_ecc_pm_cmd()
2010 ret = ccp_reverse_set_dm_area(&src, ecc->u.pm.point_2.y, in ccp_run_ecc_pm_cmd()
2011 ecc->u.pm.point_2.y_len, in ccp_run_ecc_pm_cmd()
2022 ret = ccp_reverse_set_dm_area(&src, ecc->u.pm.domain_a, in ccp_run_ecc_pm_cmd()
2023 ecc->u.pm.domain_a_len, in ccp_run_ecc_pm_cmd()
2029 if (ecc->function == CCP_ECC_FUNCTION_PMUL_384BIT) { in ccp_run_ecc_pm_cmd()
2031 ret = ccp_reverse_set_dm_area(&src, ecc->u.pm.scalar, in ccp_run_ecc_pm_cmd()
2032 ecc->u.pm.scalar_len, in ccp_run_ecc_pm_cmd()
2058 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_pm_cmd()
2066 ecc->ecc_result = le16_to_cpup( in ccp_run_ecc_pm_cmd()
2068 if (!(ecc->ecc_result & CCP_ECC_RESULT_SUCCESS)) { in ccp_run_ecc_pm_cmd()
2079 ccp_reverse_get_dm_area(&dst, ecc->u.pm.result.x, in ccp_run_ecc_pm_cmd()
2082 ccp_reverse_get_dm_area(&dst, ecc->u.pm.result.y, in ccp_run_ecc_pm_cmd()
2100 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_cmd() local
2102 ecc->ecc_result = 0; in ccp_run_ecc_cmd()
2104 if (!ecc->mod || in ccp_run_ecc_cmd()
2105 (ecc->mod_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_cmd()
2108 switch (ecc->function) { in ccp_run_ecc_cmd()