Lines Matching defs:ecc

2165 	struct ccp_ecc_engine *ecc = &cmd->u.ecc;
2171 if (!ecc->u.mm.operand_1 ||
2172 (ecc->u.mm.operand_1_len > CCP_ECC_MODULUS_BYTES))
2175 if (ecc->function != CCP_ECC_FUNCTION_MINV_384BIT)
2176 if (!ecc->u.mm.operand_2 ||
2177 (ecc->u.mm.operand_2_len > CCP_ECC_MODULUS_BYTES))
2180 if (!ecc->u.mm.result ||
2181 (ecc->u.mm.result_len < CCP_ECC_MODULUS_BYTES))
2204 ret = ccp_reverse_set_dm_area(&src, 0, ecc->mod, 0, ecc->mod_len);
2210 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.mm.operand_1, 0,
2211 ecc->u.mm.operand_1_len);
2216 if (ecc->function != CCP_ECC_FUNCTION_MINV_384BIT) {
2218 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.mm.operand_2, 0,
2219 ecc->u.mm.operand_2_len);
2242 op.u.ecc.function = cmd->u.ecc.function;
2244 ret = cmd_q->ccp->vdata->perform->ecc(&op);
2250 ecc->ecc_result = le16_to_cpup(
2252 if (!(ecc->ecc_result & CCP_ECC_RESULT_SUCCESS)) {
2258 ccp_reverse_get_dm_area(&dst, 0, ecc->u.mm.result, 0,
2272 struct ccp_ecc_engine *ecc = &cmd->u.ecc;
2278 if (!ecc->u.pm.point_1.x ||
2279 (ecc->u.pm.point_1.x_len > CCP_ECC_MODULUS_BYTES) ||
2280 !ecc->u.pm.point_1.y ||
2281 (ecc->u.pm.point_1.y_len > CCP_ECC_MODULUS_BYTES))
2284 if (ecc->function == CCP_ECC_FUNCTION_PADD_384BIT) {
2285 if (!ecc->u.pm.point_2.x ||
2286 (ecc->u.pm.point_2.x_len > CCP_ECC_MODULUS_BYTES) ||
2287 !ecc->u.pm.point_2.y ||
2288 (ecc->u.pm.point_2.y_len > CCP_ECC_MODULUS_BYTES))
2291 if (!ecc->u.pm.domain_a ||
2292 (ecc->u.pm.domain_a_len > CCP_ECC_MODULUS_BYTES))
2295 if (ecc->function == CCP_ECC_FUNCTION_PMUL_384BIT)
2296 if (!ecc->u.pm.scalar ||
2297 (ecc->u.pm.scalar_len > CCP_ECC_MODULUS_BYTES))
2301 if (!ecc->u.pm.result.x ||
2302 (ecc->u.pm.result.x_len < CCP_ECC_MODULUS_BYTES) ||
2303 !ecc->u.pm.result.y ||
2304 (ecc->u.pm.result.y_len < CCP_ECC_MODULUS_BYTES))
2327 ret = ccp_reverse_set_dm_area(&src, 0, ecc->mod, 0, ecc->mod_len);
2333 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_1.x, 0,
2334 ecc->u.pm.point_1.x_len);
2338 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_1.y, 0,
2339 ecc->u.pm.point_1.y_len);
2348 if (ecc->function == CCP_ECC_FUNCTION_PADD_384BIT) {
2350 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_2.x, 0,
2351 ecc->u.pm.point_2.x_len);
2355 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_2.y, 0,
2356 ecc->u.pm.point_2.y_len);
2366 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.domain_a, 0,
2367 ecc->u.pm.domain_a_len);
2372 if (ecc->function == CCP_ECC_FUNCTION_PMUL_384BIT) {
2375 ecc->u.pm.scalar, 0,
2376 ecc->u.pm.scalar_len);
2400 op.u.ecc.function = cmd->u.ecc.function;
2402 ret = cmd_q->ccp->vdata->perform->ecc(&op);
2408 ecc->ecc_result = le16_to_cpup(
2410 if (!(ecc->ecc_result & CCP_ECC_RESULT_SUCCESS)) {
2421 ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.x, 0,
2424 ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.y, 0,
2442 struct ccp_ecc_engine *ecc = &cmd->u.ecc;
2444 ecc->ecc_result = 0;
2446 if (!ecc->mod ||
2447 (ecc->mod_len > CCP_ECC_MODULUS_BYTES))
2450 switch (ecc->function) {