Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
30 lines
964 B
C
30 lines
964 B
C
/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
|
|
/*
|
|
* Shared descriptors for ahash algorithms
|
|
*
|
|
* Copyright 2017 NXP
|
|
*/
|
|
|
|
#ifndef _CAAMHASH_DESC_H_
|
|
#define _CAAMHASH_DESC_H_
|
|
|
|
/* length of descriptors text */
|
|
#define DESC_AHASH_BASE (3 * CAAM_CMD_SZ)
|
|
#define DESC_AHASH_UPDATE_LEN (6 * CAAM_CMD_SZ)
|
|
#define DESC_AHASH_UPDATE_FIRST_LEN (DESC_AHASH_BASE + 4 * CAAM_CMD_SZ)
|
|
#define DESC_AHASH_FINAL_LEN (DESC_AHASH_BASE + 5 * CAAM_CMD_SZ)
|
|
#define DESC_AHASH_DIGEST_LEN (DESC_AHASH_BASE + 4 * CAAM_CMD_SZ)
|
|
|
|
static inline bool is_xcbc_aes(u32 algtype)
|
|
{
|
|
return (algtype & (OP_ALG_ALGSEL_MASK | OP_ALG_AAI_MASK)) ==
|
|
(OP_ALG_ALGSEL_AES | OP_ALG_AAI_XCBC_MAC);
|
|
}
|
|
|
|
void cnstr_shdsc_ahash(u32 * const desc, struct alginfo *adata, u32 state,
|
|
int digestsize, int ctx_len, bool import_ctx, int era);
|
|
|
|
void cnstr_shdsc_sk_hash(u32 * const desc, struct alginfo *adata, u32 state,
|
|
int digestsize, int ctx_len);
|
|
#endif /* _CAAMHASH_DESC_H_ */
|