Lines Matching +full:ecc +full:- +full:engine
1 /* SPDX-License-Identifier: GPL-2.0-only */
26 * ccp_present - check if a CCP device is present
28 * Returns zero if a CCP device is present, -ENODEV otherwise.
33 #define CCP_VMASK ((unsigned int)((1 << CCP_VSIZE) - 1))
38 * ccp_version - get the version of the CCP
45 * ccp_enqueue_cmd - queue an operation for processing by the CCP
54 * result in a return code of -EBUSY.
60 * will be -EINPROGRESS. Any other "err" value during callback is
64 * the return code is -EINPROGRESS or
65 * the return code is -EBUSY and CCP_CMD_MAY_BACKLOG flag is set
73 return -ENODEV; in ccp_present()
83 return -ENODEV; in ccp_enqueue_cmd()
89 /***** AES engine *****/
91 * ccp_aes_type - AES key size
93 * @CCP_AES_TYPE_128: 128-bit key
94 * @CCP_AES_TYPE_192: 192-bit key
95 * @CCP_AES_TYPE_256: 256-bit key
105 * ccp_aes_mode - AES operation mode
129 * ccp_aes_mode - AES operation mode
144 * struct ccp_aes_engine - CCP AES operation
160 * - type, mode, action, key, key_len, src, dst, src_len
161 * - iv, iv_len for any mode other than ECB
162 * - cmac_final for CMAC mode
163 * - cmac_key, cmac_key_len for CMAC mode if cmac_final is non-zero
192 /***** XTS-AES engine *****/
194 * ccp_xts_aes_unit_size - XTS unit size
212 * struct ccp_xts_aes_engine - CCP XTS AES operation
225 * - action, unit_size, key, key_len, iv, iv_len, src, dst, src_len, final
247 /***** SHA engine *****/
249 * ccp_sha_type - type of SHA operation
251 * @CCP_SHA_TYPE_1: SHA-1 operation
252 * @CCP_SHA_TYPE_224: SHA-224 operation
253 * @CCP_SHA_TYPE_256: SHA-256 operation
265 * struct ccp_sha_engine - CCP SHA operation
278 * - type, ctx, ctx_len, src, src_len, final
279 * - msg_bits if final is non-zero
302 /***** 3DES engine *****/
322 * struct ccp_des3_engine - CCP SHA operation
335 * - type, mode, action, key, key_len, src, dst, src_len
336 * - iv, iv_len for any mode other than ECB
356 /***** RSA engine *****/
358 * struct ccp_rsa_engine - CCP RSA operation
369 * - key_size, exp, exp_len, mod, mod_len, src, dst, src_len
384 /***** Passthru engine *****/
386 * ccp_passthru_bitwise - type of bitwise passthru operation
404 * ccp_passthru_byteswap - type of byteswap passthru operation
407 * @CCP_PASSTHRU_BYTESWAP_32BIT: swap bytes within 32-bit words
408 * @CCP_PASSTHRU_BYTESWAP_256BIT: swap bytes within 256-bit words
418 * struct ccp_passthru_engine - CCP pass-through operation
426 * @final: indicate final pass-through operation
429 * - bit_mod, byte_swap, src, dst, src_len
430 * - mask, mask_len if bit_mod is not CCP_PASSTHRU_BITWISE_NOOP
446 * struct ccp_passthru_nomap_engine - CCP pass-through operation
455 * @final: indicate final pass-through operation
458 * - bit_mod, byte_swap, src, dst, src_len
459 * - mask, mask_len if bit_mod is not CCP_PASSTHRU_BITWISE_NOOP
474 /***** ECC engine *****/
475 #define CCP_ECC_MODULUS_BYTES 48 /* 384-bits */
480 * ccp_ecc_function - type of ECC function
482 * @CCP_ECC_FUNCTION_MMUL_384BIT: 384-bit modular multiplication
483 * @CCP_ECC_FUNCTION_MADD_384BIT: 384-bit modular addition
484 * @CCP_ECC_FUNCTION_MINV_384BIT: 384-bit multiplicative inverse
485 * @CCP_ECC_FUNCTION_PADD_384BIT: 384-bit point addition
486 * @CCP_ECC_FUNCTION_PMUL_384BIT: 384-bit point multiplication
487 * @CCP_ECC_FUNCTION_PDBL_384BIT: 384-bit point doubling
499 * struct ccp_ecc_modular_math - CCP ECC modular math parameters
521 * struct ccp_ecc_point - CCP ECC point definition
522 * @x: the x coordinate of the ECC point
524 * @y: the y coordinate of the ECC point
536 * struct ccp_ecc_point_math - CCP ECC point math parameters
537 * @point_1: the first point of the ECC point math operation
538 * @point_2: the second point of the ECC point math operation
540 * @domain_a: the a parameter of the ECC curve
562 * struct ccp_ecc_engine - CCP ECC operation
563 * @function: ECC function to perform
564 * @mod: ECC modulus
568 * @ecc_result: result of the ECC operation
571 * - function, mod, mod_len
572 * - operand, operand_len, operand_count, output, output_len, output_count
573 * - ecc_result
591 * ccp_engine - CCP operation identifiers
594 * @CCP_ENGINE_XTS_AES: 128-bit XTS AES operation
598 * @CCP_ENGINE_PASSTHRU: pass-through operation
600 * @CCP_ENGINE_ECC: ECC operation
619 * struct ccp_cmd - CCP operation request
625 * @engine: CCP operation to perform
626 * @engine_error: CCP engine return code
627 * @u: engine specific structures, refer to specific engine struct below
632 * - engine, callback
633 * - See the operation structures below for what is required for each
647 enum ccp_engine engine; member
658 struct ccp_ecc_engine ecc; member