Skip to content

Commit 9beb45c

Browse files
committed
[cryptolib] Move integrity and keyblob to include
Move the header files from keyblob and integrity to include. These functions and constants are needed for the use of the crypto library. Signed-off-by: Siemen Dhooghe <[email protected]>
1 parent 3424e7f commit 9beb45c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+102
-97
lines changed

sw/device/lib/crypto/impl/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ cc_library(
128128
cc_library(
129129
name = "integrity",
130130
srcs = ["integrity.c"],
131-
hdrs = ["integrity.h"],
131+
hdrs = ["//sw/device/lib/crypto/include:integrity.h"],
132132
deps = [
133133
"//sw/device/lib/base:crc32_device_library", # force non-mock version in unit tests
134134
"//sw/device/lib/base:hardened",
@@ -153,7 +153,7 @@ cc_library(
153153
cc_library(
154154
name = "keyblob",
155155
srcs = ["keyblob.c"],
156-
hdrs = ["keyblob.h"],
156+
hdrs = ["//sw/device/lib/crypto/include:keyblob.h"],
157157
deps = [
158158
":integrity",
159159
":status",

sw/device/lib/crypto/impl/aes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
#include "sw/device/lib/crypto/drivers/aes.h"
1212
#include "sw/device/lib/crypto/drivers/entropy.h"
1313
#include "sw/device/lib/crypto/drivers/keymgr.h"
14-
#include "sw/device/lib/crypto/impl/integrity.h"
15-
#include "sw/device/lib/crypto/impl/keyblob.h"
1614
#include "sw/device/lib/crypto/impl/security_config.h"
1715
#include "sw/device/lib/crypto/impl/status.h"
1816
#include "sw/device/lib/crypto/include/datatypes.h"
17+
#include "sw/device/lib/crypto/include/integrity.h"
18+
#include "sw/device/lib/crypto/include/keyblob.h"
1919

2020
// Module ID for status codes.
2121
#define MODULE_ID MAKE_MODULE_ID('a', 'e', 's')

sw/device/lib/crypto/impl/aes_gcm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
#include "sw/device/lib/crypto/drivers/rv_core_ibex.h"
1515
#include "sw/device/lib/crypto/impl/aes_gcm/aes_gcm.h"
1616
#include "sw/device/lib/crypto/impl/aes_gcm/ghash.h"
17-
#include "sw/device/lib/crypto/impl/integrity.h"
18-
#include "sw/device/lib/crypto/impl/keyblob.h"
1917
#include "sw/device/lib/crypto/impl/security_config.h"
2018
#include "sw/device/lib/crypto/impl/status.h"
2119
#include "sw/device/lib/crypto/include/datatypes.h"
20+
#include "sw/device/lib/crypto/include/integrity.h"
21+
#include "sw/device/lib/crypto/include/keyblob.h"
2222

2323
// Module ID for status codes.
2424
#define MODULE_ID MAKE_MODULE_ID('a', 'g', 'c')

sw/device/lib/crypto/impl/ecc_p256.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include "sw/device/lib/crypto/drivers/entropy.h"
99
#include "sw/device/lib/crypto/drivers/hmac.h"
1010
#include "sw/device/lib/crypto/impl/ecc/p256.h"
11-
#include "sw/device/lib/crypto/impl/integrity.h"
12-
#include "sw/device/lib/crypto/impl/keyblob.h"
1311
#include "sw/device/lib/crypto/impl/security_config.h"
1412
#include "sw/device/lib/crypto/include/datatypes.h"
13+
#include "sw/device/lib/crypto/include/integrity.h"
14+
#include "sw/device/lib/crypto/include/keyblob.h"
1515

1616
// Module ID for status codes.
1717
#define MODULE_ID MAKE_MODULE_ID('p', '2', '5')

sw/device/lib/crypto/impl/ecc_p384.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include "sw/device/lib/crypto/drivers/entropy.h"
99
#include "sw/device/lib/crypto/drivers/hmac.h"
1010
#include "sw/device/lib/crypto/impl/ecc/p384.h"
11-
#include "sw/device/lib/crypto/impl/integrity.h"
12-
#include "sw/device/lib/crypto/impl/keyblob.h"
1311
#include "sw/device/lib/crypto/impl/security_config.h"
1412
#include "sw/device/lib/crypto/include/datatypes.h"
13+
#include "sw/device/lib/crypto/include/integrity.h"
14+
#include "sw/device/lib/crypto/include/keyblob.h"
1515

1616
// Module ID for status codes.
1717
#define MODULE_ID MAKE_MODULE_ID('p', '3', '8')

sw/device/lib/crypto/impl/hkdf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#include "sw/device/lib/crypto/include/hkdf.h"
66

77
#include "sw/device/lib/base/math.h"
8-
#include "sw/device/lib/crypto/impl/integrity.h"
9-
#include "sw/device/lib/crypto/impl/keyblob.h"
108
#include "sw/device/lib/crypto/impl/status.h"
119
#include "sw/device/lib/crypto/include/datatypes.h"
1210
#include "sw/device/lib/crypto/include/hkdf.h"
1311
#include "sw/device/lib/crypto/include/hmac.h"
12+
#include "sw/device/lib/crypto/include/integrity.h"
13+
#include "sw/device/lib/crypto/include/keyblob.h"
1414

1515
// Module ID for status codes.
1616
#define MODULE_ID MAKE_MODULE_ID('h', 'k', 'd')

sw/device/lib/crypto/impl/hmac.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
#include "sw/device/lib/crypto/drivers/entropy.h"
99
#include "sw/device/lib/crypto/drivers/hmac.h"
1010
#include "sw/device/lib/crypto/drivers/rv_core_ibex.h"
11-
#include "sw/device/lib/crypto/impl/integrity.h"
12-
#include "sw/device/lib/crypto/impl/keyblob.h"
1311
#include "sw/device/lib/crypto/impl/security_config.h"
1412
#include "sw/device/lib/crypto/impl/status.h"
13+
#include "sw/device/lib/crypto/include/integrity.h"
14+
#include "sw/device/lib/crypto/include/keyblob.h"
1515

1616
// Module ID for status codes.
1717
#define MODULE_ID MAKE_MODULE_ID('h', 'm', 'c')

sw/device/lib/crypto/impl/integrity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44

5-
#include "sw/device/lib/crypto/impl/integrity.h"
5+
#include "sw/device/lib/crypto/include/integrity.h"
66

77
#include "sw/device/lib/base/crc32.h"
88
#include "sw/device/lib/base/hardened.h"

sw/device/lib/crypto/impl/kdf_ctr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#include "sw/device/lib/crypto/include/kdf_ctr.h"
66

77
#include "sw/device/lib/base/math.h"
8-
#include "sw/device/lib/crypto/impl/integrity.h"
9-
#include "sw/device/lib/crypto/impl/keyblob.h"
108
#include "sw/device/lib/crypto/impl/status.h"
119
#include "sw/device/lib/crypto/include/datatypes.h"
1210
#include "sw/device/lib/crypto/include/hmac.h"
11+
#include "sw/device/lib/crypto/include/integrity.h"
12+
#include "sw/device/lib/crypto/include/keyblob.h"
1313

1414
// Module ID for status codes.
1515
#define MODULE_ID MAKE_MODULE_ID('c', 'k', 'd')

sw/device/lib/crypto/impl/key_transport.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
#include "sw/device/lib/base/memory.h"
99
#include "sw/device/lib/crypto/drivers/entropy.h"
1010
#include "sw/device/lib/crypto/impl/aes_kwp/aes_kwp.h"
11-
#include "sw/device/lib/crypto/impl/integrity.h"
12-
#include "sw/device/lib/crypto/impl/keyblob.h"
1311
#include "sw/device/lib/crypto/impl/status.h"
1412
#include "sw/device/lib/crypto/include/datatypes.h"
1513
#include "sw/device/lib/crypto/include/drbg.h"
14+
#include "sw/device/lib/crypto/include/integrity.h"
15+
#include "sw/device/lib/crypto/include/keyblob.h"
1616

1717
// Module ID for status codes.
1818
#define MODULE_ID MAKE_MODULE_ID('k', 't', 'r')

0 commit comments

Comments
 (0)