Hugo McNally | f6298b3 | 2023-02-12 14:47:22 +0000 | [diff] [blame] | 1 | # Device Life Cycle |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 2 | |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 3 | ## Overview |
| 4 | |
| 5 | This document describes the OpenTitan device operational states supported for |
| 6 | manufacturing, provisioning, regular operation and RMA[^1]. |
| 7 | |
| 8 | Provisioning refers to the process in which a device creates a unique and |
| 9 | trusted identity. |
| 10 | |
| 11 | Manufacturing refers to the process in which a device is tested and prepared for |
| 12 | silicon correctness prior to production. |
| 13 | |
Hugo McNally | aef0a66 | 2023-02-11 19:44:55 +0000 | [diff] [blame] | 14 | The technical specification of the corresponding life cycle controller IP can be found [here](../../../../hw/ip/lc_ctrl/README.md). |
Michael Schaffner | 03ab58e | 2020-12-01 20:48:53 -0800 | [diff] [blame] | 15 | |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 16 | ## Background |
| 17 | |
Hugo McNally | aef0a66 | 2023-02-11 19:44:55 +0000 | [diff] [blame] | 18 | First see [here](../../logical_security_model/README.md) for |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 19 | OpenTitan's logical entity breakdowns. |
| 20 | |
| 21 | OpenTitan implements standard device life cycle manufacturing states which are |
| 22 | configured via OTP[^2] memory. These states allow the **Silicon Creator** to |
| 23 | manage the state of the device as it is being manufactured and provisioned for |
| 24 | shipment. |
| 25 | |
| 26 | An additional set of life cycle states are used to encode the device ownership |
| 27 | state. A device that has been personalized with a unique Silicon Creator |
| 28 | Identity, can be provisioned with a Silicon Owner Identity and Credentials. This |
| 29 | enables the Silicon Owner to run signed code on the device. The process of |
| 30 | assigning a Silicon Owner to a device is referred to as Ownership Transfer. |
| 31 | Depending on the product SKU configuration, a device may support a single and |
| 32 | permanent ownership transfer or multiple ones. The multiple ownership transfer |
| 33 | use case has additional state control requirements which are described in more |
| 34 | detail in later sections. |
| 35 | |
| 36 | ## Architecture |
| 37 | |
| 38 | Life cycle states are defined by a combination of OTP and flash. OTP state |
| 39 | transitions cannot be reverted, while flash defined states are meant to be |
| 40 | 'flexible', especially when ownership transfer is required. This implies that |
| 41 | when OTP states are transitioned from A to B, we cannot go back to A from B. |
| 42 | However, it is still possible to transition from B to C, assuming such a |
| 43 | transition is legal and allowed by the life cycle definition. |
| 44 | |
| 45 | See the table below for more details. |
| 46 | |
Drew Macrae | 93536cd | 2021-07-17 13:32:52 -0700 | [diff] [blame] | 47 | <!--SVG for flow chart below in google docs at |
| 48 | https://docs.google.com/drawings/d/1kENEhJzrWDkzonu8ZC6SKDRtjETyH6S4SslcO1RpVPM/edit?usp=sharing--> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 49 | <img src="device_life_cycle_fig1.svg" alt="Fig1" style="width: 800px;"/> |
| 50 | |
| 51 | In the diagram above, |
| 52 | |
| 53 | * **BLACK** arcs represent unconditional OTP transitions. Specifically, this |
| 54 | means that the state will transition as long as it was requested; no |
| 55 | additional authorization is necessary. |
| 56 | * **ORANGE** arcs represent conditional flash transitions. Specifically, the |
| 57 | transition requires either specific value patterns or device specific values |
| 58 | to be programmed. Since flash states are managed by software, this is not |
| 59 | further covered in this specification. |
| 60 | * **RED** arcs represent conditional transitions. These transitions require |
| 61 | the user to supply specific device-unique values and meet specific |
| 62 | conditions. These transitions cannot be reversed. |
| 63 | |
| 64 | Device life cycle is split into two domains. |
| 65 | |
| 66 | * Manufacturing state |
| 67 | * Identity & Ownership state |
| 68 | |
| 69 | Manufacturing state largely refers to the presence of debug functions and |
| 70 | liveness of the device. This is closely connected to manufacturing testing |
| 71 | status as well as desired debug visibility during development and production. |
| 72 | |
| 73 | Identity & Ownership state refers to the state of provisioned identities as |
| 74 | defined by the provisioning flow. |
| 75 | |
| 76 | The life cycle management system splits the states into two because there are |
| 77 | attributes defined by each that are not strictly related most of the time. By |
| 78 | decoupling a single definition into two, more flexibility is allowed in the |
| 79 | system. |
| 80 | |
| 81 | In addition, while certain states are defined by OTP (thus hard), other states |
| 82 | are defined by flash. This gives the latter more flexibility in changing values |
| 83 | to support the provisioning flow ownership transfer model. |
| 84 | |
| 85 | For example, transitions into the DEV / PROD / RMA manufacturing states affect |
| 86 | OTP states and therefore cannot be reversed once completed. |
| 87 | |
Drew Macrae | 93536cd | 2021-07-17 13:32:52 -0700 | [diff] [blame] | 88 | LOCKED_OWNERSHIP / UNLOCKED_OWNERSHIP identity states are defined in flash and thus can be reversed |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 89 | under the right circumstances. |
| 90 | |
| 91 | Below, each state is described in detail. |
| 92 | |
| 93 | ### Manufacturing States |
| 94 | |
| 95 | <table> |
| 96 | <tr> |
| 97 | <td><strong>Name</strong></td> |
| 98 | <td><strong>Encoding</strong></td> |
| 99 | <td><strong>Description</strong></td> |
| 100 | </tr> |
| 101 | <tr> |
| 102 | <td>RAW</td> |
| 103 | <td>OTP</td> |
| 104 | <td> |
| 105 | |
| 106 | This is the default state of the OTP. |
| 107 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 108 | During this state, no functions other than transition to TEST_UNLOCKED0 are |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 109 | available. |
| 110 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 111 | The token authorizing the transition from RAW to TEST_UNLOCKED0 is a value that |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 112 | is secret global to all devices. This is known as the RAW_UNLOCK token. |
| 113 | </td> |
| 114 | </tr> |
| 115 | <tr> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 116 | <td>TEST_LOCKED{N}</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 117 | <td>OTP</td> |
| 118 | <td> |
| 119 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 120 | TEST_LOCKED{N} states have identical functionality to RAW state and serve as a |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 121 | way for the Silicon Creator to protect devices in transit. |
| 122 | |
| 123 | It is not possible to provision OTP root secrets during this state. This |
| 124 | is enforced by hardware and is implementation defined. |
| 125 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 126 | To progress from a TEST_LOCKED state to another TEST_UNLOCKED state, a TEST_UNLOCK |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 127 | token is required. |
| 128 | </td> |
| 129 | </tr> |
| 130 | <tr> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 131 | <td>TEST_UNLOCKED{N}</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 132 | <td>OTP</td> |
| 133 | <td> |
| 134 | |
| 135 | Transition from RAW state using OTP write. |
| 136 | |
| 137 | This state is used for <strong>manufacturing and production testing.</strong> |
| 138 | |
| 139 | During this state: |
| 140 | |
| 141 | * CPU execution is enabled |
| 142 | * NVM backdoor functions are enabled |
| 143 | * Debug functions are enabled |
| 144 | * DFT functions are enabled |
| 145 | |
| 146 | Note: during this state it is not possible to provision specific OTP root |
| 147 | secrets. This will be enforced by hardware. |
| 148 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 149 | It is expected that during TEST_UNLOCKED0 the TEST_UNLOCK and TEST_EXIT tokens will be |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 150 | provisioned into OTP. |
| 151 | |
| 152 | Once provisioned, these tokens are no longer readable by software. |
| 153 | </td> |
| 154 | </tr> |
| 155 | <tr> |
| 156 | <td>PROD</td> |
| 157 | <td>OTP</td> |
| 158 | <td> |
| 159 | |
Timothy Chen | cae406c | 2022-10-06 19:10:42 -0700 | [diff] [blame] | 160 | Transition from TEST_UNLOCKED or TEST_LOCKED state via OTP write. PROD is a mutually exclusive state to |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 161 | DEV and PROD_END. |
| 162 | |
| 163 | To enter this state, a TEST_EXIT token is required. |
| 164 | |
| 165 | This state is used both for provisioning and mission mode. |
| 166 | |
| 167 | During this state: |
| 168 | |
| 169 | * CPU execution is enabled |
| 170 | * NVM backdoor functions are disabled |
| 171 | * Debug functions are disabled |
| 172 | * DFT functions are disabled |
| 173 | </td> |
| 174 | </tr> |
| 175 | <tr> |
| 176 | <td>PROD_END</td> |
| 177 | <td>OTP</td> |
| 178 | <td> |
| 179 | |
| 180 | This state is identical in functionality to PROD, except the device is never |
| 181 | allowed to transition to RMA state. |
| 182 | |
| 183 | To enter this state, a TEST_EXIT token is required. |
| 184 | </td> |
| 185 | </tr> |
| 186 | <tr> |
| 187 | <td>DEV</td> |
| 188 | <td>OTP</td> |
| 189 | <td> |
| 190 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 191 | Transition from TEST_UNLOCKED state via OTP write. This is a mutually exclusive state to |
Tobias Wölfel | 4ca3a2b | 2021-02-18 22:38:34 +0100 | [diff] [blame] | 192 | PROD and PROD_END. |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 193 | |
| 194 | To enter this state, a TEST_EXIT token is required. |
| 195 | |
| 196 | This state is used for developing provisioning and mission mode software. |
| 197 | |
| 198 | During this state |
| 199 | |
| 200 | * CPU execution is enabled |
Michael Schaffner | 431f84a | 2020-12-14 12:48:54 -0800 | [diff] [blame] | 201 | * NVM backdoor functions are disabled |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 202 | * Debug functions are enabled |
| 203 | * DFT functions are disabled |
| 204 | </td> |
| 205 | </tr> |
| 206 | <tr> |
| 207 | <td>RMA</td> |
| 208 | <td>OTP</td> |
| 209 | <td> |
| 210 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 211 | Transition from TEST_UNLOCKED / PROD / DEV via OTP write. It is not possible to reach |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 212 | this state from PROD_END. |
| 213 | |
| 214 | When transitioning from PROD or DEV, an RMA_UNLOCK token is required. |
| 215 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 216 | When transitioning from TEST_UNLOCKED, no RMA_UNLOCK token is required. |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 217 | |
| 218 | A hardware-backed mechanism will erase all owner flash content before RMA |
| 219 | transition is allowed. This includes the isolation owner flash partitions as |
| 220 | well as any owner code. Once erasure is confirmed and verified, RMA transition |
| 221 | will proceed. |
| 222 | |
| 223 | During this state |
| 224 | |
| 225 | * CPU execution is enabled |
| 226 | * NVM backdoor is enabled |
| 227 | * Debug functions are enabled |
| 228 | * DFT functions are enabled |
| 229 | </td> |
| 230 | </tr> |
| 231 | <tr> |
| 232 | <td>SCRAP</td> |
| 233 | <td>OTP</td> |
| 234 | <td> |
| 235 | |
| 236 | Transition from any manufacturing state via OTP write. |
| 237 | |
| 238 | During SCRAP state the device is completely dead. All functions, including CPU |
| 239 | execution are disabled. |
| 240 | |
| 241 | No owner consent is required to transition to SCRAP. |
| 242 | |
| 243 | Note also, SCRAP is meant as an EOL manufacturing state. Transition to this |
Scott Johnson | 19092fe | 2020-10-14 16:15:42 -0700 | [diff] [blame] | 244 | state is always purposeful and persistent, it is NOT part of the device's |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 245 | native security countermeasure to transition to this state. |
| 246 | </td> |
| 247 | </tr> |
| 248 | <tr> |
| 249 | <td>INVALID</td> |
| 250 | <td>OTP</td> |
| 251 | <td> |
| 252 | |
| 253 | Invalid is any combination of OTP values that do not fall in the categories |
Scott Johnson | 19092fe | 2020-10-14 16:15:42 -0700 | [diff] [blame] | 254 | above. It is the "default" state of life cycle when no other conditions match. |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 255 | |
| 256 | Functionally, INVALID is identical to SCRAP in that no functions are allowed |
| 257 | and no transitions are allowed. |
| 258 | |
| 259 | A user is not able to explicitly transition into INVALID (unlike SCRAP), |
| 260 | instead, INVALID is meant to cover in-field corruptions, failures or active |
| 261 | attacks. |
| 262 | </td> |
| 263 | </tr> |
| 264 | </table> |
| 265 | |
| 266 | The various functionalities controlled by life cycle states can be broken into |
| 267 | the following categories: |
| 268 | |
| 269 | * DFT Functionality |
| 270 | * Refers to the ability to run any DFT function. (In this context, DFT |
| 271 | functions include scan-based manufacturing testing, etc., as opposed to |
| 272 | JTAG-based CPU debug.) |
| 273 | * NVM backdoor access |
| 274 | * Certain NVM modules can be backdoor accessed from alternate paths |
| 275 | * For example, there may be a functional bit-banging path that |
| 276 | bypasses the normal protection controls. |
| 277 | * For example, there may be a pin connected path used to debug the NVM |
| 278 | modules meant only for critical debug. |
| 279 | * If these paths are DFT-based, they are absorbed into the category above |
| 280 | * Debug |
| 281 | * Refers to both invasive CPU debug (JTAG) and non-invasive system debug |
| 282 | (debug output bus or analog test points) |
| 283 | * CPU Functionality |
| 284 | * Refers to the ability to run ROM or any custom code |
| 285 | |
| 286 | In addition, the life cycle states are mixed into the key manager, ensuring that |
| 287 | each state will diversify into a different key tree. |
| 288 | |
| 289 | The table below summarizes the availability of various functions in each state. |
| 290 | A `"Y"` mark means the function is directly enabled by hardware during that |
| 291 | state. A `"grey"` box means a particular function is not available during that |
| 292 | state. |
| 293 | |
| 294 | <table style="text-align:center"> |
| 295 | <tr> |
| 296 | <td style="text-align:left"><strong>Functions</strong></td> |
Michael Schaffner | e9c8aaf | 2020-11-05 19:22:31 -0800 | [diff] [blame] | 297 | <td><strong>DFT_EN</strong></td> |
| 298 | <td><strong>NVM_DEBUG_EN</strong></td> |
| 299 | <td><strong>HW_DEBUG_EN</strong></td> |
| 300 | <td><strong>CPU_EN</strong></td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 301 | <td><strong>Change State</strong></td> |
| 302 | </tr> |
| 303 | <tr> |
| 304 | <td style="text-align:left">RAW</td> |
| 305 | <td colspan="4" style="background:#dadce0"> </td> |
| 306 | <td rowspan="7" >See table below</td> |
| 307 | </tr> |
| 308 | <tr> |
| 309 | <td style="text-align:left">TEST_LOCKED</td> |
| 310 | <td colspan="4" style="background:#dadce0"> </td> |
| 311 | </tr> |
| 312 | <tr> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 313 | <td style="text-align:left">TEST_UNLOCKED</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 314 | <td>Y</td><td>Y</td><td>Y</td><td>Y</td> |
| 315 | </tr> |
| 316 | <tr> |
| 317 | <td style="text-align:left">DEV</td> |
| 318 | <td colspan="2" style="background:#dadce0"> </td><td>Y</td><td>Y</td> |
| 319 | </tr> |
| 320 | <tr> |
| 321 | <td style="text-align:left">PROD</td> |
| 322 | <td colspan="3" style="background:#dadce0"> </td><td>Y</td> |
| 323 | </tr> |
| 324 | <tr> |
| 325 | <td style="text-align:left">PROD_END</td> |
| 326 | <td colspan="3" style="background:#dadce0"> </td><td>Y</td> |
| 327 | </tr> |
| 328 | <tr> |
| 329 | <td style="text-align:left">RMA</td> |
| 330 | <td>Y</td><td>Y</td><td>Y</td><td>Y</td> |
| 331 | </tr> |
| 332 | <tr> |
| 333 | <td style="text-align:left">SCRAP</td> |
| 334 | <td colspan="5" style="background:#dadce0"> </td> |
| 335 | </tr> |
| 336 | <tr> |
| 337 | <td style="text-align:left">INVALID</td> |
| 338 | <td colspan="5" style="background:#dadce0"> </td> |
| 339 | </tr> |
| 340 | </table> |
| 341 | |
| 342 | The following table shows the allowed state transitions in each state. INVALID |
| 343 | state is not an explicit transition destination, therefore it is not listed as |
| 344 | one of the target states. The `"C"` marks represent conditional transitions |
| 345 | qualified by the token table that follows. |
| 346 | |
| 347 | <table style="text-align:center"> |
| 348 | <tr> |
| 349 | <td style="text-align:left"><strong>States</strong></td> |
| 350 | <td><strong>RAW</strong></td> |
| 351 | <td><strong>TEST LOCKED</strong></td> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 352 | <td><strong>TEST_UNLOCKED</strong></td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 353 | <td><strong>DEV</strong></td> |
| 354 | <td><strong>PROD</strong></td> |
| 355 | <td><strong>PROD_END</strong></td> |
| 356 | <td><strong>RMA</strong></td> |
| 357 | <td><strong>SCRAP</strong></td> |
| 358 | </tr> |
| 359 | <tr> |
| 360 | <td style="text-align:left">RAW</td> |
| 361 | <td colspan="2" style="background:#dadce0"> </td><td>C</td><td colspan="4" style="background:#dadce0"> </td><td>Y</td> |
| 362 | </tr> |
| 363 | <tr> |
| 364 | <td style="text-align:left">TEST_LOCKED</td> |
| 365 | <td colspan="2" style="background:#dadce0"> </td><td>C</td><td>C</td><td>C</td><td>C</td><td style="background:#dadce0"> </td><td>Y</td> |
| 366 | </tr> |
| 367 | <tr> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 368 | <td style="text-align:left">TEST_UNLOCKED</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 369 | <td style="background:#dadce0"> </td><td>Y</td><td style="background:#dadce0"> </td><td>C</td><td>C</td><td>C</td><td>Y</td><td>Y</td> |
| 370 | </tr> |
| 371 | <tr> |
| 372 | <td style="text-align:left">DEV</td> |
| 373 | <td colspan="6" style="background:#dadce0"> </td><td>C</td><td>Y</td> |
| 374 | </tr> |
| 375 | <tr> |
| 376 | <td style="text-align:left">PROD</td> |
| 377 | <td colspan="6" style="background:#dadce0"> </td><td>C</td><td>Y</td> |
| 378 | </tr> |
| 379 | <tr> |
| 380 | <td style="text-align:left">PROD_END</td> |
| 381 | <td colspan="7" style="background:#dadce0"> </td><td>Y</td> |
| 382 | </tr> |
| 383 | <tr> |
| 384 | <td style="text-align:left">RMA</td> |
| 385 | <td colspan="7" style="background:#dadce0"> </td><td>Y</td> |
| 386 | </tr> |
| 387 | <tr> |
| 388 | <td style="text-align:left">SCRAP</td> |
| 389 | <td colspan="8" style="background:#dadce0"> </td> |
| 390 | </tr> |
| 391 | <tr> |
| 392 | <td style="text-align:left">INVALID</td> |
| 393 | <td colspan="8" style="background:#dadce0"> </td> |
| 394 | </tr> |
| 395 | </table> |
| 396 | |
| 397 | The following table enumerates the tokens and their properties. The storage |
| 398 | format is implementation specific. |
| 399 | |
| 400 | <table style="text-align:center"> |
| 401 | <tr> |
| 402 | <td><strong style="text-align:left">Token</strong></td> |
| 403 | <td><strong>Storage</strong></td> |
| 404 | <td><strong>Device Unique?</strong></td> |
| 405 | <td><strong>Usage</strong></td> |
| 406 | </tr> |
| 407 | <tr> |
| 408 | <td style="text-align:left">RAW_UNLOCK</td> |
| 409 | <td>RTL</td> |
| 410 | <td>No</td> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 411 | <td>From RAW->TEST_UNLOCKED0</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 412 | </tr> |
| 413 | <tr> |
| 414 | <td style="text-align:left">TEST_UNLOCK</td> |
| 415 | <td>OTP</td> |
| 416 | <td>Silicon creator choice</td> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 417 | <td>From TEST_LOCKED{N} to TEST_UNLOCKED{N}</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 418 | </tr> |
| 419 | <tr> |
| 420 | <td style="text-align:left">TEST_EXIT</td> |
| 421 | <td>OTP</td> |
| 422 | <td>Silicon creator choice</td> |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 423 | <td>From any TEST_UNLOCKED state to DEV, PROD_END or PROD</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 424 | </tr> |
| 425 | <tr> |
| 426 | <td style="text-align:left">RMA_UNLOCK</td> |
| 427 | <td>OTP</td> |
| 428 | <td>Yes</td> |
| 429 | <td>From PROD/DEV to RMA</td> |
| 430 | </tr> |
| 431 | </table> |
| 432 | |
| 433 | #### RMA Unlock |
| 434 | |
| 435 | When in either PROD or DEV state, the device can be transitioned into RMA state |
| 436 | to re-enable full debug functionality. |
| 437 | |
| 438 | A device unique RMA token is required to enter RMA. This RMA token is under the |
| 439 | control of the Silicon Creator. To prevent abuse of this authority, the current |
| 440 | manufacturing state is mixed by hardware directly into the key manager. This |
| 441 | ensures that the Silicon Creator cannot arbitrarily put a device into RMA mode |
| 442 | and impersonate a victim silicon owner. It also ensures that the Silicon Creator |
| 443 | cannot accidentally leak any content wrapped by the owner under key manager, as |
| 444 | the keys can never be re-created. |
| 445 | |
| 446 | Further, before transitioning to RMA, a hardware backed mechanism will erase all |
| 447 | existing owner content in flash. In addition to the key manager mixing above, |
Scott Johnson | 19092fe | 2020-10-14 16:15:42 -0700 | [diff] [blame] | 448 | this wipe further limits the Creator's ability to abuse the existing device. |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 449 | |
| 450 | ### Identity & Ownership States |
| 451 | |
| 452 | <table> |
| 453 | <tr> |
| 454 | <td><strong>Name</strong></td> |
| 455 | <td><strong>Encoding</strong></td> |
| 456 | <td><strong>Description</strong></td> |
| 457 | </tr> |
| 458 | <tr> |
| 459 | <td>BLANK</td> |
| 460 | <td>OTP</td> |
| 461 | <td> |
| 462 | |
| 463 | Initial identity and ownership state. There is no hardware identity or |
| 464 | ownership provisioned |
| 465 | </td> |
| 466 | </tr> |
| 467 | <tr> |
| 468 | <td>CREATOR<br>PERSONALIZED</td> |
| 469 | <td>OTP</td> |
| 470 | <td> |
| 471 | |
| 472 | The hardware relevant information has been provisioned. This includes: |
| 473 | |
| 474 | * RMA_UNLOCK Token |
| 475 | * Creator Root Key |
| 476 | * Creator Diversification Key |
| 477 | |
| 478 | Once the identity state advances to CREATOR_PERSONALIZED, creator provisioned |
| 479 | secrets (see Identity flow) are no longer accessible to software and are |
| 480 | directly consumed by hardware. |
| 481 | </td> |
| 482 | </tr> |
| 483 | <tr> |
Drew Macrae | 93536cd | 2021-07-17 13:32:52 -0700 | [diff] [blame] | 484 | <td>UNLOCKED_OWNERSHIP</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 485 | <td>Flash</td> |
| 486 | <td> |
| 487 | |
| 488 | This state represents a device which contains a Creator Identity but does not |
| 489 | yet have a Silicon Owner provisioned. |
| 490 | |
| 491 | Since this state is software managed, software is free to define a different |
| 492 | state. |
| 493 | </td> |
| 494 | </tr> |
| 495 | <tr> |
Drew Macrae | 93536cd | 2021-07-17 13:32:52 -0700 | [diff] [blame] | 496 | <td>LOCKED_OWNERSHIP</td> |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 497 | <td>Flash</td> |
| 498 | <td> |
| 499 | |
| 500 | This state represents a device which contains both a Creator Identity and a |
| 501 | Silicon Owner. |
| 502 | |
Drew Macrae | 93536cd | 2021-07-17 13:32:52 -0700 | [diff] [blame] | 503 | A device in the LOCKED_OWNERSHIP state can transition back to UNLOCKED_OWNERSHIP when it is explicitly |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 504 | unbound. The unbinding process is described separately. |
| 505 | |
| 506 | Since this state is software managed, software is free to define a different |
| 507 | state. |
| 508 | </td> |
| 509 | </tr> |
| 510 | <tr> |
| 511 | <td>EOL</td> |
| 512 | <td>Flash</td> |
| 513 | <td> |
| 514 | |
| 515 | This state represents a device that has reached its identity EOL. |
| 516 | |
| 517 | Since this state is software managed, software is free to define a different |
| 518 | state. |
| 519 | </td> |
| 520 | </tr> |
| 521 | </table> |
| 522 | |
| 523 | ### States and Isolation Properties |
| 524 | |
| 525 | The manufacturing state is used as part of the key generation and derivation |
| 526 | process. (Please see key manager and life cycle implementation for more |
| 527 | details). By doing this, the device ensures that states with invasive debug |
| 528 | capabilities, typically used for debug, manufacturing testing and RMA, cannot be |
| 529 | used to expose device secrets during mission mode. |
| 530 | |
| 531 | The identity states are not used as part of the key generation process. Instead |
| 532 | they are used as metadata to control software accessibility to the OTP |
| 533 | partitions used to hold device unique secrets provisioned during manufacturing. |
| 534 | |
| 535 | * When identity state is BLANK, software can access the relevant OTP |
| 536 | partitions |
| 537 | * When identity state is PERSONALIZED, software can no longer access the |
| 538 | relevant OTP partitions |
| 539 | |
| 540 | Please see life cycle and OTP implementation for more details |
| 541 | |
| 542 | ### State Conditionals |
| 543 | |
| 544 | Entry into RMA should be conditioned upon application of the RMA\_UNLOCK token. |
| 545 | |
| 546 | Entry into TERMINATED / SCRAP is unconditional. If the correct command is |
| 547 | presented, the transition shall not be stopped. |
| 548 | |
| 549 | ### State Dependencies |
| 550 | |
| 551 | There is one manufacturing and identity state dependency. |
| 552 | |
Michael Schaffner | 27bf569 | 2020-11-04 09:37:10 -0800 | [diff] [blame] | 553 | * When the manufacturing state is **RAW** or **TEST_UNLOCKED**, the provisioning of |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 554 | creator entropy is disabled and identity state SHALL be **BLANK.** |
| 555 | * Once manufacturing state transitions to **DEV / PROD / PROD\_END**, |
| 556 | provisioning is then enabled and the identity state is allowed to transition |
| 557 | from **BLANK**. |
| 558 | |
| 559 | ## Functionality not Supported |
| 560 | |
| 561 | #### PROD Volatile Debug Unlock |
| 562 | |
| 563 | There will be no debug unlock after the device enters production states. To |
| 564 | properly implement volatile debug unlock, the debug period must be both time |
| 565 | bound and power cycle bound. This means that in ROM or ROM\_ext, we are required |
| 566 | to setup functionality in non-volatile storage to track how many times the |
| 567 | device has been rebooted and a locked timer to check how long the device has |
| 568 | been alive. Additionally, in order to ensure that the same debug payload is not |
| 569 | replayed, it must be signed through a challenge-response scheme where the device |
| 570 | must first provide a nonce and then verify the signed payload. |
| 571 | |
| 572 | Lastly, when debug unlock is granted, the device can be hijacked by an external |
| 573 | entity without the processor being aware; this makes it too dangerous a |
| 574 | functionality to exist in PROD. |
| 575 | |
| 576 | ## Compatibility with Standards and Protection Profiles |
| 577 | |
| 578 | ### Security IC Platform Protection Profile with Augmentation Packages |
| 579 | |
Scott Johnson | 19092fe | 2020-10-14 16:15:42 -0700 | [diff] [blame] | 580 | OpenTitan's Device Life Cycle design may support the PP084 TOE[^3] life cycle |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 581 | phase requirements including the composite product life cycle phases. |
| 582 | |
| 583 | The list of TOE life cycle phases is available here for reference, See |
| 584 | [BSI-CC-PP-0084-2014 section 1.2.3](https://www.commoncriteriaportal.org/files/ppfiles/pp0084b_pdf.pdf) |
| 585 | for more details. |
| 586 | |
| 587 | <table> |
| 588 | <tr> |
| 589 | <td><strong>TOE<br>Manufacturer</strong></td> |
| 590 | <td><strong>Composite</strong><br><strong>Manufacturer</strong></td> |
| 591 | <td><strong>Life Cycle Phase</strong></td> |
| 592 | <td><strong>Entity</strong></td> |
| 593 | </tr> |
| 594 | <tr> |
| 595 | <td> </td> |
| 596 | <td style="text-align:center">Y</td> |
| 597 | <td>1: Embedded Software Development</td> |
| 598 | <td>IC Embedded Software Developer</td> |
| 599 | </tr> |
| 600 | <tr> |
| 601 | <td style="text-align:center">Y</td> |
| 602 | <td> </td> |
| 603 | <td>2: IC Development</td> |
| 604 | <td>IC Developer</td> |
| 605 | </tr> |
| 606 | <tr> |
| 607 | <td style="text-align:center">Y</td> |
| 608 | <td> </td> |
| 609 | <td>3: IC Manufacturing</td> |
| 610 | <td>IC Manufacturer</td> |
| 611 | </tr> |
| 612 | <tr> |
| 613 | <td colspan="2" style="text-align:center">Y</td> |
| 614 | <td>4: IC Packaging</td> |
| 615 | <td>IC Packaging Manufacturer</td> |
| 616 | </tr> |
| 617 | <tr> |
| 618 | <td> </td> |
| 619 | <td style="text-align:center">Y</td> |
| 620 | <td>5: Composite Product Integration</td> |
| 621 | <td>Composite Product<br>Integrator</td> |
| 622 | </tr> |
| 623 | <tr> |
| 624 | <td> </td> |
| 625 | <td style="text-align:center">Y</td> |
| 626 | <td>6: Personalisation</td> |
| 627 | <td>Personaliser</td> |
| 628 | </tr> |
| 629 | <tr> |
| 630 | <td> </td> |
| 631 | <td style="text-align:center">Y</td> |
| 632 | <td> </td> |
| 633 | <td>Composite Product Issuer</td> |
| 634 | </tr> |
| 635 | <tr> |
| 636 | <td> </td> |
| 637 | <td> </td> |
| 638 | <td>7: Operational Usage </td> |
| 639 | <td>Consumer of Composite<br>Product (End-consumer)</td> |
| 640 | </tr> |
| 641 | </table> |
| 642 | |
| 643 | <!-- Footnotes themselves at the bottom. --> |
| 644 | |
| 645 | ## Notes |
| 646 | |
Scott Johnson | 19092fe | 2020-10-14 16:15:42 -0700 | [diff] [blame] | 647 | [^1]: RMA ("Return Material Authorization") refers to the process in which a |
Miguel Osorio | 3ee47a6 | 2020-08-05 19:48:10 -0700 | [diff] [blame] | 648 | device is returned to the Silicon Creator for more triage and debugging. |
| 649 | It represents a terminal state of the device, as it cannot be returned to |
| 650 | production afterwards. |
| 651 | |
| 652 | [^2]: One Time Programmable Memory |
| 653 | |
| 654 | [^3]: "Security IC Platform Protection Profile with Augmentation Packages |
| 655 | (BSI-CC-PP-0084-2014)" |
| 656 | https://www.commoncriteriaportal.org/files/ppfiles/pp0084b_pdf.pdf. |