summaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorHeiko Schocher <[email protected]>2025-11-18 05:30:39 +0100
committerTom Rini <[email protected]>2025-12-04 09:38:58 -0600
commitc4ab316269debc321907acc4f8f02dfe5653aeaf (patch)
tree62bdb7cff456cb101a8b9aa1d50090f22a01cd40 /include/u-boot
parent41c0131b950a16747929ab310588cf5db8e38123 (diff)
lib: sm3: implement U-Boot parts
add the U-Boot specific parts for the SM3 hash implementation: Signed-off-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'include/u-boot')
-rw-r--r--include/u-boot/sm3.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/u-boot/sm3.h b/include/u-boot/sm3.h
index de16684ca0a..b4ead96c776 100644
--- a/include/u-boot/sm3.h
+++ b/include/u-boot/sm3.h
@@ -24,4 +24,12 @@ struct sm3_context {
uint8_t buffer[SM3_BLOCK_SIZE];
int buflen;
};
+
+void sm3_init(struct sm3_context *sctx);
+void sm3_update(struct sm3_context *sctx, const uint8_t *input, size_t ilen);
+void sm3_final(struct sm3_context *sctx, uint8_t output[SM3_DIGEST_SIZE]);
+void sm3_hash(const uint8_t *input, size_t ilen, uint8_t output[SM3_DIGEST_SIZE]);
+
+void sm3_csum_wd(const unsigned char *input, uint32_t len,
+ unsigned char *output, unsigned int chunk_sz);
#endif