WEBVTT

1
00:00:00.000 --> 00:00:04.500
The controller is checking an unauthorized image.

2
00:00:04.500 --> 00:00:12.500
Its six-bit state changes from CHECK to RELEASE
without a completed authorization.

3
00:00:12.500 --> 00:00:14.580
The new code is legal.

4
00:00:14.580 --> 00:00:18.660
A state decoder recognizes it and opens the gate.

5
00:00:18.660 --> 00:00:22.100
We first count which substitutions can do that.

6
00:00:23.180 --> 00:00:28.800
A finite-state machine, FSM, stores its current
phase in a register.

7
00:00:29.292 --> 00:00:37.052
Sparse encoding assigns a small set of legal
values within a larger bit space.

8
00:00:37.052 --> 00:00:44.732
The unassigned values are useful only if the
implementation recognizes them and rejects unsafe

9
00:00:44.732 --> 00:00:45.192
outputs.

10
00:00:45.192 --> 00:01:08.452
Our original six-bit map is WAIT=000000,
CHECK=001111, RELEASE=110011 and ERROR=111100.

11
00:01:08.452 --> 00:01:12.712
All six distinct state pairs differ in four bits.

12
00:01:12.712 --> 00:01:20.152
Checking only CHECK-to-RELEASE would miss a
closer pair elsewhere; the minimum must cover the

13
00:01:20.152 --> 00:01:21.012
entire map.

14
00:01:21.912 --> 00:01:29.712
One, two or three stored-bit flips cannot turn
any named state into another named state in this

15
00:01:29.712 --> 00:01:30.312
map.

16
00:01:30.312 --> 00:01:32.712
They produce invalid values.

17
00:01:32.712 --> 00:01:36.312
Four flips can reach another valid state.

18
00:01:36.312 --> 00:01:42.532
Distance therefore supports a bounded
substitution claim when the legality check and

19
00:01:42.532 --> 00:01:44.492
output gate remain trusted.

20
00:01:45.292 --> 00:01:51.452
A default branch that sends the next state to
ERROR runs after the current accepting edge.

21
00:01:52.042 --> 00:02:00.662
If an unsafe output decoder already permits an
invalid current state, next-cycle recovery is too

22
00:02:00.662 --> 00:02:02.042
late.

23
00:02:02.042 --> 00:02:10.862
Decode RELEASE with full equality and let present
invalid state suppress the same accepting edge.

24
00:02:12.002 --> 00:02:16.522
Our small decoder grants only state==RELEASE.

25
00:02:16.522 --> 00:02:22.162
Invalid states are reported separately as bad.

26
00:02:22.162 --> 00:02:29.022
A sticky flag could record them for later
recovery; it cannot replace current blocking.

27
00:02:29.022 --> 00:02:37.182
In this specific decoder equality already rejects
invalid states, so do not claim a second gate

28
00:02:37.182 --> 00:02:39.002
independently adds coverage.

29
00:02:40.162 --> 00:02:45.422
An encoding constant in RTL does not prove that
synthesis preserves it.

30
00:02:45.422 --> 00:02:52.262
Examine recoding, register width and output cones
in the produced netlist.

31
00:02:52.262 --> 00:02:59.342
OpenTitan provides a primitive flop wrapper for
sparse FSM storage; its assertions and

32
00:02:59.342 --> 00:03:04.402
instantiation do not by themselves prove a
complete controller secure.

33
00:03:05.302 --> 00:03:08.602
The main experiment begins with a captured CHECK.

34
00:03:09.062 --> 00:03:15.302
One event XORs its six stored bits before
accepting edge 1.

35
00:03:15.302 --> 00:03:18.382
All sixty-four masks are examined.

36
00:03:18.382 --> 00:03:21.282
The reference image is unauthorized.

37
00:03:21.282 --> 00:03:27.402
The state decoder, source, clock/reset and final
consumer remain trusted.

38
00:03:28.302 --> 00:03:39.322
Mask 111100, hexadecimal 3c, changes 001111 into
110011.

39
00:03:39.322 --> 00:03:45.302
The decoder sees valid RELEASE, bad stays false
and the request commits.

40
00:03:45.302 --> 00:03:47.602
That mask affects four bits.

41
00:03:47.602 --> 00:03:52.722
It lies outside a three-bit claim and inside a
four-bit expanded budget.

42
00:03:53.602 --> 00:03:58.622
The optional bind policy also requires
independent authorization.

43
00:03:58.622 --> 00:04:02.742
It blocks this valid-state witness because the
current image lacks permission.

44
00:04:02.742 --> 00:04:07.202
The model supplies that value from a trusted
harness.

45
00:04:07.202 --> 00:04:13.042
The exercise identifies the missing condition; a
real design must establish its provenance and

46
00:04:13.042 --> 00:04:13.502
integrity.

47
00:04:14.262 --> 00:04:17.382
Select CHECK, mask 1 and no binding.

48
00:04:17.812 --> 00:04:22.412
The result is invalid and commit is false.

49
00:04:22.412 --> 00:04:25.592
Try masks of weight two or three.

50
00:04:25.592 --> 00:04:30.692
Then enter 60, the decimal form of 0x3c.

51
00:04:30.692 --> 00:04:37.072
The displayed code becomes RELEASE and the
request is accepted.

52
00:04:37.072 --> 00:04:39.152
Save this trace beside the state map.

53
00:04:40.292 --> 00:04:46.252
The executed campaign checked every mask from
CHECK and every state-pair distance.

54
00:04:46.252 --> 00:04:53.312
Exactly one of the sixty-four CHECK masks reached
unauthorized RELEASE.

55
00:04:53.312 --> 00:04:59.092
Other four-bit masks can reach WAIT or ERROR and
still remain legal.

56
00:04:59.092 --> 00:05:03.152
No-commit traces therefore must not all be
labeled detected.

57
00:05:04.012 --> 00:05:12.232
Set RELEASE, authorization true, binding true and
mask zero for the positive decoder control.

58
00:05:12.232 --> 00:05:19.232
Lesson 8 separately runs a normal
WAIT-to-CHECK-to-RELEASE transaction.

59
00:05:19.232 --> 00:05:25.632
A decoder control alone does not show the full
controller reaches release or that its transition

60
00:05:25.632 --> 00:05:27.012
conditions are authentic.

61
00:05:27.603 --> 00:05:33.403
The RTL/SVA sketch has not been compiled.

62
00:05:33.403 --> 00:05:40.943
ERROR reachability, output decode failures, scan
access and synthesis recoding are separate

63
00:05:40.943 --> 00:05:42.643
obligations.

64
00:05:42.643 --> 00:05:50.563
Revisit lesson 4 and its separate grant target to
test a corrupted post-decoder output; this

65
00:05:50.563 --> 00:05:53.743
storage-only campaign excludes that target.

66
00:05:53.743 --> 00:06:00.783
A minimum distance of four says nothing about a
faulty CHECK condition choosing a legal next

67
00:06:00.783 --> 00:06:01.603
state.

68
00:06:01.603 --> 00:06:03.163
That is the next lesson.

69
00:06:03.562 --> 00:06:13.222
One six-bit state XOR before edge 1, all
sixty-four masks from CHECK; distance claim

70
00:06:13.222 --> 00:06:16.502
limited to weight below four.

71
00:06:16.502 --> 00:06:19.062
Other logic and reference remain trusted.

72
00:06:20.042 --> 00:06:28.542
Node checked all pair distances and sixty-four
CHECK masks, plus authorized RELEASE decoding.

73
00:06:28.542 --> 00:06:30.922
Normal flow is tested in lesson 8.

74
00:06:31.342 --> 00:06:40.102
No transition, netlist, scan, physical or formal
result follows from this decoder enumeration.

