Skip to content

Commit 5ec7172

Browse files
famora0802Grom-
authored andcommitted
[fix] Add SHA3 digest sizes and clarify lack of support for SHA-1 and SHA-224 usage in STSAFE-120 service
1 parent 1c15a8b commit 5ec7172

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

core/stse_generic_typedef.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ typedef enum stse_aes_key_type_t {
115115
*/
116116
typedef enum stse_hash_algorithm_t {
117117
#ifdef STSE_CONF_HASH_SHA_1
118-
STSE_SHA_1,
118+
STSE_SHA_1, /**< SHA-1 algorithm (not supported as service on STSAFE-A120) */
119119
#endif
120120
#ifdef STSE_CONF_HASH_SHA_224
121-
STSE_SHA_224,
121+
STSE_SHA_224, /**< SHA-224 algorithm (not supported as service on STSAFE-A120) */
122122
#endif
123123
#ifdef STSE_CONF_HASH_SHA_256
124124
STSE_SHA_256,

services/stsafea/stsafea_hash.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,15 @@
3939
* ---------------------------------------------------------------------------------------
4040
*/
4141

42-
#define STSAFEA_SHA_1_HASH_SIZE 20U /*!< Size in bytes of a SHA1 digest */
43-
#define STSAFEA_SHA_224_HASH_SIZE 28U /*!< Size in bytes of a SHA224 digest */
44-
#define STSAFEA_SHA_256_HASH_SIZE 32U /*!< Size in bytes of a SHA256 digest */
45-
#define STSAFEA_SHA_384_HASH_SIZE 48U /*!< Size in bytes of a SHA384 digest */
46-
#define STSAFEA_SHA_512_HASH_SIZE 64U /*!< Size in bytes of a SHA512 digest */
42+
#define STSAFEA_SHA_1_HASH_SIZE 20U /*!< Size in bytes of a SHA1 digest */
43+
#define STSAFEA_SHA_224_HASH_SIZE 28U /*!< Size in bytes of a SHA224 digest */
44+
#define STSAFEA_SHA_256_HASH_SIZE 32U /*!< Size in bytes of a SHA256 digest */
45+
#define STSAFEA_SHA_384_HASH_SIZE 48U /*!< Size in bytes of a SHA384 digest */
46+
#define STSAFEA_SHA_512_HASH_SIZE 64U /*!< Size in bytes of a SHA512 digest */
47+
48+
#define STSAFEA_SHA3_256_HASH_SIZE 32U /*!< Size in bytes of a SHA3-256 digest */
49+
#define STSAFEA_SHA3_384_HASH_SIZE 48U /*!< Size in bytes of a SHA3-384 digest */
50+
#define STSAFEA_SHA3_512_HASH_SIZE 64U /*!< Size in bytes of a SHA3-512 digest */
4751

4852
#define STSAFEA_HASH_ALGO_ID_VALUE_SIZE 9U /*!< Max size in bytes of a hash algo ID */
4953
#define STSAFEA_HASH_ALGO_ID_LENGTH_SIZE 2U /*!<Size in bytes of a hash algo ID length field */

0 commit comments

Comments
 (0)