@@ -14,11 +14,6 @@ menuconfig SUIT_ENVELOPE
1414
1515if SUIT_ENVELOPE
1616
17- config SUIT_ENVELOPE_SIGN
18- bool "Sign created SUIT envelope"
19- help
20- Sign created SUIT envelope by external script
21-
2217config SUIT_ENVELOPE_ROOT_TEMPLATE_FILENAME
2318 string "Name of the default root envelope template"
2419 default "root_with_binary_nordic_top.yaml.jinja2"
@@ -27,19 +22,6 @@ config SUIT_ENVELOPE_ROOT_TEMPLATE_FILENAME
2722 name in the suit/<soc> directory inside the application directory. If the file is not found
2823 the default template from the base template directory is used.
2924
30-
31- config SUIT_ENVELOPE_SIGN_SCRIPT
32- string "Location of SUIT sign script"
33- depends on SUIT_ENVELOPE_SIGN
34- default "modules/lib/suit-generator/ncs/sign_script.py"
35- help
36- Python script called to sign SUIT envelope.
37- You can use either absolute or relative path.
38- In case relative path is used, the build system uses NRF parent directory.
39- Script need to accept two arguments:
40- - --input-file <STRING> - location of unsigned envelope in the build system
41- - --output-file <STRING> - location of signed envelope to create by script
42-
4325config SUIT_ENVELOPE_BASIC_KMS_SCRIPT_KEY_DIRECTORY
4426 string "The directory in which the keys are stored"
4527 default "${ZEPHYR_SUIT_GENERATOR_MODULE_DIR}/ncs"
@@ -90,6 +72,67 @@ config SUIT_ENVELOPE_NORDIC_TOP_CACHE_PARTITION_NUM
9072
9173endif # SUIT_ENVELOPE_NORDIC_TOP_IN_ROOT
9274
75+ config SUIT_ENVELOPE_ROOT_SIGN
76+ bool "Sign the root envelope"
77+
78+ if SUIT_ENVELOPE_ROOT_SIGN
79+
80+ choice SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN
81+ prompt "SUIT root envelope signing key generation"
82+ default SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN1
83+
84+ config SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN1
85+ bool "Key generation 1"
86+
87+ config SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN2
88+ bool "Key generation 2"
89+
90+ config SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN3
91+ bool "Key generation 3"
92+
93+ endchoice
94+
95+ config SUIT_ENVELOPE_ROOT_SIGN_KEY_ID
96+ hex "The key ID used to identify the OEM root public key on the device"
97+ default 0x4000AA00 if SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN1
98+ default 0x4000AA01 if SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN2
99+ default 0x4000AA02 if SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN3
100+ help
101+ This string is translated to the numeric KEY ID by the encryption script
102+
103+ config SUIT_ENVELOPE_ROOT_SIGN_PRIVATE_KEY_NAME
104+ string "Name of the private key used for signing - to identify the key in the KMS"
105+ default "MANIFEST_OEM_ROOT_GEN1_priv" if SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN1
106+ default "MANIFEST_OEM_ROOT_GEN2_priv" if SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN2
107+ default "MANIFEST_OEM_ROOT_GEN3_priv" if SUIT_ENVELOPE_ROOT_SIGN_KEY_GEN3
108+
109+ choice SUIT_ENVELOPE_ROOT_SIGN_ALG
110+ prompt "Algorithm used to sign the root envelope"
111+ default SUIT_ENVELOPE_ROOT_SIGN_ALG_EDDSA
112+
113+ config SUIT_ENVELOPE_ROOT_SIGN_ALG_EDDSA
114+ bool "Use the EdDSA algorithm"
115+
116+ config SUIT_ENVELOPE_ROOT_SIGN_ALG_ECDSA_256
117+ bool "Use the ECDSA algorithm with key length of 256 bits"
118+
119+ config SUIT_ENVELOPE_ROOT_SIGN_ALG_ECDSA_384
120+ bool "Use the ECDSA algorithm with key length of 384 bits"
121+
122+ config SUIT_ENVELOPE_ROOT_SIGN_ALG_ECDSA_521
123+ bool "Use the ECDSA algorithm with key length of 521 bits"
124+
125+ endchoice
126+
127+ config SUIT_ENVELOPE_ROOT_SIGN_ALG_NAME
128+ string "String name of the algorithm used to sign the root envelope"
129+ default "eddsa" if SUIT_ENVELOPE_ROOT_SIGN_ALG_EDDSA
130+ default "es-256" if SUIT_ENVELOPE_ROOT_SIGN_ALG_ECDSA_256
131+ default "es-384" if SUIT_ENVELOPE_ROOT_SIGN_ALG_ECDSA_384
132+ default "es-521" if SUIT_ENVELOPE_ROOT_SIGN_ALG_ECDSA_521
133+
134+ endif # SUIT_ENVELOPE_ROOT_SIGN
135+
93136config SUIT_BASE_MANIFEST_TEMPLATE_DIR
94137 string "Base manifest directory"
95138 default "${ZEPHYR_NRF_MODULE_DIR}/config/suit/templates"
@@ -164,6 +207,67 @@ config SUIT_ENVELOPE_APP_RECOVERY_ARTIFACT_NAME
164207 help
165208 Name of the root SUIT artifact.
166209
210+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN
211+ bool "Sign the app recovery envelope"
212+
213+ if SUIT_ENVELOPE_APP_RECOVERY_SIGN
214+
215+ choice SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN
216+ prompt "SUIT app recovery envelope signing key generation"
217+ default SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN1
218+
219+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN1
220+ bool "Key generation 1"
221+
222+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN2
223+ bool "Key generation 2"
224+
225+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN3
226+ bool "Key generation 3"
227+
228+ endchoice
229+
230+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_ID
231+ hex "The key ID used to identify the app recovery public key on the device"
232+ default 0x40022100 if SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN1
233+ default 0x40022101 if SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN2
234+ default 0x40022102 if SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN3
235+ help
236+ This string is translated to the numeric KEY ID by the encryption script
237+
238+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_PRIVATE_KEY_NAME
239+ string "Name of the private key used for signing - to identify the key in the KMS"
240+ default "MANIFEST_APPLICATION_GEN1_priv" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN1
241+ default "MANIFEST_APPLICATION_GEN2_priv" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN2
242+ default "MANIFEST_APPLICATION_GEN3_priv" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_KEY_GEN3
243+
244+ choice SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG
245+ prompt "Algorithm used to sign the app recovery envelope"
246+ default SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_EDDSA
247+
248+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_EDDSA
249+ bool "Use the EdDSA algorithm"
250+
251+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_ECDSA_256
252+ bool "Use the ECDSA algorithm with key length of 256 bits"
253+
254+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_ECDSA_384
255+ bool "Use the ECDSA algorithm with key length of 384 bits"
256+
257+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_ECDSA_521
258+ bool "Use the ECDSA algorithm with key length of 521 bits"
259+
260+ endchoice
261+
262+ config SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_NAME
263+ string "String name of the algorithm used to sign the app recovery envelope"
264+ default "eddsa" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_EDDSA
265+ default "es-256" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_ECDSA_256
266+ default "es-384" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_ECDSA_384
267+ default "es-521" if SUIT_ENVELOPE_APP_RECOVERY_SIGN_ALG_ECDSA_521
268+
269+ endif # SUIT_ENVELOPE_APP_RECOVERY_SIGN
270+
167271endif # SUIT_BUILD_RECOVERY
168272
169273config SUIT_BUILD_FLASH_COMPANION
0 commit comments