Hardware Interfaces

Referring to the Comportable guideline for peripheral device functionality, the module otbn has the following hardware interfaces defined

  • Primary Clock: clk_i
  • Other Clocks: clk_edn_i, clk_otp_i
  • Bus Device Interfaces (TL-UL): tl
  • Bus Host Interfaces (TL-UL): none
  • Peripheral Pins for Chip IO: none

Inter-Module Signals

Port NamePackage::StructTypeActWidthDescription
otbn_otp_keyotp_ctrl_pkg::otbn_otp_keyreq_rspreq1
edn_rndedn_pkg::ednreq_rspreq1
edn_urndedn_pkg::ednreq_rspreq1
idleprim_mubi_pkg::mubi4unireq1
ram_cfgprim_ram_1p_pkg::ram_1p_cfgunircv1
lc_escalate_enlc_ctrl_pkg::lc_txunircv1
lc_rma_reqlc_ctrl_pkg::lc_txunircv1
lc_rma_acklc_ctrl_pkg::lc_txunireq1
keymgr_keykeymgr_pkg::otbn_key_requnircv1
tltlul_pkg::tlreq_rsprsp1

Interrupts

Interrupt NameTypeDescription
doneEventOTBN has completed the operation.

Security Alerts

Alert NameDescription
fatalA fatal error. Fatal alerts are non-recoverable and will be asserted until a hard reset.
recovA recoverable error. Just sent once (as the processor stops).

Security Countermeasures

Countermeasure IDDescription
OTBN.MEM.SCRAMBLEBoth the imem and dmem are scrambled by using prim_ram_1p_scr.
OTBN.DATA.MEM.INTEGRITYDmem is protected with ECC integrity. This is carried through to OTBN’s register file.
OTBN.INSTRUCTION.MEM.INTEGRITYImem is protected with ECC integrity. This is carried through into OTBN’s execute stage.
OTBN.BUS.INTEGRITYEnd-to-end bus integrity scheme.
OTBN.CONTROLLER.FSM.GLOBAL_ESCThe controller FSM moves to a terminal error state upon global escalation.
OTBN.CONTROLLER.FSM.LOCAL_ESCThe controller FSM moves to a terminal error state upon local escalation. Can be triggered by CONTROLLER.FSM.SPARSE, SCRAMBLE_CTRL.FSM.SPARSE, and START_STOP_CTRL.FSM.SPARSE.
OTBN.CONTROLLER.FSM.SPARSEThe controller FSM uses a sparse state encoding.
OTBN.SCRAMBLE.KEY.SIDELOADThe scrambling key is sideloaded from OTP and thus unreadable by SW.
OTBN.SCRAMBLE_CTRL.FSM.LOCAL_ESCThe scramble control FSM moves to a terminal error state upon local escalation. Can be triggered by SCRAMBLE_CTRL.FSM.SPARSE.
OTBN.SCRAMBLE_CTRL.FSM.SPARSEThe scramble control FSM uses a sparse state encoding.
OTBN.START_STOP_CTRL.FSM.GLOBAL_ESCThe start-stop control FSM moves to a terminal error state upon global escalation.
OTBN.START_STOP_CTRL.FSM.LOCAL_ESCThe start-stop control FSM moves to a terminal error state upon local escalation. Can be triggered by START_STOP_CTRL.FSM.SPARSE.
OTBN.START_STOP_CTRL.FSM.SPARSEThe start-stop control FSM uses a sparse state encoding.
OTBN.DATA_REG_SW.SCABlanking of bignum data paths when unused by the executing instruction.
OTBN.CTRL.REDUNCheck pre-decoded control matches separately decoded control from main decoder. This includes control signals used for blanking, pushing/popping the call stack, controlling loop and branch/jump instructions, as well as the actual branch target.
OTBN.PC.CTRL_FLOW.REDUNCheck prefetch stage PC and execute stage PC match. The prefetch stage and execute stage store their PC’s separately and have separate increment calculations.
OTBN.RND.BUS.CONSISTENCYComparison on successive bus values received over the EDN RND interface.
OTBN.RND.RNG.DIGESTChecking that the random numbers received over the EDN RND interface have not been generated from entropy that failed the FIPS health checks in the entropy source.
OTBN.RF_BASE.DATA_REG_SW.INTEGRITYRegister file is protected with ECC integrity.
OTBN.RF_BASE.DATA_REG_SW.GLITCH_DETECTThis countermeasure checks for spurious write-enable signals on the register file by monitoring the one-hot0 property of the individual write-enable strobes.
OTBN.STACK_WR_PTR.CTR.REDUNThe write pointer of the stack (used for calls and loops) is redundant. If the two instances of the counter mismatch, an error is emitted.
OTBN.RF_BIGNUM.DATA_REG_SW.INTEGRITYRegister file is protected with ECC integrity.
OTBN.RF_BIGNUM.DATA_REG_SW.GLITCH_DETECTThis countermeasure checks for spurious write-enable signals on the register file by monitoring the one-hot0 property of the individual write-enable strobes.
OTBN.LOOP_STACK.CTR.REDUNThe iteration counter of each entry in the loop step uses cross counts via prim_count.
OTBN.LOOP_STACK.ADDR.INTEGRITYLoop start and end address on the loop stack are protected with ECC integrity.
OTBN.CALL_STACK.ADDR.INTEGRITYCall stack entries are protected with ECC integrity.
OTBN.START_STOP_CTRL.STATE.CONSISTENCYThe secure wipe handshake between otbn_controller and otbn_start_stop_control uses a level-based req/ack interface. At the otbn_controller end, there is a check for unexpected acks. In otbn_start_stop_control, there is a check for secure wipe requests when we aren’t in a state that allows it, and also a check for if the request drops at an unexpected time.
OTBN.DATA.MEM.SEC_WIPERotate the scrambling key, effectively wiping the dmem. Initiated on command, upon fatal errors and before RMA entry.
OTBN.INSTRUCTION.MEM.SEC_WIPERotate the scrambling key, effectively wiping the imem. Initiated on command, upon fatal errors and before RMA entry.
OTBN.DATA_REG_SW.SEC_WIPESecurely wipe programmer visible OTBN register (GPRs, WDRs, CSRs, WSRs) state with random data. Initiated after reset, at the end of any OTBN operation, upon recoverable and fatal errors, and before RMA entry.
OTBN.WRITE.MEM.INTEGRITYA software visible checksum is calculated for all dmem and imem writes
OTBN.CTRL_FLOW.COUNTA software visible count of instructions executed
OTBN.CTRL_FLOW.SCAOTBN architecture does not have any data dependent timing behaviour
OTBN.DATA.MEM.SW_NOACCESSA portion of DMEM is invisible to CPU software
OTBN.KEY.SIDELOADKeys can be sideloaded without exposing them to the CPU
OTBN.TLUL_FIFO.CTR.REDUNThe TL-UL response FIFO pointers are implemented with duplicate counters.

Hardware Interface Requirements

OTBN connects to other components in an OpenTitan system. This section lists requirements on those interfaces that go beyond the physical connectivity.

Entropy Distribution Network (EDN)

OTBN has two EDN connections: edn_urnd and edn_rnd. What kind of randomness is provided on the EDN connections is configurable at runtime, but unknown to OTBN. To maintain its security properties, OTBN requires the following configuration for the two EDN connections:

  • OTBN has no specific requirements on the randomness drawn from edn_urnd. For performance reasons, requests on this EDN connection should be answered quickly.
  • edn_rnd must provide AIS31-compliant class PTG.3 random numbers. The randomness from this interface is made available through the RND WSR and intended to be used for key generation.

Life Cycle Controller (LC_CTRL)

OTBN has three LC_CTRL connections: one for triggering life cycle escalation requests (lc_escalate_en) and two for handling RMA entry (lc_rma_req/ack).

As LC_CTRL might sit in a different clock domain and since all these connections are using multi-bit signals, OTBN might observe staggered signal transitions due to the clock domain crossings. To avoid spurious life cycle escalations and to enable reliable RMA entry, it should be ensured that:

  • The lc_escalate_en and lc_rma_req inputs are stably driven to lc_ctrl_pkg::Off before releasing the reset of OTBN.
  • When triggering RMA entry, the lc_rma_req input switches from lc_ctrl_pkg::Off to lc_ctrl_pkg::On exactly once, and then remains On until OTBN signals completion of the secure wipe operation with the lc_rma_ack output switching to lc_ctrl_pkg::On.