mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Add support for the Inside Secure SafeXcel EIP-93 Crypto Engine used on Mediatek MT7621 SoC and new Airoha SoC. EIP-93 IP supports AES/DES/3DES ciphers in ECB/CBC and CTR modes as well as authenc(HMAC(x), cipher(y)) using HMAC MD5, SHA1, SHA224 and SHA256. EIP-93 provide regs to signal support for specific chipers and the driver dynamically register only the supported one by the chip. Signed-off-by: Richard van Schagen <vschagen@icloud.com> Co-developed-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
24 lines
709 B
C
24 lines
709 B
C
/* SPDX-License-Identifier: GPL-2.0
|
|
*
|
|
* Copyright (C) 2019 - 2021
|
|
*
|
|
* Richard van Schagen <vschagen@icloud.com>
|
|
* Christian Marangi <ansuelsmth@gmail.com
|
|
*/
|
|
|
|
#ifndef _EIP93_COMMON_H_
|
|
#define _EIP93_COMMON_H_
|
|
|
|
void *eip93_get_descriptor(struct eip93_device *eip93);
|
|
int eip93_put_descriptor(struct eip93_device *eip93, struct eip93_descriptor *desc);
|
|
|
|
void eip93_set_sa_record(struct sa_record *sa_record, const unsigned int keylen,
|
|
const u32 flags);
|
|
|
|
int eip93_parse_ctrl_stat_err(struct eip93_device *eip93, int err);
|
|
|
|
int eip93_hmac_setkey(u32 ctx_flags, const u8 *key, unsigned int keylen,
|
|
unsigned int hashlen, u8 *ipad, u8 *opad,
|
|
bool skip_ipad);
|
|
|
|
#endif /* _EIP93_COMMON_H_ */
|