mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 16:11:56 +08:00
crypto:add some hardware support
esp32c3: aes hmac-sha1 hmac-sha256 stm32f0l0g0 stm32l1 : aes sam34: aes lpc43: aes Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
@@ -313,6 +313,11 @@ struct crypt_op
|
||||
caddr_t iv;
|
||||
};
|
||||
|
||||
/* hamc buffer, software & hardware need it */
|
||||
|
||||
extern const uint8_t hmac_ipad_buffer[HMAC_MAX_BLOCK_LEN];
|
||||
extern const uint8_t hmac_opad_buffer[HMAC_MAX_BLOCK_LEN];
|
||||
|
||||
#define CRYPTO_MAX_MAC_LEN 20
|
||||
|
||||
/* done against open of /dev/crypto, to get a cloned descriptor.
|
||||
@@ -344,4 +349,9 @@ int crypto_getfeat(FAR int *);
|
||||
|
||||
FAR struct cryptop *crypto_getreq(int);
|
||||
void crypto_freereq(FAR struct cryptop *);
|
||||
|
||||
#ifdef CONFIG_CRYPTO_CRYPTODEV_HARDWARE
|
||||
void hwcr_init(void);
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_CRYPTO_CRYPTODEV_H */
|
||||
|
||||
@@ -73,9 +73,6 @@ struct swcr_data
|
||||
struct swcr_data *sw_next;
|
||||
};
|
||||
|
||||
extern const uint8_t hmac_ipad_buffer[HMAC_MAX_BLOCK_LEN];
|
||||
extern const uint8_t hmac_opad_buffer[HMAC_MAX_BLOCK_LEN];
|
||||
|
||||
int swcr_encdec(FAR struct cryptop *, FAR struct cryptodesc *,
|
||||
FAR struct swcr_data *, caddr_t);
|
||||
int swcr_authcompute(FAR struct cryptop *, FAR struct cryptodesc *,
|
||||
|
||||
Reference in New Issue
Block a user