Lines Matching +full:sha +full:- +full:1
1 /* SPDX-License-Identifier: GPL-2.0-only */
18 #include <crypto/sha.h>
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()
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
256 CCP_SHA_TYPE_1 = 1,
265 * struct ccp_sha_engine - CCP SHA operation
266 * @type: Type of SHA operation
273 * @first: indicates first SHA operation
274 * @final: indicates final SHA operation
275 * @msg_bits: total length of the message in bits used in final SHA operation
278 * - type, ctx, ctx_len, src, src_len, final
279 * - msg_bits if final is non-zero
282 * SHA operation the new hash value overwrites the old hash value.
296 u32 first; /* Indicates first sha cmd */
297 u32 final; /* Indicates final sha cmd */
299 * final sha cmd */
311 CCP_DES3_TYPE_168 = 1,
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
358 * struct ccp_rsa_engine - CCP RSA operation
369 * - key_size, exp, exp_len, mod, mod_len, src, dst, src_len
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
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
536 * struct ccp_ecc_point_math - CCP ECC point math parameters
562 * struct ccp_ecc_engine - CCP 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
596 * @CCP_ENGINE_SHA: SHA operation
598 * @CCP_ENGINE_PASSTHRU: pass-through operation
619 * struct ccp_cmd - CCP operation request
632 * - engine, callback
633 * - See the operation structures below for what is required for each
654 struct ccp_sha_engine sha; member