Skip to content

Commit d5e3320

Browse files
Vge0rgerlubos
authored andcommitted
nrf_security: Combine Cracen hash headers
Combine all the individual hash headers to the hashdefs.h instead of having multiple files. This is preparation work, following work will be selecting the size of the hash context depending on the selected algorithms. This makes more sense to be in one file in order to be more clear what context size will be used. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 2e3c500 commit d5e3320

File tree

20 files changed

+97
-222
lines changed

20 files changed

+97
-222
lines changed

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/common.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
#include <silexpk/ik.h>
2323
#include <silexpk/sxops/eccweierstrass.h>
2424
#include <stddef.h>
25-
#include <sxsymcrypt/sha1.h>
26-
#include <sxsymcrypt/sha2.h>
27-
#include <sxsymcrypt/sha3.h>
25+
#include <sxsymcrypt/hashdefs.h>
2826
#include <zephyr/logging/log.h>
2927
#include <zephyr/sys/util.h>
3028
#include <psa/nrf_platform_key_ids.h>

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/common.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
#include <zephyr/sys/util.h>
1515
#include <sicrypto/sicrypto.h>
1616
#include <silexpk/sxbuf/sxbufop.h>
17-
#include <sxsymcrypt/sha1.h>
18-
#include <sxsymcrypt/sha2.h>
19-
#include <sxsymcrypt/sha3.h>
17+
#include <sxsymcrypt/hashdefs.h>
2018

2119
/* RFC5480 - first byte of ECC public key that indicates that the key
2220
* is uncompressed

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/ed25519.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* 32 bytes of this area.
2828
*/
2929
#include <string.h>
30-
#include <sxsymcrypt/sha2.h>
30+
#include <sxsymcrypt/hashdefs.h>
3131
#include <silexpk/ed25519.h>
3232
#include <cracen/ec_helpers.h>
3333
#include <sxsymcrypt/hash.h>

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/hash.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
#include <string.h>
1313
#include <sxsymcrypt/hash.h>
1414
#include <sxsymcrypt/internal.h>
15-
#include <sxsymcrypt/sha1.h>
16-
#include <sxsymcrypt/sha2.h>
17-
#include <sxsymcrypt/sha3.h>
15+
#include <sxsymcrypt/hashdefs.h>
1816
#include <cracen/statuscodes.h>
1917
#include <zephyr/sys/__assert.h>
2018
#include "common.h"

subsys/nrf_security/src/drivers/cracen/cracenpsa/src/sign.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
#include <silexpk/ik.h>
2323
#include <silexpk/sxbuf/sxbufop.h>
2424
#include <string.h>
25-
#include <sxsymcrypt/sha1.h>
26-
#include <sxsymcrypt/sha2.h>
25+
#include <sxsymcrypt/hashdefs.h>
2726
#include <sxsymcrypt/trng.h>
2827
#include "hashdefs.h"
2928

subsys/nrf_security/src/drivers/cracen/sicrypto/include/sicrypto/internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <sxsymcrypt/aead.h>
1212
#include <sxsymcrypt/blkcipher.h>
1313
#include <sxsymcrypt/internal.h>
14+
#include <sxsymcrypt/hashdefs.h>
1415
#include <silexpk/ec_curves.h>
1516
#include <stdbool.h>
1617
#include <stdint.h>

subsys/nrf_security/src/drivers/cracen/sicrypto/src/ecdsa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <silexpk/core.h>
2727
#include <silexpk/iomem.h>
2828
#include <silexpk/cmddefs/ecc.h>
29-
#include <sxsymcrypt/sha2.h>
29+
#include <sxsymcrypt/hashdefs.h>
3030
#include "../include/sicrypto/sicrypto.h"
3131
#include "../include/sicrypto/ecdsa.h"
3232
#include "../include/sicrypto/hash.h"

subsys/nrf_security/src/drivers/cracen/sicrypto/src/ed25519.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434

3535
#include <string.h>
36-
#include <sxsymcrypt/sha2.h>
36+
#include <sxsymcrypt/hashdefs.h>
3737
#include <silexpk/core.h>
3838
#include <silexpk/ed25519.h>
3939
#include <sicrypto/sicrypto.h>

subsys/nrf_security/src/drivers/cracen/sicrypto/src/ed25519ph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232

3333
#include <string.h>
34-
#include <sxsymcrypt/sha2.h>
34+
#include <sxsymcrypt/hashdefs.h>
3535
#include <silexpk/core.h>
3636
#include <silexpk/ed25519.h>
3737
#include <sicrypto/sicrypto.h>

subsys/nrf_security/src/drivers/cracen/sicrypto/src/ed448.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*/
4242

4343
#include <string.h>
44-
#include <sxsymcrypt/sha3.h>
44+
#include <sxsymcrypt/hashdefs.h>
4545
#include <silexpk/core.h>
4646
#include <silexpk/ed448.h>
4747
#include <sicrypto/sicrypto.h>

0 commit comments

Comments
 (0)