crypto/cryptodev: expansion hash operation

(1) remove size restriction for single hash operation
(2) support hash operation to update uint32_t data
Signed-off-by: makejian <makejian@xiaomi.com>
This commit is contained in:
makejian
2023-09-18 20:50:57 +08:00
committed by Xiang Xiao
parent 7a417da65e
commit cb3abc48d7
8 changed files with 24 additions and 28 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ CHACHA20_POLY1305_CTX;
void chacha20_poly1305_init(FAR void *);
void chacha20_poly1305_setkey(FAR void *, FAR const uint8_t *, uint16_t);
void chacha20_poly1305_reinit(FAR void *, FAR const uint8_t *, uint16_t);
int chacha20_poly1305_update(FAR void *, FAR const uint8_t *, uint16_t);
int chacha20_poly1305_update(FAR void *, FAR const uint8_t *, size_t);
void chacha20_poly1305_final(FAR uint8_t *, FAR void *);
/* WireGuard crypto */
+1 -1
View File
@@ -51,7 +51,7 @@ extern void (*ghash_update)(FAR GHASH_CTX *, FAR uint8_t *, size_t);
void aes_gmac_init(FAR void *);
void aes_gmac_setkey(FAR void *, FAR const uint8_t *, uint16_t);
void aes_gmac_reinit(FAR void *, FAR const uint8_t *, uint16_t);
int aes_gmac_update(FAR void *, FAR const uint8_t *, uint16_t);
int aes_gmac_update(FAR void *, FAR const uint8_t *, size_t);
void aes_gmac_final(FAR uint8_t *, FAR void *);
#endif /* __INCLUDE_CRYPTO_GMAC_H */
+1 -1
View File
@@ -59,7 +59,7 @@ struct auth_hash
CODE void (*init) (FAR void *);
CODE void (*setkey) (FAR void *, FAR const uint8_t *, uint16_t);
CODE void (*reinit) (FAR void *, FAR const uint8_t *, uint16_t);
CODE int (*update) (FAR void *, FAR const uint8_t *, uint16_t);
CODE int (*update) (FAR void *, FAR const uint8_t *, size_t);
CODE void (*final) (FAR uint8_t *, FAR void *);
};