Skip to content

Commit a4570b6

Browse files
Vge0rgerlubos
authored andcommitted
nrf_security: Minor rename of Cracen HASH operation size
This should have been included in the HASH optimizations PR but it seems that a rebase missed to include it. Renames the hash operation size define to a more descriptive one. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 2153513 commit a4570b6

File tree

1 file changed

+9
-9
lines changed
  • subsys/nrf_security/src/drivers/cracen/sxsymcrypt/include/sxsymcrypt

1 file changed

+9
-9
lines changed

subsys/nrf_security/src/drivers/cracen/sxsymcrypt/include/sxsymcrypt/hashdefs.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,27 @@
6666
* !!! ORDER MATTERS !!!
6767
*/
6868
#if defined(PSA_NEED_CRACEN_SHA3_224)
69-
#define SX_HASH_PRIV_SZ 344
69+
#define SX_HASH_OPERATION_CONTEXT_SZ 344
7070
#elif defined(PSA_NEED_CRACEN_SHA3_256)
7171
/* SHAKE256 has the same size but doesn't have a PSA_NEED yet */
72-
#define SX_HASH_PRIV_SZ 336
72+
#define SX_HASH_OPERATION_CONTEXT_SZ 336
7373
#elif defined(PSA_NEED_CRACEN_SHA3_384)
74-
#define SX_HASH_PRIV_SZ 304
74+
#define SX_HASH_OPERATION_CONTEXT_SZ 304
7575
#elif defined(PSA_NEED_CRACEN_SHA3_512)
76-
#define SX_HASH_PRIV_SZ 272
76+
#define SX_HASH_OPERATION_CONTEXT_SZ 272
7777
#elif defined(PSA_NEED_CRACEN_SHA_512) || defined(PSA_NEED_CRACEN_SHA_384)
78-
#define SX_HASH_PRIV_SZ 208
78+
#define SX_HASH_OPERATION_CONTEXT_SZ 208
7979
#elif defined(PSA_NEED_CRACEN_SHA_256) || defined(PSA_NEED_CRACEN_SHA_224)
8080
/* SM3 has the same size but doesn't have a PSA_NEED yet */
81-
#define SX_HASH_PRIV_SZ 104
81+
#define SX_HASH_OPERATION_CONTEXT_SZ 104
8282
#elif defined(PSA_NEED_CRACEN_SHA_1)
83-
#define SX_HASH_PRIV_SZ 92
83+
#define SX_HASH_OPERATION_CONTEXT_SZ 92
8484
#else
8585
/* A default value is needed to avoid building failures when no hash is
8686
* enabled. A small number is used because it will enforce a runtime failure
8787
* if the sx_hash APIs are called while no algorithm is enabled.
8888
*/
89-
#define SX_HASH_PRIV_SZ 1
89+
#define SX_HASH_OPERATION_CONTEXT_SZ 1
9090
#endif
9191

9292
struct sx_digesttags {
@@ -112,7 +112,7 @@ struct sxhash {
112112
void (*digest)(struct sxhash *c, char *digest);
113113
struct sx_dmactl dma;
114114
struct sxdesc descs[7 + SX_EXTRA_IN_DESCS];
115-
uint8_t extramem[SX_HASH_PRIV_SZ];
115+
uint8_t extramem[SX_HASH_OPERATION_CONTEXT_SZ];
116116
};
117117

118118
struct sxhashalg {

0 commit comments

Comments
 (0)