Skip to content

Commit

Permalink
Spec: AES RV64 - Fix pseudo code again.
Browse files Browse the repository at this point in the history
- Forgot to fix the final assignments to rd.

 On branch master
 Your branch is up-to-date with 'origin/master'.

 Changes to be committed:
	modified:   doc/tex/sec-scalar-aes.tex
  • Loading branch information
ben-marshall committed Mar 9, 2020
1 parent 334badb commit a994713
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions doc/tex/sec-scalar-aes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,15 @@ \subsubsection{RV64 Instructions}
t1.128 = AESShiftRows(rs2 || rs1)
t2.64 = t1.64[1] if hi else t1.64[0]
t3.8[i] = AESSBox(t2.8[i]) for i=0..7
t4.32[0] = AESMixColumn(t3.32[0]) if mix else t3.32[0]
t4.32[1] = AESMixColumn(t3.32[1]) if mix else t3.32[1]
rd.64 = t4.64[1] if hi else t4.64[0]
rd.32[0] = AESMixColumn(t3.32[0]) if mix else t3.32[0]
rd.32[1] = AESMixColumn(t3.32[1]) if mix else t3.32[1]

saes.dec(rs1, rs2, mix, hi): // InvSubBytes, InvShiftRows, InvMixColumns
t1.128 = InvAESShiftRows(rs2 || rs1)
t2.64 = t1.64[1] if hi else t1.64[0]
t3.8[i] = InvAESSBox(t2.8[i]) for i=0..7
t4.32[0] = InvAESMixColumn(t3.32[0]) if mix else t3.32[0]
t4.32[1] = InvAESMixColumn(t3.32[1]) if mix else t3.32[1]
rd.64 = t4.64[1] if hi else = t4.64[0]
rd.32[0] = InvAESMixColumn(t3.32[0]) if mix else t3.32[0]
rd.32[1] = InvAESMixColumn(t3.32[1]) if mix else t3.32[1]

saes.imix(rs1): // Inverse MixColumns
rd.32[0] = InvAESMixColumns(rs1.32[0])
Expand Down

0 comments on commit a994713

Please sign in to comment.