WEBVTT

1
00:00:00.000 --> 00:00:07.140
These sixteen bytes form one plaintext block,
alongside a sixteen-byte key.

2
00:00:07.140 --> 00:00:13.140
AES one twenty eight begins by exclusive oring
them, then runs ten rounds to produce a block of

3
00:00:13.140 --> 00:00:14.380
the same length.

4
00:00:14.380 --> 00:00:21.360
AES one ninety two and two fifty six use larger
keys and more rounds, with the same block size.

5
00:00:21.360 --> 00:00:27.160
This is a teaching architecture for single-block
encryption, without a claim of RTL or silicon

6
00:00:27.160 --> 00:00:28.500
validation.

7
00:00:28.500 --> 00:00:31.380
Decryption and message modes lie beyond this
path.

8
00:00:32.160 --> 00:00:37.820
Once accepted, the plaintext is stored in state
so the source can move on.

9
00:00:37.820 --> 00:00:43.660
The datapath calculates its next value, the key
path supplies this round's key, and the

10
00:00:43.660 --> 00:00:46.860
controller selects the capturing edge.

11
00:00:46.860 --> 00:00:51.980
Combinational logic responds after the edge
rather than waiting for another clock to start

12
00:00:51.980 --> 00:00:53.040
calculating.

13
00:00:53.040 --> 00:00:55.360
Its output must settle before capture.

14
00:00:55.360 --> 00:01:01.560
The controller still has to track completion; the
byte values cannot tell it which phase comes

15
00:01:01.560 --> 00:01:01.960
next.

16
00:01:02.840 --> 00:01:08.520
Each round writes back to one state register and
reuses the same round circuit.

17
00:01:08.520 --> 00:01:12.220
Ten rounds therefore do not require ten hardware
copies.

18
00:01:12.220 --> 00:01:14.640
This is an iterative architecture.

19
00:01:14.640 --> 00:01:19.480
A round is an algorithmic step; a cycle is a
timing interval.

20
00:01:19.480 --> 00:01:21.260
We choose one round per cycle.

21
00:01:21.260 --> 00:01:27.800
Sharing fewer resources over time, or adding
pipeline registers, requires a revised controller

22
00:01:27.800 --> 00:01:28.180
schedule.

23
00:01:29.120 --> 00:01:34.600
B zero is the most significant input byte, placed
at row zero, column zero.

24
00:01:34.600 --> 00:01:36.560
B one goes downward.

25
00:01:36.560 --> 00:01:40.000
Fill four bytes into a column before moving to
the next.

26
00:01:40.000 --> 00:01:43.680
The index is four times column plus row.

27
00:01:43.680 --> 00:01:47.060
Keep this column-major convention through the
output mapping.

28
00:01:47.060 --> 00:01:51.160
Reading across rows midway changes the packed
order.

29
00:01:51.160 --> 00:01:54.360
Sixteen distinct labels make a misplaced
connection visible.

30
00:01:55.520 --> 00:02:00.380
After loading the plaintext, the initial phase
performs only AddRoundKey.

31
00:02:00.380 --> 00:02:06.320
Rounds one through nine follow SubBytes,
ShiftRows, MixColumns, then AddRoundKey.

32
00:02:06.320 --> 00:02:10.460
Round ten bypasses MixColumns and retains the
other steps.

33
00:02:10.460 --> 00:02:13.140
The controller must select the route and the key
together.

34
00:02:13.140 --> 00:02:21.920
Open the first normal round and follow which
transformations change byte values and which move

35
00:02:21.920 --> 00:02:22.660
their positions.

36
00:02:23.260 --> 00:02:30.680
SubBytes passes each byte through the same
nonlinear S box without moving it.

37
00:02:30.680 --> 00:02:35.240
Hexadecimal fifty three, for example, becomes E
D.

38
00:02:35.240 --> 00:02:42.020
Sixteen combinational S boxes can calculate in
parallel rather than making sixteen sequential

39
00:02:42.020 --> 00:02:43.560
lookups.

40
00:02:43.560 --> 00:02:50.720
A single shared S box needs intermediate storage
and scheduling, changing this one-round-per-cycle

41
00:02:50.720 --> 00:02:51.340
architecture.

42
00:02:51.340 --> 00:03:01.060
ShiftRows leaves row zero fixed and rotates the
other rows left by one, two, and three positions.

43
00:03:01.060 --> 00:03:07.420
Values stay unchanged, but different source bytes
now meet in each column.

44
00:03:07.420 --> 00:03:14.640
This fixed permutation can be wiring, without a
cycle for each movement or a variable shifter.

45
00:03:14.640 --> 00:03:20.720
Follow the labels along those connections before
the final ciphertext hides where each byte came

46
00:03:20.720 --> 00:03:20.960
from.

47
00:03:20.960 --> 00:03:28.280
MixColumns combines the four bytes within each
column, independently across the four columns.

48
00:03:28.280 --> 00:03:31.980
Every output depends on all four inputs.

49
00:03:31.980 --> 00:03:38.640
Its multiplications by two and three use a finite
field, and the transformation is reversible.

50
00:03:38.640 --> 00:03:41.900
It does not average or hash away the data.

51
00:03:41.900 --> 00:03:45.760
AES has no separate MixRows step.

52
00:03:45.760 --> 00:03:49.900
Inspect multiplication by two before connecting
the full column.

53
00:03:49.900 --> 00:03:55.520
Xtime shifts left and discards the outgoing high
bit.

54
00:03:55.520 --> 00:04:00.760
If that original bit was one, exclusive or with
hexadecimal one B.

55
00:04:00.760 --> 00:04:07.600
Fifty seven becomes A E without reduction; A E
becomes forty seven using it.

56
00:04:07.600 --> 00:04:13.380
Multiplication by three is xtime exclusive or the
original value.

57
00:04:13.380 --> 00:04:22.680
The column D B, thirteen, fifty three, forty five
should become eight E, four D, A one, B C.

58
00:04:22.680 --> 00:04:25.420
Compare these four output bytes first.

59
00:04:25.420 --> 00:04:31.140
A mismatch can come from the coefficients, field
arithmetic, or byte order, before all four

60
00:04:31.140 --> 00:04:32.080
columns are connected.

61
00:04:32.640 --> 00:04:39.000
AddRoundKey exclusive ors the state and round key
across all one hundred twenty eight bits.

62
00:04:39.000 --> 00:04:41.500
Both operands use the same byte mapping.

63
00:04:41.500 --> 00:04:47.780
Bits operate together without carry or one
hundred twenty eight sequential cycles.

64
00:04:47.780 --> 00:04:52.380
Fifty three exclusive or C A is ninety nine.

65
00:04:52.380 --> 00:04:58.440
The other transformations are public fixed rules;
this step connects key material to the datapath.

66
00:04:58.940 --> 00:05:07.580
The final round sends the ShiftRows result
directly to AddRoundKey, bypassing MixColumns.

67
00:05:07.580 --> 00:05:11.960
The other three steps remain, using K ten.

68
00:05:11.960 --> 00:05:18.040
A selector can bypass the shared circuit without
duplicating the entire round.

69
00:05:18.040 --> 00:05:22.560
A correct route with K nine still gives the wrong
ciphertext.

70
00:05:22.560 --> 00:05:27.620
Check what the counter selects in both paths,
rather than only its numeric value.

71
00:05:28.940 --> 00:05:33.540
Keep original K zero in its own register.

72
00:05:33.540 --> 00:05:37.560
The working key advances through the rounds to K
ten.

73
00:05:37.560 --> 00:05:41.060
Reload K zero for the next plaintext.

74
00:05:41.060 --> 00:05:47.660
Continuing from the previous K ten can leave the
first block correct and the second wrong.

75
00:05:47.660 --> 00:05:53.360
Two consecutive blocks with the same key
therefore test a lifetime boundary that a single

76
00:05:53.360 --> 00:05:54.760
vector cannot exercise.

77
00:05:55.780 --> 00:06:00.000
Split the key into four thirty two bit words.

78
00:06:00.000 --> 00:06:08.680
Rotate the last word's bytes, apply four S boxes
for SubWord, then exclusive or Rcon in the high

79
00:06:08.680 --> 00:06:09.340
byte.

80
00:06:09.340 --> 00:06:11.640
That produces temp.

81
00:06:11.640 --> 00:06:16.400
The first new word combines the old first word
with temp.

82
00:06:16.400 --> 00:06:21.480
Each following word combines its own old value
with the previous new word.

83
00:06:21.480 --> 00:06:26.040
This combinational chain derives the key locally.

84
00:06:26.040 --> 00:06:32.540
There are eleven keys, K zero through K ten, with
Rcon indexed from one through ten.

85
00:06:34.060 --> 00:06:38.740
The initial XOR uses K zero without advancing
working.

86
00:06:38.740 --> 00:06:43.440
At round r, the register still holds K r minus
one.

87
00:06:43.440 --> 00:06:49.960
Combinational expansion generates K r and feeds
it directly into this round's AddRoundKey.

88
00:06:49.960 --> 00:06:54.800
Capture the new state and key together at the
end.

89
00:06:54.800 --> 00:07:01.960
Connecting the old working register directly to
the XOR makes the key one round late; nonblocking

90
00:07:01.960 --> 00:07:04.040
assignments do not correct that connection.

91
00:07:04.980 --> 00:07:11.600
With the key loaded, E zero accepts plaintext and
E one performs the initial XOR.

92
00:07:11.600 --> 00:07:15.360
E two through E ten run the normal rounds.

93
00:07:15.360 --> 00:07:18.980
E eleven completes the final round and makes
output valid.

94
00:07:18.980 --> 00:07:25.960
Earliest transfer is E twelve, followed by input
at E thirteen: eleven cycles to valid and

95
00:07:25.960 --> 00:07:29.440
thirteen between unstalled transactions.

96
00:07:29.440 --> 00:07:34.640
This schedule uses sixteen data S boxes and four
key S boxes together.

97
00:07:34.640 --> 00:07:38.920
Synchronous memories or sharing fewer boxes
change the timing.

98
00:07:38.920 --> 00:07:43.600
Clock frequency remains an implementation result.

99
00:07:44.190 --> 00:07:50.210
The controller starts in NO KEY and enters READY
after loading a key.

100
00:07:50.210 --> 00:07:56.210
It separates initial, normal, final, and
output-holding phases.

101
00:07:56.210 --> 00:08:02.710
A round counter alone cannot express missing key
material or waiting for a receiver.

102
00:08:02.710 --> 00:08:06.330
Busy means the transaction remains unfinished.

103
00:08:06.330 --> 00:08:12.310
Completed ciphertext waiting for acceptance
therefore keeps busy high, until a transfer

104
00:08:12.310 --> 00:08:14.230
returns the controller to READY.

105
00:08:14.910 --> 00:08:22.690
In READY, simultaneous key valid and input valid
cause this interface to accept the key first and

106
00:08:22.690 --> 00:08:24.730
lower input ready.

107
00:08:24.730 --> 00:08:28.970
The plaintext source retains its data for a later
handshake.

108
00:08:28.970 --> 00:08:34.210
That replacement edge cannot quietly accept
plaintext under the old key.

109
00:08:34.210 --> 00:08:40.170
Separate channels still need an explicit priority
contract shared by both sources and the

110
00:08:40.170 --> 00:08:40.570
controller.

111
00:08:41.350 --> 00:08:47.290
Assert output valid when ciphertext is available,
without waiting for ready.

112
00:08:47.290 --> 00:08:50.590
During backpressure, preserve valid and the data.

113
00:08:50.590 --> 00:08:54.690
Do not recompute or accept an input that
overwrites it.

114
00:08:54.690 --> 00:09:00.950
If transfer is delayed to E fourteen, READY is
reached after that edge, and the next input can

115
00:09:00.950 --> 00:09:03.270
be accepted at E fifteen.

116
00:09:03.270 --> 00:09:07.950
Completion of encryption and completion of the
transaction occur at different times.

117
00:09:07.950 --> 00:09:15.810
An active-low synchronous reset clears state,
original key, working key, and counter at a

118
00:09:15.810 --> 00:09:18.850
rising edge, returning to NO KEY.

119
00:09:18.850 --> 00:09:24.270
It cancels an unfinished transaction, with ready
and valid low during reset.

120
00:09:24.270 --> 00:09:27.110
Load a new key after release.

121
00:09:27.110 --> 00:09:30.130
This describes functional register clearing.

122
00:09:30.130 --> 00:09:36.090
Product-level key zeroization and side-channel
certification require additional design and

123
00:09:36.090 --> 00:09:36.470
evidence.

124
00:09:36.470 --> 00:09:40.530
Use the standard key and plaintext shown.

125
00:09:40.530 --> 00:09:47.570
The initial XOR produces the displayed sequence
from zero zero, ten, twenty, thirty through E

126
00:09:47.570 --> 00:09:49.410
zero and F zero.

127
00:09:49.410 --> 00:09:56.650
Compare SubBytes, ShiftRows, MixColumns, K one,
and the round-one result in the same packed

128
00:09:56.650 --> 00:09:57.630
order.

129
00:09:57.630 --> 00:10:01.590
The final ciphertext begins sixty nine C four.

130
00:10:01.590 --> 00:10:07.390
A first mismatch at ShiftRows points to
permutation; matching transformations with a

131
00:10:07.390 --> 00:10:10.890
wrong round result point to K one or the XOR.

132
00:10:10.890 --> 00:10:12.570
Inspect the earliest difference.

133
00:10:13.330 --> 00:10:22.450
Check all two hundred fifty six S-box inputs,
then permutation, field arithmetic, normal

134
00:10:23.420 --> 00:10:26.800
rounds, and the final bypass.

135
00:10:26.800 --> 00:10:31.920
Verify key expansion independently before
integration.

136
00:10:31.920 --> 00:10:39.620
Transactions need consecutive blocks, competing
key input, backpressure, and resets.

137
00:10:39.620 --> 00:10:47.640
Record only handshake edges in the scoreboard,
checking values, counts, and order with timeouts.

138
00:10:47.640 --> 00:10:52.780
One correct ciphertext does not exercise these
control cases.

139
00:10:53.500 --> 00:10:59.300
Replace the sixteen data S boxes with one shared
box.

140
00:10:59.300 --> 00:11:05.400
The controller needs intermediate bytes and a
revised schedule, changing the earlier eleven-

141
00:11:05.400 --> 00:11:07.680
and thirteen-cycle figures.

142
00:11:07.680 --> 00:11:14.200
A functional hierarchy does not require a
separate circuit copy at every level, but sharing

143
00:11:14.200 --> 00:11:15.600
must match timing.

144
00:11:15.600 --> 00:11:24.020
Beyond this block primitive, messages need a
suitable mode, nonce or IV rules, key management,

145
00:11:24.020 --> 00:11:25.760
and integrity.

146
00:11:25.760 --> 00:11:33.200
Decryption, buses, pipelines, fault defense, and
side-channel resistance require further work.

