diff options
author | Soby Mathew <soby.mathew@arm.com> | 2019-09-27 09:54:27 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-09-27 09:54:27 +0000 |
commit | ace23683beb81354d6edbc61c087ab8c384d0631 (patch) | |
tree | 7d38b9f16a08d4ff65dfe9017abf72f4574c2f19 /include | |
parent | 32d514e5c685bf7d425629a6021d4f2f20df159c (diff) | |
parent | 4bdb1a7a6a1325343b0f0c375b43e9b874e31fca (diff) |
Merge changes from topic "ld/stm32-authentication" into integration
* changes:
stm32mp1: add authentication support for stm32image
bsec: move bsec_mode_is_closed_device() service to platform
crypto: stm32_hash: Add HASH driver
Diffstat (limited to 'include')
-rw-r--r-- | include/drivers/st/bsec.h | 1 | ||||
-rw-r--r-- | include/drivers/st/stm32_hash.h | 24 |
2 files changed, 24 insertions, 1 deletions
diff --git a/include/drivers/st/bsec.h b/include/drivers/st/bsec.h index 2171550b..d833e7ab 100644 --- a/include/drivers/st/bsec.h +++ b/include/drivers/st/bsec.h @@ -199,7 +199,6 @@ bool bsec_read_sp_lock(uint32_t otp); bool bsec_wr_lock(uint32_t otp); uint32_t bsec_otp_lock(uint32_t service, uint32_t value); -bool bsec_mode_is_closed_device(void); uint32_t bsec_shadow_read_otp(uint32_t *otp_value, uint32_t word); uint32_t bsec_check_nsec_access_rights(uint32_t otp); diff --git a/include/drivers/st/stm32_hash.h b/include/drivers/st/stm32_hash.h new file mode 100644 index 00000000..969d7aa1 --- /dev/null +++ b/include/drivers/st/stm32_hash.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2019, STMicroelectronics - All Rights Reserved + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef STM32_HASH_H +#define STM32_HASH_H + +enum stm32_hash_algo_mode { + HASH_MD5SUM, + HASH_SHA1, + HASH_SHA224, + HASH_SHA256 +}; + +int stm32_hash_update(const uint8_t *buffer, uint32_t length); +int stm32_hash_final(uint8_t *digest); +int stm32_hash_final_update(const uint8_t *buffer, uint32_t buf_length, + uint8_t *digest); +void stm32_hash_init(enum stm32_hash_algo_mode mode); +int stm32_hash_register(void); + +#endif /* STM32_HASH_H */ |