@maniclang/workbench 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (644) hide show
  1. package/CONTRIBUTING.md +40 -0
  2. package/README.md +155 -0
  3. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/client/assets/abap-CRCWOmpq.js +1 -0
  63. package/dist/client/assets/apex-DnsZk_dE.js +1 -0
  64. package/dist/client/assets/azcli-1IWB1ccx.js +1 -0
  65. package/dist/client/assets/bat-DPkNLes8.js +1 -0
  66. package/dist/client/assets/bicep-Corcdgou.js +2 -0
  67. package/dist/client/assets/cameligo-CGrWLZr3.js +1 -0
  68. package/dist/client/assets/clojure-D9WOWImG.js +1 -0
  69. package/dist/client/assets/codicon-CgENjH2v.ttf +0 -0
  70. package/dist/client/assets/coffee-B7EJu28W.js +1 -0
  71. package/dist/client/assets/cpp-SEyurbux.js +1 -0
  72. package/dist/client/assets/csharp-BoL64M5l.js +1 -0
  73. package/dist/client/assets/csp-C46ZqvIl.js +1 -0
  74. package/dist/client/assets/css-DQU6DXDx.js +3 -0
  75. package/dist/client/assets/cssMode-CtRONlr8.js +4 -0
  76. package/dist/client/assets/cypher-D84EuPTj.js +1 -0
  77. package/dist/client/assets/dart-D8lhlL1r.js +1 -0
  78. package/dist/client/assets/dockerfile-DLk6rpji.js +1 -0
  79. package/dist/client/assets/ecl-BO6FnfXk.js +1 -0
  80. package/dist/client/assets/editor.worker-CZyr7Ur9.js +26 -0
  81. package/dist/client/assets/elixir-BRjLKONM.js +1 -0
  82. package/dist/client/assets/flow9-Cac8vKd7.js +1 -0
  83. package/dist/client/assets/freemarker2-BTSNJUl8.js +3 -0
  84. package/dist/client/assets/fsharp-fd1GTHhf.js +1 -0
  85. package/dist/client/assets/go-O9LJTZXk.js +1 -0
  86. package/dist/client/assets/graphql-LQdxqEYJ.js +1 -0
  87. package/dist/client/assets/handlebars-qkUBjVg6.js +1 -0
  88. package/dist/client/assets/hcl-DxDQ3s82.js +1 -0
  89. package/dist/client/assets/html-pguqE00h.js +1 -0
  90. package/dist/client/assets/htmlMode-BCCLuk2F.js +4 -0
  91. package/dist/client/assets/index-BFrMLHHu.css +1 -0
  92. package/dist/client/assets/index-CdBC-xgi.js +1250 -0
  93. package/dist/client/assets/ini-BvajGCUy.js +1 -0
  94. package/dist/client/assets/java-SYsfObOQ.js +1 -0
  95. package/dist/client/assets/javascript-ciDUXdez.js +1 -0
  96. package/dist/client/assets/jsonMode-BmkXC0tI.js +10 -0
  97. package/dist/client/assets/julia-DQXNmw_w.js +1 -0
  98. package/dist/client/assets/kotlin-qQ0MG-9I.js +1 -0
  99. package/dist/client/assets/less-GGFNNJHn.js +2 -0
  100. package/dist/client/assets/lexon-Canl7DCW.js +1 -0
  101. package/dist/client/assets/liquid-CwE4UIwf.js +1 -0
  102. package/dist/client/assets/lua-D28Ae8-K.js +1 -0
  103. package/dist/client/assets/m3-DPitgjJI.js +1 -0
  104. package/dist/client/assets/markdown-B811l8j2.js +1 -0
  105. package/dist/client/assets/mdx-K_9Emnjy.js +1 -0
  106. package/dist/client/assets/mips-CdjsipkG.js +1 -0
  107. package/dist/client/assets/msdax-CYqgjx_P.js +1 -0
  108. package/dist/client/assets/mysql-BHd6q0vd.js +1 -0
  109. package/dist/client/assets/objective-c-B1aVtJYH.js +1 -0
  110. package/dist/client/assets/pascal-BhNW15KB.js +1 -0
  111. package/dist/client/assets/pascaligo-5jv8CcQD.js +1 -0
  112. package/dist/client/assets/perl-DlYyT36c.js +1 -0
  113. package/dist/client/assets/pgsql-Dy0bjov7.js +1 -0
  114. package/dist/client/assets/php-120yhfDK.js +1 -0
  115. package/dist/client/assets/pla-CjnFlu4u.js +1 -0
  116. package/dist/client/assets/postiats-CQpG440k.js +1 -0
  117. package/dist/client/assets/powerquery-DdJtto1Z.js +1 -0
  118. package/dist/client/assets/powershell-Bu_VLpJB.js +1 -0
  119. package/dist/client/assets/protobuf-IBS6jZEB.js +2 -0
  120. package/dist/client/assets/pug-kFxLfcjb.js +1 -0
  121. package/dist/client/assets/python-BzIc0EVe.js +1 -0
  122. package/dist/client/assets/qsharp-q7JyzKFN.js +1 -0
  123. package/dist/client/assets/r-BIFz-_sK.js +1 -0
  124. package/dist/client/assets/razor-lXZl6dtu.js +1 -0
  125. package/dist/client/assets/redis-CHOsPHWR.js +1 -0
  126. package/dist/client/assets/redshift-CBifECDb.js +1 -0
  127. package/dist/client/assets/restructuredtext-CghPJEOS.js +1 -0
  128. package/dist/client/assets/ruby-CYWGW-b1.js +1 -0
  129. package/dist/client/assets/rust-DMDD0SHb.js +1 -0
  130. package/dist/client/assets/sb-BYAiYHFx.js +1 -0
  131. package/dist/client/assets/scala-Bqvq8jcR.js +1 -0
  132. package/dist/client/assets/scheme-Dhb-2j9p.js +1 -0
  133. package/dist/client/assets/scss-CTwUZ5N7.js +3 -0
  134. package/dist/client/assets/shell-CsDZo4DB.js +1 -0
  135. package/dist/client/assets/solidity-CME5AdoB.js +1 -0
  136. package/dist/client/assets/sophia-RYC1BQQz.js +1 -0
  137. package/dist/client/assets/sparql-KEyrF7De.js +1 -0
  138. package/dist/client/assets/sql-BdTr02Mf.js +1 -0
  139. package/dist/client/assets/st-C7iG7M4S.js +1 -0
  140. package/dist/client/assets/swift-D7IUmUK8.js +1 -0
  141. package/dist/client/assets/systemverilog-DgMryOEJ.js +1 -0
  142. package/dist/client/assets/tcl-PloMZuKG.js +1 -0
  143. package/dist/client/assets/tsMode-BAXmgo_t.js +11 -0
  144. package/dist/client/assets/twig-BfRIq3la.js +1 -0
  145. package/dist/client/assets/typescript-Cdf8nS1n.js +1 -0
  146. package/dist/client/assets/typespec-CzxlYoT_.js +1 -0
  147. package/dist/client/assets/vb-BwAE3J76.js +1 -0
  148. package/dist/client/assets/wgsl-B_1kOXbF.js +298 -0
  149. package/dist/client/assets/xml-DGyPgYnj.js +1 -0
  150. package/dist/client/assets/yaml-Dqv3HtbL.js +1 -0
  151. package/dist/client/index.html +14 -0
  152. package/dist/client/manic-logo.png +0 -0
  153. package/dist/client/wasm/manic_lang.d.ts +74 -0
  154. package/dist/client/wasm/manic_lang.js +302 -0
  155. package/dist/client/wasm/manic_lang_bg.wasm +0 -0
  156. package/dist/client/wasm/manic_lang_bg.wasm.d.ts +13 -0
  157. package/dist/server/agentProtocol.d.ts +131 -0
  158. package/dist/server/agentProtocol.js +21 -0
  159. package/dist/server/agentProtocol.js.map +1 -0
  160. package/dist/server/agentRuns.d.ts +46 -0
  161. package/dist/server/agentRuns.js +138 -0
  162. package/dist/server/agentRuns.js.map +1 -0
  163. package/dist/server/agentThreads.d.ts +20 -0
  164. package/dist/server/agentThreads.js +205 -0
  165. package/dist/server/agentThreads.js.map +1 -0
  166. package/dist/server/aiSecrets.d.ts +21 -0
  167. package/dist/server/aiSecrets.js +68 -0
  168. package/dist/server/aiSecrets.js.map +1 -0
  169. package/dist/server/app.d.ts +34 -0
  170. package/dist/server/app.js +804 -0
  171. package/dist/server/app.js.map +1 -0
  172. package/dist/server/assets.d.ts +34 -0
  173. package/dist/server/assets.js +659 -0
  174. package/dist/server/assets.js.map +1 -0
  175. package/dist/server/candidateFix.d.ts +28 -0
  176. package/dist/server/candidateFix.js +111 -0
  177. package/dist/server/candidateFix.js.map +1 -0
  178. package/dist/server/cli.d.ts +2 -0
  179. package/dist/server/cli.js +118 -0
  180. package/dist/server/cli.js.map +1 -0
  181. package/dist/server/diagnostics.d.ts +13 -0
  182. package/dist/server/diagnostics.js +73 -0
  183. package/dist/server/diagnostics.js.map +1 -0
  184. package/dist/server/engineCheck.d.ts +7 -0
  185. package/dist/server/engineCheck.js +60 -0
  186. package/dist/server/engineCheck.js.map +1 -0
  187. package/dist/server/engineInstall.d.ts +34 -0
  188. package/dist/server/engineInstall.js +228 -0
  189. package/dist/server/engineInstall.js.map +1 -0
  190. package/dist/server/enginePaths.d.ts +3 -0
  191. package/dist/server/enginePaths.js +76 -0
  192. package/dist/server/enginePaths.js.map +1 -0
  193. package/dist/server/folderPicker.d.ts +1 -0
  194. package/dist/server/folderPicker.js +54 -0
  195. package/dist/server/folderPicker.js.map +1 -0
  196. package/dist/server/manicAgent.d.ts +75 -0
  197. package/dist/server/manicAgent.js +476 -0
  198. package/dist/server/manicAgent.js.map +1 -0
  199. package/dist/server/manicEnv.d.ts +18 -0
  200. package/dist/server/manicEnv.js +64 -0
  201. package/dist/server/manicEnv.js.map +1 -0
  202. package/dist/server/promptStore.d.ts +11 -0
  203. package/dist/server/promptStore.js +85 -0
  204. package/dist/server/promptStore.js.map +1 -0
  205. package/dist/server/renderJobs.d.ts +54 -0
  206. package/dist/server/renderJobs.js +290 -0
  207. package/dist/server/renderJobs.js.map +1 -0
  208. package/dist/server/settings.d.ts +40 -0
  209. package/dist/server/settings.js +262 -0
  210. package/dist/server/settings.js.map +1 -0
  211. package/dist/server/smartDraw.d.ts +7 -0
  212. package/dist/server/smartDraw.js +88 -0
  213. package/dist/server/smartDraw.js.map +1 -0
  214. package/dist/server/workspace.d.ts +27 -0
  215. package/dist/server/workspace.js +172 -0
  216. package/dist/server/workspace.js.map +1 -0
  217. package/examples/.manic-output/40b6f3b9-7638-4c0e-bb4f-570d45d1b225/job.json +26 -0
  218. package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/job.json +26 -0
  219. package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/markers.json +13 -0
  220. package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/out.mp4 +0 -0
  221. package/examples/.manic-workbench-threads/thread_3ce7448a13f64f9e887d1bc8106a97a8.json +45 -0
  222. package/examples/.manic-workbench-threads/thread_d494cda29249477591056234719e4a3a.json +21 -0
  223. package/examples/.manic-workbench-threads/thread_e98ebdc225184ea5b8ddda8b44541f63.json +29 -0
  224. package/examples/README.md +35 -0
  225. package/examples/a-story-1.manic +222 -0
  226. package/examples/a-story.manic +100 -0
  227. package/examples/achromat-cinematic.manic +105 -0
  228. package/examples/achromat.manic +32 -0
  229. package/examples/aes-decrypt.manic +359 -0
  230. package/examples/aes-encrypt.manic +359 -0
  231. package/examples/aes-round.manic +70 -0
  232. package/examples/aes-story.manic +622 -0
  233. package/examples/ai-story.manic +118 -0
  234. package/examples/analysis.manic +53 -0
  235. package/examples/archimedes_pi.manic +89 -0
  236. package/examples/area_under_curve.manic +131 -0
  237. package/examples/art-rakkan.manic +69 -0
  238. package/examples/aspheric-lens.manic +32 -0
  239. package/examples/astronomical-watch.manic +96 -0
  240. package/examples/asymptote-randomwalk3-reference.manic +58 -0
  241. package/examples/asymptote-tiling-reference.manic +65 -0
  242. package/examples/aws-clustered-web-services.manic +186 -0
  243. package/examples/aws-event-processing-clusters-poc.manic +97 -0
  244. package/examples/aws-three-tier-web-application.manic +134 -0
  245. package/examples/band.manic +43 -0
  246. package/examples/banner.manic +37 -0
  247. package/examples/bayes.manic +27 -0
  248. package/examples/bellcurve.manic +41 -0
  249. package/examples/bfs_dfs.manic +35 -0
  250. package/examples/block-tackle.manic +26 -0
  251. package/examples/bloom-scope.manic +172 -0
  252. package/examples/boolean.manic +46 -0
  253. package/examples/boxplot-wave.manic +93 -0
  254. package/examples/boxplot.manic +43 -0
  255. package/examples/brace.manic +46 -0
  256. package/examples/brachistochrone-annotated.manic +51 -0
  257. package/examples/brachistochrone.manic +27 -0
  258. package/examples/bubble_sort.manic +41 -0
  259. package/examples/bullet-block-annotated.manic +48 -0
  260. package/examples/bullet-block.manic +11 -0
  261. package/examples/bullet-impact.manic +65 -0
  262. package/examples/bungee.manic +9 -0
  263. package/examples/c4-internet-banking-components.manic +33 -0
  264. package/examples/c4-internet-banking-containers.manic +29 -0
  265. package/examples/c4-internet-banking.manic +26 -0
  266. package/examples/c4-story.manic +171 -0
  267. package/examples/c4-test.manic +52 -0
  268. package/examples/c4-zoom.manic +69 -0
  269. package/examples/calculus-demo.manic +129 -0
  270. package/examples/calculus-one.manic +288 -0
  271. package/examples/captions.manic +31 -0
  272. package/examples/car-suspension-annotated.manic +57 -0
  273. package/examples/car-suspension.manic +8 -0
  274. package/examples/cart-pendulum.manic +11 -0
  275. package/examples/charts-bar-line.manic +26 -0
  276. package/examples/charts-column-race.manic +19 -0
  277. package/examples/charts-gdp-race.manic +43 -0
  278. package/examples/charts-german-elections.manic +28 -0
  279. package/examples/charts-line-race.manic +21 -0
  280. package/examples/circle-in-three.manic +156 -0
  281. package/examples/circle-thirds-no-triangle.manic +161 -0
  282. package/examples/clip-window.manic +34 -0
  283. package/examples/cloud-feathers.manic +50 -0
  284. package/examples/cloud-jellyfish-v2.manic +87 -0
  285. package/examples/cloud-jellyfish.manic +48 -0
  286. package/examples/cloud-kaleidoscope.manic +48 -0
  287. package/examples/cloud-koi.manic +51 -0
  288. package/examples/cloud-lissajous.manic +23 -0
  289. package/examples/cloud-medusae.manic +46 -0
  290. package/examples/cloud-phoenix.manic +49 -0
  291. package/examples/cloud-plumes.manic +47 -0
  292. package/examples/cloud-pottery.manic +104 -0
  293. package/examples/cloud-shells.manic +50 -0
  294. package/examples/cloud-starfield.manic +23 -0
  295. package/examples/cloud-wave-lattice.manic +23 -0
  296. package/examples/cloud-word.manic +31 -0
  297. package/examples/cloud3-ripple.manic +53 -0
  298. package/examples/cloud3-sphere.manic +26 -0
  299. package/examples/clt.manic +35 -0
  300. package/examples/collide-blocks-annotated.manic +45 -0
  301. package/examples/collide-blocks.manic +11 -0
  302. package/examples/compare-pendulum.manic +11 -0
  303. package/examples/complex-flowchart.manic +196 -0
  304. package/examples/compound-pulley.manic +25 -0
  305. package/examples/conics.manic +46 -0
  306. package/examples/coordinates.manic +52 -0
  307. package/examples/correlation.manic +35 -0
  308. package/examples/covariance.manic +30 -0
  309. package/examples/creator-affine-fern-growth.manic +72 -0
  310. package/examples/creator-bowl-to-saddle.manic +86 -0
  311. package/examples/creator-branch-counting-tree3.manic +77 -0
  312. package/examples/creator-chaos-game-fern.manic +72 -0
  313. package/examples/creator-circle-inversion-chain.manic +61 -0
  314. package/examples/creator-convex-hull-depth.manic +59 -0
  315. package/examples/creator-coordinate-worlds.manic +182 -0
  316. package/examples/creator-ellipse-reflection-property.manic +59 -0
  317. package/examples/creator-free-kicks.manic +261 -0
  318. package/examples/creator-geometry-language-showcase.manic +259 -0
  319. package/examples/creator-geometry-morph-promo.manic +151 -0
  320. package/examples/creator-heightmap-world.manic +130 -0
  321. package/examples/creator-hilbert3-spatial-index.manic +203 -0
  322. package/examples/creator-how-rocket-launch-works.manic +192 -0
  323. package/examples/creator-implicit-surface-parameterized.manic +51 -0
  324. package/examples/creator-incenter-dissection.manic +56 -0
  325. package/examples/creator-lattice-paths.manic +118 -0
  326. package/examples/creator-line-inversion.manic +49 -0
  327. package/examples/creator-lsystem-fractal-curve.manic +121 -0
  328. package/examples/creator-mandelbrot-escape-test.manic +58 -0
  329. package/examples/creator-monty-hall.manic +104 -0
  330. package/examples/creator-noise-story.manic +123 -0
  331. package/examples/creator-one-tile-pattern-story.manic +169 -0
  332. package/examples/creator-pathfinding.manic +82 -0
  333. package/examples/creator-point-to-plane-distance.manic +167 -0
  334. package/examples/creator-race-quiz.manic +76 -0
  335. package/examples/creator-randomwalk3-diffusion.manic +72 -0
  336. package/examples/creator-reflected-ellipse.manic +48 -0
  337. package/examples/creator-rule90-sierpinski.manic +64 -0
  338. package/examples/creator-three-shadows-of-a-curve.manic +48 -0
  339. package/examples/creator-trigonometry-one-angle.manic +307 -0
  340. package/examples/creator-v2-latex-algebra.manic +29 -0
  341. package/examples/creator-v2-latex-calculus.manic +37 -0
  342. package/examples/creator-v2-latex-physics.manic +29 -0
  343. package/examples/creator-v2-olympiad-geometry.manic +92 -0
  344. package/examples/creator-v2-options-socials.manic +21 -0
  345. package/examples/creator-v2-timers.manic +25 -0
  346. package/examples/creator-v2-timing-square.manic +25 -0
  347. package/examples/creator-v2-timing.manic +34 -0
  348. package/examples/creator-v2.manic +36 -0
  349. package/examples/creator-why-rockets-use-stages.manic +198 -0
  350. package/examples/creator-wrap-real-line.manic +51 -0
  351. package/examples/cubic-graphs.manic +432 -0
  352. package/examples/curve-features.manic +41 -0
  353. package/examples/definedmotion-fourier-gallery.manic +171 -0
  354. package/examples/derivative-of-ln-x.manic +194 -0
  355. package/examples/diagonalise.manic +56 -0
  356. package/examples/dijkstra.manic +29 -0
  357. package/examples/dimensions-unfold.manic +211 -0
  358. package/examples/disc-integration.manic +172 -0
  359. package/examples/double-incline.manic +9 -0
  360. package/examples/double-integral3.manic +43 -0
  361. package/examples/double-pendulum.manic +35 -0
  362. package/examples/double-spring.manic +9 -0
  363. package/examples/drop-mass.manic +25 -0
  364. package/examples/eigen3.manic +34 -0
  365. package/examples/equal_cuts.manic +44 -0
  366. package/examples/equation.manic +16 -0
  367. package/examples/equilateral.manic +57 -0
  368. package/examples/euler_line.manic +51 -0
  369. package/examples/exponential-shells.manic +188 -0
  370. package/examples/extrude3.manic +37 -0
  371. package/examples/factorial-flowchart.manic +69 -0
  372. package/examples/fibonacci-sphere.manic +57 -0
  373. package/examples/flow-lorenz.manic +47 -0
  374. package/examples/fourier-series-live-wave.manic +114 -0
  375. package/examples/fourier-square-wave-live.manic +114 -0
  376. package/examples/fractal_tree.manic +39 -0
  377. package/examples/frame3-grid-policies.manic +48 -0
  378. package/examples/ftc.manic +54 -0
  379. package/examples/function_graph.manic +54 -0
  380. package/examples/galton-board-process.manic +150 -0
  381. package/examples/gcp-clustered-web-services.manic +186 -0
  382. package/examples/gcp-message-collecting.manic +139 -0
  383. package/examples/geo-pythagoras-short.manic +119 -0
  384. package/examples/glsl-boxgrid.manic +105 -0
  385. package/examples/glsl-parameter.manic +30 -0
  386. package/examples/glsl-raymarch.manic +59 -0
  387. package/examples/glsl-shapes.manic +122 -0
  388. package/examples/gradient-descent-field.manic +116 -0
  389. package/examples/gradient-fastest-descent-shorts.manic +153 -0
  390. package/examples/gradient-fastest-descent.manic +125 -0
  391. package/examples/gradient-pendulum-shorts.manic +117 -0
  392. package/examples/gradient.manic +74 -0
  393. package/examples/graph.manic +45 -0
  394. package/examples/graph_moving.manic +67 -0
  395. package/examples/grid-astar.manic +15 -0
  396. package/examples/grid-life-soup.manic +31 -0
  397. package/examples/grid-life-zoo.manic +46 -0
  398. package/examples/grid-life.manic +19 -0
  399. package/examples/grid-wfc.manic +13 -0
  400. package/examples/growing-fractal-tree3.manic +58 -0
  401. package/examples/gun-shot.manic +82 -0
  402. package/examples/hashmap.manic +38 -0
  403. package/examples/heightmap3-world.manic +64 -0
  404. package/examples/heightmap3.manic +23 -0
  405. package/examples/hilbert-curve3-space-filling.manic +117 -0
  406. package/examples/hill_run.manic +71 -0
  407. package/examples/histogram.manic +43 -0
  408. package/examples/hotdog-taco.manic +147 -0
  409. package/examples/hue_wave.manic +35 -0
  410. package/examples/hypothesis.manic +32 -0
  411. package/examples/image.manic +29 -0
  412. package/examples/incircle_tangents.manic +64 -0
  413. package/examples/incline-bumper.manic +11 -0
  414. package/examples/incline-pulley.manic +11 -0
  415. package/examples/incline-showcase.manic +55 -0
  416. package/examples/inline-math.manic +16 -0
  417. package/examples/inscribed-angle-short.manic +56 -0
  418. package/examples/integral-sqrt-tanx.manic +255 -0
  419. package/examples/integrals.manic +274 -0
  420. package/examples/inverse-derivatives.manic +94 -0
  421. package/examples/k8s-cluster-components.manic +82 -0
  422. package/examples/k8s-stateful-architecture.manic +134 -0
  423. package/examples/k8s-three-tier.manic +146 -0
  424. package/examples/kapitza.manic +11 -0
  425. package/examples/latex-disintegration.manic +123 -0
  426. package/examples/lens-paper.manic +36 -0
  427. package/examples/lens-prescription.manic +33 -0
  428. package/examples/lens-system.manic +34 -0
  429. package/examples/lens.manic +31 -0
  430. package/examples/limit-infinity.manic +30 -0
  431. package/examples/limit.manic +33 -0
  432. package/examples/linear-algebra-3d.manic +50 -0
  433. package/examples/linear-algebra.manic +115 -0
  434. package/examples/linear-map.manic +39 -0
  435. package/examples/linear-map3.manic +33 -0
  436. package/examples/linear-system.manic +99 -0
  437. package/examples/linear_transform.manic +43 -0
  438. package/examples/linked_list.manic +38 -0
  439. package/examples/lln.manic +31 -0
  440. package/examples/loop-cinematic.manic +41 -0
  441. package/examples/loop-track.manic +11 -0
  442. package/examples/lorenz-attractor.manic +55 -0
  443. package/examples/lorenz-shells.manic +43 -0
  444. package/examples/lost-in-patterns.manic +149 -0
  445. package/examples/lsystem-asymptote-curves.manic +81 -0
  446. package/examples/manic-ml-activation-focus.manic +133 -0
  447. package/examples/manic-ml-cnn-edge-story.manic +102 -0
  448. package/examples/manic-ml-forward-pass.manic +93 -0
  449. package/examples/manic-ml-learning-step.manic +116 -0
  450. package/examples/manic-ml-logits-sampling.manic +112 -0
  451. package/examples/manic-ml-scalar-to-tensor.manic +143 -0
  452. package/examples/manic-ml-token-embedding.manic +110 -0
  453. package/examples/manic-ml-transformer-attention.manic +102 -0
  454. package/examples/manic-ml-transformer-block.manic +116 -0
  455. package/examples/manic-promo.manic +64 -0
  456. package/examples/map-attractor.manic +45 -0
  457. package/examples/mask-lens.manic +33 -0
  458. package/examples/matrix.manic +37 -0
  459. package/examples/matrix3.manic +101 -0
  460. package/examples/matrix_addition.manic +66 -0
  461. package/examples/matrix_addition_plane.manic +91 -0
  462. package/examples/maxwell-boltzmann-effusion-v2.manic +142 -0
  463. package/examples/maxwell-boltzmann-process.manic +86 -0
  464. package/examples/microservices-platform.manic +140 -0
  465. package/examples/molecule.manic +8 -0
  466. package/examples/morph-icons.manic +29 -0
  467. package/examples/morph.manic +29 -0
  468. package/examples/morph3.manic +49 -0
  469. package/examples/motion-flow-foundation.manic +148 -0
  470. package/examples/motion-graphics-v2-story.manic +189 -0
  471. package/examples/motion-graphics-v2.manic +81 -0
  472. package/examples/motion-graphics.manic +81 -0
  473. package/examples/multivariable3.manic +26 -0
  474. package/examples/mystory.manic +9 -0
  475. package/examples/newton.manic +39 -0
  476. package/examples/newtons-cradle.manic +10 -0
  477. package/examples/nine_point.manic +59 -0
  478. package/examples/noise-terrain.manic +16 -0
  479. package/examples/off-axis.manic +32 -0
  480. package/examples/onprem-advanced-web-service-v2.manic +196 -0
  481. package/examples/onprem-advanced-web-service.manic +175 -0
  482. package/examples/orthocenter.manic +63 -0
  483. package/examples/param3.manic +43 -0
  484. package/examples/parameter-journeys.manic +154 -0
  485. package/examples/parameterized-field-advection.manic +57 -0
  486. package/examples/parameterized-generated-families3.manic +83 -0
  487. package/examples/particles-flow.manic +61 -0
  488. package/examples/pascal-triangle.manic +92 -0
  489. package/examples/pendulum-annotated.manic +72 -0
  490. package/examples/pendulum-damped.manic +35 -0
  491. package/examples/pendulum.manic +38 -0
  492. package/examples/perfect-reel.manic +43 -0
  493. package/examples/pie.manic +41 -0
  494. package/examples/pieday.manic +113 -0
  495. package/examples/piston.manic +7 -0
  496. package/examples/popkorn-field.manic +38 -0
  497. package/examples/prism-cinematic.manic +36 -0
  498. package/examples/prism.manic +32 -0
  499. package/examples/probability.manic +57 -0
  500. package/examples/process-branching-dispatch.manic +71 -0
  501. package/examples/process-stream-observe.manic +54 -0
  502. package/examples/projection.manic +57 -0
  503. package/examples/prompt-test-10.manic +257 -0
  504. package/examples/prompt-test-11.manic +168 -0
  505. package/examples/prompt-test-12.manic +177 -0
  506. package/examples/prompt-test-13.manic +228 -0
  507. package/examples/prompt-test-14.manic +319 -0
  508. package/examples/prompt-test-15.manic +325 -0
  509. package/examples/prompt-test-16.manic +252 -0
  510. package/examples/prompt-test-2.manic +239 -0
  511. package/examples/prompt-test-3.manic +336 -0
  512. package/examples/prompt-test-4.manic +195 -0
  513. package/examples/prompt-test-5.manic +223 -0
  514. package/examples/prompt-test-6.manic +222 -0
  515. package/examples/prompt-test-7.manic +156 -0
  516. package/examples/prompt-test-8.manic +266 -0
  517. package/examples/prompt-test-9.manic +171 -0
  518. package/examples/prompt-test.manic +158 -0
  519. package/examples/pulley-annotated.manic +54 -0
  520. package/examples/pulley-paper.manic +52 -0
  521. package/examples/pulley-scale.manic +23 -0
  522. package/examples/pulley.manic +24 -0
  523. package/examples/quadratic-formula-continuity.manic +110 -0
  524. package/examples/quiz-euler.manic +52 -0
  525. package/examples/quiz-geometry-2.manic +107 -0
  526. package/examples/quiz-geometry.manic +108 -0
  527. package/examples/quiz-skins.manic +22 -0
  528. package/examples/raft-cm.manic +24 -0
  529. package/examples/ramp.manic +25 -0
  530. package/examples/ray-fan.manic +27 -0
  531. package/examples/raymarch-alpha.manic +39 -0
  532. package/examples/raymarch-boxgrid.manic +47 -0
  533. package/examples/raymarch-docker-latency.manic +74 -0
  534. package/examples/raymarch-metaballs.manic +37 -0
  535. package/examples/raymarch-sculpture.manic +39 -0
  536. package/examples/raymarch-shapes3.manic +31 -0
  537. package/examples/reactive-integral.manic +172 -0
  538. package/examples/reactive-math-journey.manic +185 -0
  539. package/examples/reactive-math-notation.manic +150 -0
  540. package/examples/reactive-multiformat.manic +130 -0
  541. package/examples/reactive-world.manic +111 -0
  542. package/examples/refraction-paper.manic +40 -0
  543. package/examples/refraction.manic +32 -0
  544. package/examples/resonance.manic +10 -0
  545. package/examples/rewrite-exponential-cubic.manic +141 -0
  546. package/examples/rewrite-integration.manic +199 -0
  547. package/examples/riemann_rainbow.manic +61 -0
  548. package/examples/riemann_readout.manic +61 -0
  549. package/examples/robot-arm.manic +25 -0
  550. package/examples/rref.manic +48 -0
  551. package/examples/second-law-thermodynamics.manic +385 -0
  552. package/examples/series-parallel-springs.manic +8 -0
  553. package/examples/serverless-processing.manic +145 -0
  554. package/examples/shader-cellular.manic +35 -0
  555. package/examples/shader-fractal.manic +45 -0
  556. package/examples/shader-fx.manic +34 -0
  557. package/examples/shader-glitch-grid.manic +55 -0
  558. package/examples/shader-parameter.manic +25 -0
  559. package/examples/shader-patterns.manic +37 -0
  560. package/examples/shader-plasma.manic +43 -0
  561. package/examples/shader-shapes-dsl.manic +46 -0
  562. package/examples/shader-shapes.manic +37 -0
  563. package/examples/shader-warp.manic +22 -0
  564. package/examples/shapes-howto.manic +411 -0
  565. package/examples/sine_wave.manic +42 -0
  566. package/examples/skew.manic +40 -0
  567. package/examples/smoke.rs +57 -0
  568. package/examples/solids3.manic +22 -0
  569. package/examples/some-story.manic +299 -0
  570. package/examples/spinning-cylinder-flow.manic +87 -0
  571. package/examples/spline.manic +21 -0
  572. package/examples/spot-diagram.manic +32 -0
  573. package/examples/spring-annotated.manic +60 -0
  574. package/examples/spring-chain.manic +11 -0
  575. package/examples/spring-damped.manic +33 -0
  576. package/examples/spring-incline.manic +10 -0
  577. package/examples/spring-paper.manic +46 -0
  578. package/examples/spring-pendulum.manic +14 -0
  579. package/examples/spring.manic +33 -0
  580. package/examples/sqrt-tanx.manic +217 -0
  581. package/examples/ssl-handshake-sdf.manic +116 -0
  582. package/examples/stack_queue.manic +53 -0
  583. package/examples/statistics.manic +60 -0
  584. package/examples/story-addressable-asset-cues.manic +71 -0
  585. package/examples/story-dependent-chain-history.manic +56 -0
  586. package/examples/story-living-dependency-cloud.manic +50 -0
  587. package/examples/story-time-varying-field3.manic +57 -0
  588. package/examples/story.manic +4 -0
  589. package/examples/string-art-breath.manic +70 -0
  590. package/examples/string-wave.manic +10 -0
  591. package/examples/summary.manic +48 -0
  592. package/examples/svg-howto.manic +172 -0
  593. package/examples/svg-import.manic +18 -0
  594. package/examples/systems-architecture-poc.manic +92 -0
  595. package/examples/systems-arrow-patterns.manic +151 -0
  596. package/examples/systems-foundation.manic +71 -0
  597. package/examples/systems-rabbitmq-consumers.manic +118 -0
  598. package/examples/table.manic +39 -0
  599. package/examples/table_braces.manic +54 -0
  600. package/examples/tangent-length-short.manic +57 -0
  601. package/examples/tangent.manic +29 -0
  602. package/examples/tangents.manic +54 -0
  603. package/examples/taylor.manic +44 -0
  604. package/examples/terminal_boot.manic +40 -0
  605. package/examples/test.manic +61 -0
  606. package/examples/text-guide.manic +304 -0
  607. package/examples/textbook-coordinate-worlds.manic +129 -0
  608. package/examples/textbook-doubly-list.manic +33 -0
  609. package/examples/textbook-function-to-solid.manic +126 -0
  610. package/examples/textbook-geometry-dimension-reduction.manic +129 -0
  611. package/examples/textbook-incline-fbd.manic +43 -0
  612. package/examples/textbook-length-area-volume.manic +137 -0
  613. package/examples/textbook-matrix-inverses.manic +172 -0
  614. package/examples/textbook-pulley.manic +35 -0
  615. package/examples/textbook-statistical-dimensions.manic +151 -0
  616. package/examples/textbook-tension.manic +39 -0
  617. package/examples/textbook-watermelon-sections.manic +216 -0
  618. package/examples/thales-semicircle-short.manic +53 -0
  619. package/examples/three-d-v2-lab.manic +83 -0
  620. package/examples/three-d-v2-story.manic +106 -0
  621. package/examples/three-d-v2.manic +69 -0
  622. package/examples/three_d.manic +39 -0
  623. package/examples/timing-v2-scene.manic +47 -0
  624. package/examples/trajectory.manic +28 -0
  625. package/examples/transform_copy.manic +35 -0
  626. package/examples/transforms.manic +54 -0
  627. package/examples/trapped-light-dimensions.manic +226 -0
  628. package/examples/tree-of-leaves.manic +215 -0
  629. package/examples/triangle.manic +68 -0
  630. package/examples/two_person_walk.manic +296 -0
  631. package/examples/two_pointer.manic +32 -0
  632. package/examples/type-to-sdf.manic +139 -0
  633. package/examples/typewriter.manic +28 -0
  634. package/examples/vector_field.manic +32 -0
  635. package/examples/vertical-spring.manic +10 -0
  636. package/examples/volume3.manic +21 -0
  637. package/examples/volumes-solid-of-revolution.manic +111 -0
  638. package/examples/walk.manic +154 -0
  639. package/examples/wheel-duo.manic +91 -0
  640. package/examples/wheel-radial.manic +78 -0
  641. package/examples/wheel-square.manic +83 -0
  642. package/examples/wireframe-spheres.manic +37 -0
  643. package/examples/zeroth-law-thermodynamics.manic +269 -0
  644. package/package.json +59 -0
@@ -0,0 +1,622 @@
1
+ title("AES-128 — How It Works");
2
+ canvas("portrait");
3
+ template("mono");
4
+
5
+ text(hdr, (cx, 120), "AES-128 · encrypt"); size(hdr, 42); bold(hdr); color(hdr, cyan);
6
+
7
+ // --- FULL FLOW strip (you-are-here) ---
8
+ text(chip0, (270, 210), "SubBytes"); size(chip0, 19); color(chip0, dim);
9
+ text(chip1, (490, 210), "ShiftRows"); size(chip1, 19); color(chip1, dim);
10
+ text(chip2, (700, 210), "MixColumns"); size(chip2, 19); color(chip2, dim);
11
+ text(chip3, (900, 210), "AddRoundKey"); size(chip3, 19); color(chip3, dim);
12
+ text(loop, (cx, 250), "the round repeats x10"); size(loop, 18); color(loop, dim);
13
+ text(rnd, (cx, 300), ""); size(rnd, 24); color(rnd, cyan); bold(rnd);
14
+
15
+ // --- the live 4x4 state (cells relabelled + highlighted in place) ---
16
+ matrix(st, "00 44 88 cc; 11 55 99 dd; 22 66 aa ee; 33 77 bb ff", (cx, cy - 40), 150, 132);
17
+
18
+ // --- formulas (one per op, shown when active) ---
19
+ equation(f_sub, (cx, cy - 470), `b' = S(b)`, 40); hidden(f_sub);
20
+ equation(f_shift, (cx, cy - 470), `\text{row } r \lll r`, 40); hidden(f_shift);
21
+ equation(f_mix, (cx, cy - 470), `c' = M\,c`, 40); hidden(f_mix);
22
+ equation(f_xor, (cx, cy - 470), `\text{state} \oplus K_n`, 40); hidden(f_xor);
23
+
24
+ // --- secondary beat: S-box lookup callout (SubBytes) / round key (AddRoundKey) ---
25
+ text(sbox, (cx, cy + 430), ""); size(sbox, 26); color(sbox, cyan); hidden(sbox);
26
+ matrix(rk, "00 00 00 00; 00 00 00 00; 00 00 00 00; 00 00 00 00", (cx, cy + 470), 120, 96);
27
+ color(rk, lime); hidden(rk);
28
+ text(rklab, (cx, cy + 300), "round key"); size(rklab, 20); color(rklab, dim); hidden(rklab);
29
+
30
+ text(cap, (cx, h - 210), ""); size(cap, 28); wrap(cap, w*0.82); bold(cap);
31
+ text(exp, (cx, h - 150), ""); size(exp, 22); color(exp, dim); wrap(exp, w*0.84);
32
+ text(mark, (w - 150, h - 44), "Made with Manic"); size(mark, 22); color(mark, dim);
33
+
34
+ // ---------- timeline ----------
35
+ show(hdr, 0.4); show(mark, 0.4);
36
+ show(chip0, 0.3);
37
+ show(chip1, 0.3);
38
+ show(chip2, 0.3);
39
+ show(chip3, 0.3);
40
+ show(loop, 0.3); show(st, 0.5);
41
+ say(cap, "Load plaintext", 0.3);
42
+ say(exp, "The 16-byte key splits into four 32-bit words w0..w3 — this is the first round key. The ot", 0.3);
43
+ wait(0.8);
44
+
45
+ step("Round 0 · xor") {
46
+ recolor(chip0, dim, 0.15);
47
+ recolor(chip1, dim, 0.15);
48
+ recolor(chip2, dim, 0.15);
49
+ recolor(chip3, lime, 0.15);
50
+ say(rnd, "initial", 0.15);
51
+ par { show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "00", 0.25); say(st.r0c1, "40", 0.25); say(st.r0c2, "80", 0.25); say(st.r0c3, "c0", 0.25); say(st.r1c0, "10", 0.25); say(st.r1c1, "50", 0.25); say(st.r1c2, "90", 0.25); say(st.r1c3, "d0", 0.25); say(st.r2c0, "20", 0.25); say(st.r2c1, "60", 0.25); say(st.r2c2, "a0", 0.25); say(st.r2c3, "e0", 0.25); say(st.r3c0, "30", 0.25); say(st.r3c1, "70", 0.25); say(st.r3c2, "b0", 0.25); say(st.r3c3, "f0", 0.25); }
52
+ say(rk.r0c0, "00", 0.1); say(rk.r0c1, "04", 0.1); say(rk.r0c2, "08", 0.1); say(rk.r0c3, "0c", 0.1);
53
+ say(rk.r1c0, "01", 0.1); say(rk.r1c1, "05", 0.1); say(rk.r1c2, "09", 0.1); say(rk.r1c3, "0d", 0.1);
54
+ say(rk.r2c0, "02", 0.1); say(rk.r2c1, "06", 0.1); say(rk.r2c2, "0a", 0.1); say(rk.r2c3, "0e", 0.1);
55
+ say(rk.r3c0, "03", 0.1); say(rk.r3c1, "07", 0.1); say(rk.r3c2, "0b", 0.1); say(rk.r3c3, "0f", 0.1);
56
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
57
+ say(cap, "AddRoundKey", 0.2);
58
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
59
+ }
60
+ recolor(st, fg, 0.25);
61
+ wait(0.35);
62
+ step("Round 1 · sub") {
63
+ recolor(chip0, cyan, 0.15);
64
+ recolor(chip1, dim, 0.15);
65
+ recolor(chip2, dim, 0.15);
66
+ recolor(chip3, dim, 0.15);
67
+ say(rnd, "Round 1 / 10", 0.15);
68
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "63", 0.25); say(st.r0c1, "09", 0.25); say(st.r0c2, "cd", 0.25); say(st.r0c3, "ba", 0.25); say(st.r1c0, "ca", 0.25); say(st.r1c1, "53", 0.25); say(st.r1c2, "60", 0.25); say(st.r1c3, "70", 0.25); say(st.r2c0, "b7", 0.25); say(st.r2c1, "d0", 0.25); say(st.r2c2, "e0", 0.25); say(st.r2c3, "e1", 0.25); say(st.r3c0, "04", 0.25); say(st.r3c1, "51", 0.25); say(st.r3c2, "e7", 0.25); say(st.r3c3, "8c", 0.25); }
69
+ par { say(sbox, "S-box: 00→63 10→ca 20→b7", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
70
+ say(cap, "SubBytes", 0.2);
71
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
72
+ }
73
+ recolor(st, fg, 0.25);
74
+ wait(0.35);
75
+ step("Round 1 · permute") {
76
+ recolor(chip0, dim, 0.15);
77
+ recolor(chip1, gold, 0.15);
78
+ recolor(chip2, dim, 0.15);
79
+ recolor(chip3, dim, 0.15);
80
+ say(rnd, "Round 1 / 10", 0.15);
81
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "63", 0.25); say(st.r0c1, "09", 0.25); say(st.r0c2, "cd", 0.25); say(st.r0c3, "ba", 0.25); say(st.r1c0, "53", 0.25); say(st.r1c1, "60", 0.25); say(st.r1c2, "70", 0.25); say(st.r1c3, "ca", 0.25); say(st.r2c0, "e0", 0.25); say(st.r2c1, "e1", 0.25); say(st.r2c2, "b7", 0.25); say(st.r2c3, "d0", 0.25); say(st.r3c0, "8c", 0.25); say(st.r3c1, "04", 0.25); say(st.r3c2, "51", 0.25); say(st.r3c3, "e7", 0.25); }
82
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
83
+ say(cap, "ShiftRows", 0.2);
84
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
85
+ }
86
+ recolor(st, fg, 0.25);
87
+ wait(0.35);
88
+ step("Round 1 · mix") {
89
+ recolor(chip0, dim, 0.15);
90
+ recolor(chip1, dim, 0.15);
91
+ recolor(chip2, magenta, 0.15);
92
+ recolor(chip3, dim, 0.15);
93
+ say(rnd, "Round 1 / 10", 0.15);
94
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "5f", 0.25); say(st.r0c1, "57", 0.25); say(st.r0c2, "f7", 0.25); say(st.r0c3, "1d", 0.25); say(st.r1c0, "72", 0.25); say(st.r1c1, "f5", 0.25); say(st.r1c2, "be", 0.25); say(st.r1c3, "b9", 0.25); say(st.r2c0, "64", 0.25); say(st.r2c1, "bc", 0.25); say(st.r2c2, "3b", 0.25); say(st.r2c3, "f9", 0.25); say(st.r3c0, "15", 0.25); say(st.r3c1, "92", 0.25); say(st.r3c2, "29", 0.25); say(st.r3c3, "1a", 0.25); }
95
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
96
+ say(cap, "MixColumns", 0.2);
97
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
98
+ }
99
+ recolor(st, fg, 0.25);
100
+ wait(0.35);
101
+ step("Round 1 · xor") {
102
+ recolor(chip0, dim, 0.15);
103
+ recolor(chip1, dim, 0.15);
104
+ recolor(chip2, dim, 0.15);
105
+ recolor(chip3, lime, 0.15);
106
+ say(rnd, "Round 1 / 10", 0.15);
107
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "89", 0.25); say(st.r0c1, "85", 0.25); say(st.r0c2, "2d", 0.25); say(st.r0c3, "cb", 0.25); say(st.r1c0, "d8", 0.25); say(st.r1c1, "5a", 0.25); say(st.r1c2, "18", 0.25); say(st.r1c3, "12", 0.25); say(st.r2c0, "10", 0.25); say(st.r2c1, "ce", 0.25); say(st.r2c2, "43", 0.25); say(st.r2c3, "8f", 0.25); say(st.r3c0, "e8", 0.25); say(st.r3c1, "68", 0.25); say(st.r3c2, "d8", 0.25); say(st.r3c3, "e4", 0.25); }
108
+ say(rk.r0c0, "d6", 0.1); say(rk.r0c1, "d2", 0.1); say(rk.r0c2, "da", 0.1); say(rk.r0c3, "d6", 0.1);
109
+ say(rk.r1c0, "aa", 0.1); say(rk.r1c1, "af", 0.1); say(rk.r1c2, "a6", 0.1); say(rk.r1c3, "ab", 0.1);
110
+ say(rk.r2c0, "74", 0.1); say(rk.r2c1, "72", 0.1); say(rk.r2c2, "78", 0.1); say(rk.r2c3, "76", 0.1);
111
+ say(rk.r3c0, "fd", 0.1); say(rk.r3c1, "fa", 0.1); say(rk.r3c2, "f1", 0.1); say(rk.r3c3, "fe", 0.1);
112
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
113
+ say(cap, "AddRoundKey", 0.2);
114
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
115
+ }
116
+ recolor(st, fg, 0.25);
117
+ wait(0.35);
118
+ step("Round 2 · sub") {
119
+ recolor(chip0, cyan, 0.15);
120
+ recolor(chip1, dim, 0.15);
121
+ recolor(chip2, dim, 0.15);
122
+ recolor(chip3, dim, 0.15);
123
+ say(rnd, "Round 2 / 10", 0.15);
124
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "a7", 0.25); say(st.r0c1, "97", 0.25); say(st.r0c2, "d8", 0.25); say(st.r0c3, "1f", 0.25); say(st.r1c0, "61", 0.25); say(st.r1c1, "be", 0.25); say(st.r1c2, "ad", 0.25); say(st.r1c3, "c9", 0.25); say(st.r2c0, "ca", 0.25); say(st.r2c1, "8b", 0.25); say(st.r2c2, "1a", 0.25); say(st.r2c3, "73", 0.25); say(st.r3c0, "9b", 0.25); say(st.r3c1, "45", 0.25); say(st.r3c2, "61", 0.25); say(st.r3c3, "69", 0.25); }
125
+ par { say(sbox, "S-box: 89→a7 d8→61 10→ca", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
126
+ say(cap, "SubBytes", 0.2);
127
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
128
+ }
129
+ recolor(st, fg, 0.25);
130
+ wait(0.35);
131
+ step("Round 2 · permute") {
132
+ recolor(chip0, dim, 0.15);
133
+ recolor(chip1, gold, 0.15);
134
+ recolor(chip2, dim, 0.15);
135
+ recolor(chip3, dim, 0.15);
136
+ say(rnd, "Round 2 / 10", 0.15);
137
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "a7", 0.25); say(st.r0c1, "97", 0.25); say(st.r0c2, "d8", 0.25); say(st.r0c3, "1f", 0.25); say(st.r1c0, "be", 0.25); say(st.r1c1, "ad", 0.25); say(st.r1c2, "c9", 0.25); say(st.r1c3, "61", 0.25); say(st.r2c0, "1a", 0.25); say(st.r2c1, "73", 0.25); say(st.r2c2, "ca", 0.25); say(st.r2c3, "8b", 0.25); say(st.r3c0, "69", 0.25); say(st.r3c1, "9b", 0.25); say(st.r3c2, "45", 0.25); say(st.r3c3, "61", 0.25); }
138
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
139
+ say(cap, "ShiftRows", 0.2);
140
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
141
+ }
142
+ recolor(st, fg, 0.25);
143
+ wait(0.35);
144
+ step("Round 2 · mix") {
145
+ recolor(chip0, dim, 0.15);
146
+ recolor(chip1, dim, 0.15);
147
+ recolor(chip2, magenta, 0.15);
148
+ recolor(chip3, dim, 0.15);
149
+ say(rnd, "Round 2 / 10", 0.15);
150
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "ff", 0.25); say(st.r0c1, "31", 0.25); say(st.r0c2, "64", 0.25); say(st.r0c3, "77", 0.25); say(st.r1c0, "87", 0.25); say(st.r1c1, "d8", 0.25); say(st.r1c2, "51", 0.25); say(st.r1c3, "3a", 0.25); say(st.r2c0, "96", 0.25); say(st.r2c1, "6a", 0.25); say(st.r2c2, "51", 0.25); say(st.r2c3, "d0", 0.25); say(st.r3c0, "84", 0.25); say(st.r3c1, "51", 0.25); say(st.r3c2, "fa", 0.25); say(st.r3c3, "09", 0.25); }
151
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
152
+ say(cap, "MixColumns", 0.2);
153
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
154
+ }
155
+ recolor(st, fg, 0.25);
156
+ wait(0.35);
157
+ step("Round 2 · xor") {
158
+ recolor(chip0, dim, 0.15);
159
+ recolor(chip1, dim, 0.15);
160
+ recolor(chip2, dim, 0.15);
161
+ recolor(chip3, lime, 0.15);
162
+ say(rnd, "Round 2 / 10", 0.15);
163
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "49", 0.25); say(st.r0c1, "55", 0.25); say(st.r0c2, "da", 0.25); say(st.r0c3, "1f", 0.25); say(st.r1c0, "15", 0.25); say(st.r1c1, "e5", 0.25); say(st.r1c2, "ca", 0.25); say(st.r1c3, "0a", 0.25); say(st.r2c0, "59", 0.25); say(st.r2c1, "d7", 0.25); say(st.r2c2, "94", 0.25); say(st.r2c3, "63", 0.25); say(st.r3c0, "8f", 0.25); say(st.r3c1, "a0", 0.25); say(st.r3c2, "fa", 0.25); say(st.r3c3, "f7", 0.25); }
164
+ say(rk.r0c0, "b6", 0.1); say(rk.r0c1, "64", 0.1); say(rk.r0c2, "be", 0.1); say(rk.r0c3, "68", 0.1);
165
+ say(rk.r1c0, "92", 0.1); say(rk.r1c1, "3d", 0.1); say(rk.r1c2, "9b", 0.1); say(rk.r1c3, "30", 0.1);
166
+ say(rk.r2c0, "cf", 0.1); say(rk.r2c1, "bd", 0.1); say(rk.r2c2, "c5", 0.1); say(rk.r2c3, "b3", 0.1);
167
+ say(rk.r3c0, "0b", 0.1); say(rk.r3c1, "f1", 0.1); say(rk.r3c2, "00", 0.1); say(rk.r3c3, "fe", 0.1);
168
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
169
+ say(cap, "AddRoundKey", 0.2);
170
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
171
+ }
172
+ recolor(st, fg, 0.25);
173
+ wait(0.35);
174
+ step("Round 3 · sub") {
175
+ recolor(chip0, cyan, 0.15);
176
+ recolor(chip1, dim, 0.15);
177
+ recolor(chip2, dim, 0.15);
178
+ recolor(chip3, dim, 0.15);
179
+ say(rnd, "Round 3 / 10", 0.15);
180
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "3b", 0.25); say(st.r0c1, "fc", 0.25); say(st.r0c2, "57", 0.25); say(st.r0c3, "c0", 0.25); say(st.r1c0, "59", 0.25); say(st.r1c1, "d9", 0.25); say(st.r1c2, "74", 0.25); say(st.r1c3, "67", 0.25); say(st.r2c0, "cb", 0.25); say(st.r2c1, "0e", 0.25); say(st.r2c2, "22", 0.25); say(st.r2c3, "fb", 0.25); say(st.r3c0, "73", 0.25); say(st.r3c1, "e0", 0.25); say(st.r3c2, "2d", 0.25); say(st.r3c3, "68", 0.25); }
181
+ par { say(sbox, "S-box: 49→3b 15→59 59→cb", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
182
+ say(cap, "SubBytes", 0.2);
183
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
184
+ }
185
+ recolor(st, fg, 0.25);
186
+ wait(0.35);
187
+ step("Round 3 · permute") {
188
+ recolor(chip0, dim, 0.15);
189
+ recolor(chip1, gold, 0.15);
190
+ recolor(chip2, dim, 0.15);
191
+ recolor(chip3, dim, 0.15);
192
+ say(rnd, "Round 3 / 10", 0.15);
193
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "3b", 0.25); say(st.r0c1, "fc", 0.25); say(st.r0c2, "57", 0.25); say(st.r0c3, "c0", 0.25); say(st.r1c0, "d9", 0.25); say(st.r1c1, "74", 0.25); say(st.r1c2, "67", 0.25); say(st.r1c3, "59", 0.25); say(st.r2c0, "22", 0.25); say(st.r2c1, "fb", 0.25); say(st.r2c2, "cb", 0.25); say(st.r2c3, "0e", 0.25); say(st.r3c0, "68", 0.25); say(st.r3c1, "73", 0.25); say(st.r3c2, "e0", 0.25); say(st.r3c3, "2d", 0.25); }
194
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
195
+ say(cap, "ShiftRows", 0.2);
196
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
197
+ }
198
+ recolor(st, fg, 0.25);
199
+ wait(0.35);
200
+ step("Round 3 · mix") {
201
+ recolor(chip0, dim, 0.15);
202
+ recolor(chip1, dim, 0.15);
203
+ recolor(chip2, magenta, 0.15);
204
+ recolor(chip3, dim, 0.15);
205
+ say(rnd, "Round 3 / 10", 0.15);
206
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "4c", 0.25); say(st.r0c1, "f7", 0.25); say(st.r0c2, "2c", 0.25); say(st.r0c3, "53", 0.25); say(st.r1c0, "9c", 0.25); say(st.r1c1, "71", 0.25); say(st.r1c2, "3f", 0.25); say(st.r1c3, "4d", 0.25); say(st.r2c0, "1e", 0.25); say(st.r2c1, "f0", 0.25); say(st.r2c2, "86", 0.25); say(st.r2c3, "f2", 0.25); say(st.r3c0, "66", 0.25); say(st.r3c1, "76", 0.25); say(st.r3c2, "8e", 0.25); say(st.r3c3, "56", 0.25); }
207
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
208
+ say(cap, "MixColumns", 0.2);
209
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
210
+ }
211
+ recolor(st, fg, 0.25);
212
+ wait(0.35);
213
+ step("Round 3 · xor") {
214
+ recolor(chip0, dim, 0.15);
215
+ recolor(chip1, dim, 0.15);
216
+ recolor(chip2, dim, 0.15);
217
+ recolor(chip3, lime, 0.15);
218
+ say(rnd, "Round 3 / 10", 0.15);
219
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "fa", 0.25); say(st.r0c1, "25", 0.25); say(st.r0c2, "40", 0.25); say(st.r0c3, "57", 0.25); say(st.r1c0, "63", 0.25); say(st.r1c1, "b3", 0.25); say(st.r1c2, "66", 0.25); say(st.r1c3, "24", 0.25); say(st.r2c0, "6a", 0.25); say(st.r2c1, "39", 0.25); say(st.r2c2, "8a", 0.25); say(st.r2c3, "4d", 0.25); say(st.r3c0, "28", 0.25); say(st.r3c1, "c9", 0.25); say(st.r3c2, "31", 0.25); say(st.r3c3, "17", 0.25); }
220
+ say(rk.r0c0, "b6", 0.1); say(rk.r0c1, "d2", 0.1); say(rk.r0c2, "6c", 0.1); say(rk.r0c3, "04", 0.1);
221
+ say(rk.r1c0, "ff", 0.1); say(rk.r1c1, "c2", 0.1); say(rk.r1c2, "59", 0.1); say(rk.r1c3, "69", 0.1);
222
+ say(rk.r2c0, "74", 0.1); say(rk.r2c1, "c9", 0.1); say(rk.r2c2, "0c", 0.1); say(rk.r2c3, "bf", 0.1);
223
+ say(rk.r3c0, "4e", 0.1); say(rk.r3c1, "bf", 0.1); say(rk.r3c2, "bf", 0.1); say(rk.r3c3, "41", 0.1);
224
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
225
+ say(cap, "AddRoundKey", 0.2);
226
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
227
+ }
228
+ recolor(st, fg, 0.25);
229
+ wait(0.35);
230
+ step("Round 4 · sub") {
231
+ recolor(chip0, cyan, 0.15);
232
+ recolor(chip1, dim, 0.15);
233
+ recolor(chip2, dim, 0.15);
234
+ recolor(chip3, dim, 0.15);
235
+ say(rnd, "Round 4 / 10", 0.15);
236
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "2d", 0.25); say(st.r0c1, "3f", 0.25); say(st.r0c2, "09", 0.25); say(st.r0c3, "5b", 0.25); say(st.r1c0, "fb", 0.25); say(st.r1c1, "6d", 0.25); say(st.r1c2, "33", 0.25); say(st.r1c3, "36", 0.25); say(st.r2c0, "02", 0.25); say(st.r2c1, "12", 0.25); say(st.r2c2, "7e", 0.25); say(st.r2c3, "e3", 0.25); say(st.r3c0, "34", 0.25); say(st.r3c1, "dd", 0.25); say(st.r3c2, "c7", 0.25); say(st.r3c3, "f0", 0.25); }
237
+ par { say(sbox, "S-box: fa→2d 63→fb 6a→02", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
238
+ say(cap, "SubBytes", 0.2);
239
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
240
+ }
241
+ recolor(st, fg, 0.25);
242
+ wait(0.35);
243
+ step("Round 4 · permute") {
244
+ recolor(chip0, dim, 0.15);
245
+ recolor(chip1, gold, 0.15);
246
+ recolor(chip2, dim, 0.15);
247
+ recolor(chip3, dim, 0.15);
248
+ say(rnd, "Round 4 / 10", 0.15);
249
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "2d", 0.25); say(st.r0c1, "3f", 0.25); say(st.r0c2, "09", 0.25); say(st.r0c3, "5b", 0.25); say(st.r1c0, "6d", 0.25); say(st.r1c1, "33", 0.25); say(st.r1c2, "36", 0.25); say(st.r1c3, "fb", 0.25); say(st.r2c0, "7e", 0.25); say(st.r2c1, "e3", 0.25); say(st.r2c2, "02", 0.25); say(st.r2c3, "12", 0.25); say(st.r3c0, "f0", 0.25); say(st.r3c1, "34", 0.25); say(st.r3c2, "dd", 0.25); say(st.r3c3, "c7", 0.25); }
250
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
251
+ say(cap, "ShiftRows", 0.2);
252
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
253
+ }
254
+ recolor(st, fg, 0.25);
255
+ wait(0.35);
256
+ step("Round 4 · mix") {
257
+ recolor(chip0, dim, 0.15);
258
+ recolor(chip1, dim, 0.15);
259
+ recolor(chip2, magenta, 0.15);
260
+ recolor(chip3, dim, 0.15);
261
+ say(rnd, "Round 4 / 10", 0.15);
262
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "63", 0.25); say(st.r0c1, "fc", 0.25); say(st.r0c2, "97", 0.25); say(st.r0c3, "75", 0.25); say(st.r1c0, "85", 0.25); say(st.r1c1, "53", 0.25); say(st.r1c2, "be", 0.25); say(st.r1c3, "47", 0.25); say(st.r2c0, "b7", 0.25); say(st.r2c1, "8d", 0.25); say(st.r2c2, "47", 0.25); say(st.r2c3, "d6", 0.25); say(st.r3c0, "9f", 0.25); say(st.r3c1, "f9", 0.25); say(st.r3c2, "8e", 0.25); say(st.r3c3, "91", 0.25); }
263
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
264
+ say(cap, "MixColumns", 0.2);
265
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
266
+ }
267
+ recolor(st, fg, 0.25);
268
+ wait(0.35);
269
+ step("Round 4 · xor") {
270
+ recolor(chip0, dim, 0.15);
271
+ recolor(chip1, dim, 0.15);
272
+ recolor(chip2, dim, 0.15);
273
+ recolor(chip3, lime, 0.15);
274
+ say(rnd, "Round 4 / 10", 0.15);
275
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "24", 0.25); say(st.r0c1, "69", 0.25); say(st.r0c2, "6e", 0.25); say(st.r0c3, "88", 0.25); say(st.r1c0, "72", 0.25); say(st.r1c1, "66", 0.25); say(st.r1c2, "d2", 0.25); say(st.r1c3, "42", 0.25); say(st.r2c0, "40", 0.25); say(st.r2c1, "b3", 0.25); say(st.r2c2, "75", 0.25); say(st.r2c3, "5b", 0.25); say(st.r3c0, "23", 0.25); say(st.r3c1, "fa", 0.25); say(st.r3c2, "32", 0.25); say(st.r3c3, "6c", 0.25); }
276
+ say(rk.r0c0, "47", 0.1); say(rk.r0c1, "95", 0.1); say(rk.r0c2, "f9", 0.1); say(rk.r0c3, "fd", 0.1);
277
+ say(rk.r1c0, "f7", 0.1); say(rk.r1c1, "35", 0.1); say(rk.r1c2, "6c", 0.1); say(rk.r1c3, "05", 0.1);
278
+ say(rk.r2c0, "f7", 0.1); say(rk.r2c1, "3e", 0.1); say(rk.r2c2, "32", 0.1); say(rk.r2c3, "8d", 0.1);
279
+ say(rk.r3c0, "bc", 0.1); say(rk.r3c1, "03", 0.1); say(rk.r3c2, "bc", 0.1); say(rk.r3c3, "fd", 0.1);
280
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
281
+ say(cap, "AddRoundKey", 0.2);
282
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
283
+ }
284
+ recolor(st, fg, 0.25);
285
+ wait(0.35);
286
+ step("Round 5 · sub") {
287
+ recolor(chip0, cyan, 0.15);
288
+ recolor(chip1, dim, 0.15);
289
+ recolor(chip2, dim, 0.15);
290
+ recolor(chip3, dim, 0.15);
291
+ say(rnd, "Round 5 / 10", 0.15);
292
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "36", 0.25); say(st.r0c1, "f9", 0.25); say(st.r0c2, "9f", 0.25); say(st.r0c3, "c4", 0.25); say(st.r1c0, "40", 0.25); say(st.r1c1, "33", 0.25); say(st.r1c2, "b5", 0.25); say(st.r1c3, "2c", 0.25); say(st.r2c0, "09", 0.25); say(st.r2c1, "6d", 0.25); say(st.r2c2, "9d", 0.25); say(st.r2c3, "39", 0.25); say(st.r3c0, "26", 0.25); say(st.r3c1, "2d", 0.25); say(st.r3c2, "23", 0.25); say(st.r3c3, "50", 0.25); }
293
+ par { say(sbox, "S-box: 24→36 72→40 40→09", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
294
+ say(cap, "SubBytes", 0.2);
295
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
296
+ }
297
+ recolor(st, fg, 0.25);
298
+ wait(0.35);
299
+ step("Round 5 · permute") {
300
+ recolor(chip0, dim, 0.15);
301
+ recolor(chip1, gold, 0.15);
302
+ recolor(chip2, dim, 0.15);
303
+ recolor(chip3, dim, 0.15);
304
+ say(rnd, "Round 5 / 10", 0.15);
305
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "36", 0.25); say(st.r0c1, "f9", 0.25); say(st.r0c2, "9f", 0.25); say(st.r0c3, "c4", 0.25); say(st.r1c0, "33", 0.25); say(st.r1c1, "b5", 0.25); say(st.r1c2, "2c", 0.25); say(st.r1c3, "40", 0.25); say(st.r2c0, "9d", 0.25); say(st.r2c1, "39", 0.25); say(st.r2c2, "09", 0.25); say(st.r2c3, "6d", 0.25); say(st.r3c0, "50", 0.25); say(st.r3c1, "26", 0.25); say(st.r3c2, "2d", 0.25); say(st.r3c3, "23", 0.25); }
306
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
307
+ say(cap, "ShiftRows", 0.2);
308
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
309
+ }
310
+ recolor(st, fg, 0.25);
311
+ wait(0.35);
312
+ step("Round 5 · mix") {
313
+ recolor(chip0, dim, 0.15);
314
+ recolor(chip1, dim, 0.15);
315
+ recolor(chip2, magenta, 0.15);
316
+ recolor(chip3, dim, 0.15);
317
+ say(rnd, "Round 5 / 10", 0.15);
318
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "f4", 0.25); say(st.r0c1, "32", 0.25); say(st.r0c2, "75", 0.25); say(st.r0c3, "1d", 0.25); say(st.r1c0, "bc", 0.25); say(st.r1c1, "e5", 0.25); say(st.r1c2, "f1", 0.25); say(st.r1c3, "d0", 0.25); say(st.r2c0, "d4", 0.25); say(st.r2c1, "54", 0.25); say(st.r2c2, "d6", 0.25); say(st.r2c3, "3b", 0.25); say(st.r3c0, "54", 0.25); say(st.r3c1, "d0", 0.25); say(st.r3c2, "c5", 0.25); say(st.r3c3, "3c", 0.25); }
319
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
320
+ say(cap, "MixColumns", 0.2);
321
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
322
+ }
323
+ recolor(st, fg, 0.25);
324
+ wait(0.35);
325
+ step("Round 5 · xor") {
326
+ recolor(chip0, dim, 0.15);
327
+ recolor(chip1, dim, 0.15);
328
+ recolor(chip2, dim, 0.15);
329
+ recolor(chip3, lime, 0.15);
330
+ say(rnd, "Round 5 / 10", 0.15);
331
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "c8", 0.25); say(st.r0c1, "9b", 0.25); say(st.r0c2, "25", 0.25); say(st.r0c3, "b0", 0.25); say(st.r1c0, "16", 0.25); say(st.r1c1, "7a", 0.25); say(st.r1c2, "02", 0.25); say(st.r1c3, "26", 0.25); say(st.r2c0, "77", 0.25); say(st.r2c1, "c9", 0.25); say(st.r2c2, "79", 0.25); say(st.r2c3, "19", 0.25); say(st.r3c0, "bc", 0.25); say(st.r3c1, "3b", 0.25); say(st.r3c2, "92", 0.25); say(st.r3c3, "96", 0.25); }
332
+ say(rk.r0c0, "3c", 0.1); say(rk.r0c1, "a9", 0.1); say(rk.r0c2, "50", 0.1); say(rk.r0c3, "ad", 0.1);
333
+ say(rk.r1c0, "aa", 0.1); say(rk.r1c1, "9f", 0.1); say(rk.r1c2, "f3", 0.1); say(rk.r1c3, "f6", 0.1);
334
+ say(rk.r2c0, "a3", 0.1); say(rk.r2c1, "9d", 0.1); say(rk.r2c2, "af", 0.1); say(rk.r2c3, "22", 0.1);
335
+ say(rk.r3c0, "e8", 0.1); say(rk.r3c1, "eb", 0.1); say(rk.r3c2, "57", 0.1); say(rk.r3c3, "aa", 0.1);
336
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
337
+ say(cap, "AddRoundKey", 0.2);
338
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
339
+ }
340
+ recolor(st, fg, 0.25);
341
+ wait(0.35);
342
+ step("Round 6 · sub") {
343
+ recolor(chip0, cyan, 0.15);
344
+ recolor(chip1, dim, 0.15);
345
+ recolor(chip2, dim, 0.15);
346
+ recolor(chip3, dim, 0.15);
347
+ say(rnd, "Round 6 / 10", 0.15);
348
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "e8", 0.25); say(st.r0c1, "14", 0.25); say(st.r0c2, "3f", 0.25); say(st.r0c3, "e7", 0.25); say(st.r1c0, "47", 0.25); say(st.r1c1, "da", 0.25); say(st.r1c2, "77", 0.25); say(st.r1c3, "f7", 0.25); say(st.r2c0, "f5", 0.25); say(st.r2c1, "dd", 0.25); say(st.r2c2, "b6", 0.25); say(st.r2c3, "d4", 0.25); say(st.r3c0, "65", 0.25); say(st.r3c1, "e2", 0.25); say(st.r3c2, "4f", 0.25); say(st.r3c3, "90", 0.25); }
349
+ par { say(sbox, "S-box: c8→e8 16→47 77→f5", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
350
+ say(cap, "SubBytes", 0.2);
351
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
352
+ }
353
+ recolor(st, fg, 0.25);
354
+ wait(0.35);
355
+ step("Round 6 · permute") {
356
+ recolor(chip0, dim, 0.15);
357
+ recolor(chip1, gold, 0.15);
358
+ recolor(chip2, dim, 0.15);
359
+ recolor(chip3, dim, 0.15);
360
+ say(rnd, "Round 6 / 10", 0.15);
361
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "e8", 0.25); say(st.r0c1, "14", 0.25); say(st.r0c2, "3f", 0.25); say(st.r0c3, "e7", 0.25); say(st.r1c0, "da", 0.25); say(st.r1c1, "77", 0.25); say(st.r1c2, "f7", 0.25); say(st.r1c3, "47", 0.25); say(st.r2c0, "b6", 0.25); say(st.r2c1, "d4", 0.25); say(st.r2c2, "f5", 0.25); say(st.r2c3, "dd", 0.25); say(st.r3c0, "90", 0.25); say(st.r3c1, "65", 0.25); say(st.r3c2, "e2", 0.25); say(st.r3c3, "4f", 0.25); }
362
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
363
+ say(cap, "ShiftRows", 0.2);
364
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
365
+ }
366
+ recolor(st, fg, 0.25);
367
+ wait(0.35);
368
+ step("Round 6 · mix") {
369
+ recolor(chip0, dim, 0.15);
370
+ recolor(chip1, dim, 0.15);
371
+ recolor(chip2, magenta, 0.15);
372
+ recolor(chip3, dim, 0.15);
373
+ say(rnd, "Round 6 / 10", 0.15);
374
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "98", 0.25); say(st.r0c1, "00", 0.25); say(st.r0c2, "6b", 0.25); say(st.r0c3, "8e", 0.25); say(st.r1c0, "16", 0.25); say(st.r1c1, "f8", 0.25); say(st.r1c2, "2c", 0.25); say(st.r1c3, "5a", 0.25); say(st.r2c0, "ee", 0.25); say(st.r2c1, "7f", 0.25); say(st.r2c2, "04", 0.25); say(st.r2c3, "d0", 0.25); say(st.r3c0, "74", 0.25); say(st.r3c1, "55", 0.25); say(st.r3c2, "9c", 0.25); say(st.r3c3, "36", 0.25); }
375
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
376
+ say(cap, "MixColumns", 0.2);
377
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
378
+ }
379
+ recolor(st, fg, 0.25);
380
+ wait(0.35);
381
+ step("Round 6 · xor") {
382
+ recolor(chip0, dim, 0.15);
383
+ recolor(chip1, dim, 0.15);
384
+ recolor(chip2, dim, 0.15);
385
+ recolor(chip3, lime, 0.15);
386
+ say(rnd, "Round 6 / 10", 0.15);
387
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "c6", 0.25); say(st.r0c1, "f7", 0.25); say(st.r0c2, "cc", 0.25); say(st.r0c3, "84", 0.25); say(st.r1c0, "2f", 0.25); say(st.r1c1, "5e", 0.25); say(st.r1c2, "79", 0.25); say(st.r1c3, "f9", 0.25); say(st.r2c0, "e1", 0.25); say(st.r2c1, "ed", 0.25); say(st.r2c2, "39", 0.25); say(st.r2c3, "cf", 0.25); say(st.r3c0, "09", 0.25); say(st.r3c1, "c3", 0.25); say(st.r3c2, "5d", 0.25); say(st.r3c3, "5d", 0.25); }
388
+ say(rk.r0c0, "5e", 0.1); say(rk.r0c1, "f7", 0.1); say(rk.r0c2, "a7", 0.1); say(rk.r0c3, "0a", 0.1);
389
+ say(rk.r1c0, "39", 0.1); say(rk.r1c1, "a6", 0.1); say(rk.r1c2, "55", 0.1); say(rk.r1c3, "a3", 0.1);
390
+ say(rk.r2c0, "0f", 0.1); say(rk.r2c1, "92", 0.1); say(rk.r2c2, "3d", 0.1); say(rk.r2c3, "1f", 0.1);
391
+ say(rk.r3c0, "7d", 0.1); say(rk.r3c1, "96", 0.1); say(rk.r3c2, "c1", 0.1); say(rk.r3c3, "6b", 0.1);
392
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
393
+ say(cap, "AddRoundKey", 0.2);
394
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
395
+ }
396
+ recolor(st, fg, 0.25);
397
+ wait(0.35);
398
+ step("Round 7 · sub") {
399
+ recolor(chip0, cyan, 0.15);
400
+ recolor(chip1, dim, 0.15);
401
+ recolor(chip2, dim, 0.15);
402
+ recolor(chip3, dim, 0.15);
403
+ say(rnd, "Round 7 / 10", 0.15);
404
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "b4", 0.25); say(st.r0c1, "68", 0.25); say(st.r0c2, "4b", 0.25); say(st.r0c3, "5f", 0.25); say(st.r1c0, "15", 0.25); say(st.r1c1, "58", 0.25); say(st.r1c2, "b6", 0.25); say(st.r1c3, "99", 0.25); say(st.r2c0, "f8", 0.25); say(st.r2c1, "55", 0.25); say(st.r2c2, "12", 0.25); say(st.r2c3, "8a", 0.25); say(st.r3c0, "01", 0.25); say(st.r3c1, "2e", 0.25); say(st.r3c2, "4c", 0.25); say(st.r3c3, "4c", 0.25); }
405
+ par { say(sbox, "S-box: c6→b4 2f→15 e1→f8", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
406
+ say(cap, "SubBytes", 0.2);
407
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
408
+ }
409
+ recolor(st, fg, 0.25);
410
+ wait(0.35);
411
+ step("Round 7 · permute") {
412
+ recolor(chip0, dim, 0.15);
413
+ recolor(chip1, gold, 0.15);
414
+ recolor(chip2, dim, 0.15);
415
+ recolor(chip3, dim, 0.15);
416
+ say(rnd, "Round 7 / 10", 0.15);
417
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "b4", 0.25); say(st.r0c1, "68", 0.25); say(st.r0c2, "4b", 0.25); say(st.r0c3, "5f", 0.25); say(st.r1c0, "58", 0.25); say(st.r1c1, "b6", 0.25); say(st.r1c2, "99", 0.25); say(st.r1c3, "15", 0.25); say(st.r2c0, "12", 0.25); say(st.r2c1, "8a", 0.25); say(st.r2c2, "f8", 0.25); say(st.r2c3, "55", 0.25); say(st.r3c0, "4c", 0.25); say(st.r3c1, "01", 0.25); say(st.r3c2, "2e", 0.25); say(st.r3c3, "4c", 0.25); }
418
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
419
+ say(cap, "ShiftRows", 0.2);
420
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
421
+ }
422
+ recolor(st, fg, 0.25);
423
+ wait(0.35);
424
+ step("Round 7 · mix") {
425
+ recolor(chip0, dim, 0.15);
426
+ recolor(chip1, dim, 0.15);
427
+ recolor(chip2, magenta, 0.15);
428
+ recolor(chip3, dim, 0.15);
429
+ say(rnd, "Round 7 / 10", 0.15);
430
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "c5", 0.25); say(st.r0c1, "9a", 0.25); say(st.r0c2, "f0", 0.25); say(st.r0c3, "98", 0.25); say(st.r1c0, "7e", 0.25); say(st.r1c1, "9b", 0.25); say(st.r1c2, "5f", 0.25); say(st.r1c3, "c6", 0.25); say(st.r2c0, "1c", 0.25); say(st.r2c1, "d2", 0.25); say(st.r2c2, "4b", 0.25); say(st.r2c3, "34", 0.25); say(st.r3c0, "15", 0.25); say(st.r3c1, "86", 0.25); say(st.r3c2, "e0", 0.25); say(st.r3c3, "39", 0.25); }
431
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
432
+ say(cap, "MixColumns", 0.2);
433
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
434
+ }
435
+ recolor(st, fg, 0.25);
436
+ wait(0.35);
437
+ step("Round 7 · xor") {
438
+ recolor(chip0, dim, 0.15);
439
+ recolor(chip1, dim, 0.15);
440
+ recolor(chip2, dim, 0.15);
441
+ recolor(chip3, lime, 0.15);
442
+ say(rnd, "Round 7 / 10", 0.15);
443
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "d1", 0.25); say(st.r0c1, "79", 0.25); say(st.r0c2, "b4", 0.25); say(st.r0c3, "d6", 0.25); say(st.r1c0, "87", 0.25); say(st.r1c1, "c4", 0.25); say(st.r1c2, "55", 0.25); say(st.r1c3, "6f", 0.25); say(st.r2c0, "6c", 0.25); say(st.r2c1, "30", 0.25); say(st.r2c2, "94", 0.25); say(st.r2c3, "f4", 0.25); say(st.r3c0, "0f", 0.25); say(st.r3c1, "0a", 0.25); say(st.r3c2, "ad", 0.25); say(st.r3c3, "1f", 0.25); }
444
+ say(rk.r0c0, "14", 0.1); say(rk.r0c1, "e3", 0.1); say(rk.r0c2, "44", 0.1); say(rk.r0c3, "4e", 0.1);
445
+ say(rk.r1c0, "f9", 0.1); say(rk.r1c1, "5f", 0.1); say(rk.r1c2, "0a", 0.1); say(rk.r1c3, "a9", 0.1);
446
+ say(rk.r2c0, "70", 0.1); say(rk.r2c1, "e2", 0.1); say(rk.r2c2, "df", 0.1); say(rk.r2c3, "c0", 0.1);
447
+ say(rk.r3c0, "1a", 0.1); say(rk.r3c1, "8c", 0.1); say(rk.r3c2, "4d", 0.1); say(rk.r3c3, "26", 0.1);
448
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
449
+ say(cap, "AddRoundKey", 0.2);
450
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
451
+ }
452
+ recolor(st, fg, 0.25);
453
+ wait(0.35);
454
+ step("Round 8 · sub") {
455
+ recolor(chip0, cyan, 0.15);
456
+ recolor(chip1, dim, 0.15);
457
+ recolor(chip2, dim, 0.15);
458
+ recolor(chip3, dim, 0.15);
459
+ say(rnd, "Round 8 / 10", 0.15);
460
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "3e", 0.25); say(st.r0c1, "b6", 0.25); say(st.r0c2, "8d", 0.25); say(st.r0c3, "f6", 0.25); say(st.r1c0, "17", 0.25); say(st.r1c1, "1c", 0.25); say(st.r1c2, "fc", 0.25); say(st.r1c3, "a8", 0.25); say(st.r2c0, "50", 0.25); say(st.r2c1, "04", 0.25); say(st.r2c2, "22", 0.25); say(st.r2c3, "bf", 0.25); say(st.r3c0, "76", 0.25); say(st.r3c1, "67", 0.25); say(st.r3c2, "95", 0.25); say(st.r3c3, "c0", 0.25); }
461
+ par { say(sbox, "S-box: d1→3e 87→17 6c→50", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
462
+ say(cap, "SubBytes", 0.2);
463
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
464
+ }
465
+ recolor(st, fg, 0.25);
466
+ wait(0.35);
467
+ step("Round 8 · permute") {
468
+ recolor(chip0, dim, 0.15);
469
+ recolor(chip1, gold, 0.15);
470
+ recolor(chip2, dim, 0.15);
471
+ recolor(chip3, dim, 0.15);
472
+ say(rnd, "Round 8 / 10", 0.15);
473
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "3e", 0.25); say(st.r0c1, "b6", 0.25); say(st.r0c2, "8d", 0.25); say(st.r0c3, "f6", 0.25); say(st.r1c0, "1c", 0.25); say(st.r1c1, "fc", 0.25); say(st.r1c2, "a8", 0.25); say(st.r1c3, "17", 0.25); say(st.r2c0, "22", 0.25); say(st.r2c1, "bf", 0.25); say(st.r2c2, "50", 0.25); say(st.r2c3, "04", 0.25); say(st.r3c0, "c0", 0.25); say(st.r3c1, "76", 0.25); say(st.r3c2, "67", 0.25); say(st.r3c3, "95", 0.25); }
474
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
475
+ say(cap, "ShiftRows", 0.2);
476
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
477
+ }
478
+ recolor(st, fg, 0.25);
479
+ wait(0.35);
480
+ step("Round 8 · mix") {
481
+ recolor(chip0, dim, 0.15);
482
+ recolor(chip1, dim, 0.15);
483
+ recolor(chip2, magenta, 0.15);
484
+ recolor(chip3, dim, 0.15);
485
+ say(rnd, "Round 8 / 10", 0.15);
486
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "ba", 0.25); say(st.r0c1, "a1", 0.25); say(st.r0c2, "d5", 0.25); say(st.r0c3, "5f", 0.25); say(st.r1c0, "a0", 0.25); say(st.r1c1, "f9", 0.25); say(st.r1c2, "51", 0.25); say(st.r1c3, "41", 0.25); say(st.r2c0, "3d", 0.25); say(st.r2c1, "b5", 0.25); say(st.r2c2, "2c", 0.25); say(st.r2c3, "4d", 0.25); say(st.r3c0, "e7", 0.25); say(st.r3c1, "6e", 0.25); say(st.r3c2, "ba", 0.25); say(st.r3c3, "23", 0.25); }
487
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
488
+ say(cap, "MixColumns", 0.2);
489
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
490
+ }
491
+ recolor(st, fg, 0.25);
492
+ wait(0.35);
493
+ step("Round 8 · xor") {
494
+ recolor(chip0, dim, 0.15);
495
+ recolor(chip1, dim, 0.15);
496
+ recolor(chip2, dim, 0.15);
497
+ recolor(chip3, lime, 0.15);
498
+ say(rnd, "Round 8 / 10", 0.15);
499
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "fd", 0.25); say(st.r0c1, "05", 0.25); say(st.r0c2, "35", 0.25); say(st.r0c3, "f1", 0.25); say(st.r1c0, "e3", 0.25); say(st.r1c1, "e5", 0.25); say(st.r1c2, "47", 0.25); say(st.r1c3, "fe", 0.25); say(st.r2c0, "ba", 0.25); say(st.r2c1, "d0", 0.25); say(st.r2c2, "96", 0.25); say(st.r2c3, "37", 0.25); say(st.r3c0, "d2", 0.25); say(st.r3c1, "d7", 0.25); say(st.r3c2, "4e", 0.25); say(st.r3c3, "f1", 0.25); }
500
+ say(rk.r0c0, "47", 0.1); say(rk.r0c1, "a4", 0.1); say(rk.r0c2, "e0", 0.1); say(rk.r0c3, "ae", 0.1);
501
+ say(rk.r1c0, "43", 0.1); say(rk.r1c1, "1c", 0.1); say(rk.r1c2, "16", 0.1); say(rk.r1c3, "bf", 0.1);
502
+ say(rk.r2c0, "87", 0.1); say(rk.r2c1, "65", 0.1); say(rk.r2c2, "ba", 0.1); say(rk.r2c3, "7a", 0.1);
503
+ say(rk.r3c0, "35", 0.1); say(rk.r3c1, "b9", 0.1); say(rk.r3c2, "f4", 0.1); say(rk.r3c3, "d2", 0.1);
504
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
505
+ say(cap, "AddRoundKey", 0.2);
506
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
507
+ }
508
+ recolor(st, fg, 0.25);
509
+ wait(0.35);
510
+ step("Round 9 · sub") {
511
+ recolor(chip0, cyan, 0.15);
512
+ recolor(chip1, dim, 0.15);
513
+ recolor(chip2, dim, 0.15);
514
+ recolor(chip3, dim, 0.15);
515
+ say(rnd, "Round 9 / 10", 0.15);
516
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "54", 0.25); say(st.r0c1, "6b", 0.25); say(st.r0c2, "96", 0.25); say(st.r0c3, "a1", 0.25); say(st.r1c0, "11", 0.25); say(st.r1c1, "d9", 0.25); say(st.r1c2, "a0", 0.25); say(st.r1c3, "bb", 0.25); say(st.r2c0, "f4", 0.25); say(st.r2c1, "70", 0.25); say(st.r2c2, "90", 0.25); say(st.r2c3, "9a", 0.25); say(st.r3c0, "b5", 0.25); say(st.r3c1, "0e", 0.25); say(st.r3c2, "2f", 0.25); say(st.r3c3, "a1", 0.25); }
517
+ par { say(sbox, "S-box: fd→54 e3→11 ba→f4", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
518
+ say(cap, "SubBytes", 0.2);
519
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
520
+ }
521
+ recolor(st, fg, 0.25);
522
+ wait(0.35);
523
+ step("Round 9 · permute") {
524
+ recolor(chip0, dim, 0.15);
525
+ recolor(chip1, gold, 0.15);
526
+ recolor(chip2, dim, 0.15);
527
+ recolor(chip3, dim, 0.15);
528
+ say(rnd, "Round 9 / 10", 0.15);
529
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "54", 0.25); say(st.r0c1, "6b", 0.25); say(st.r0c2, "96", 0.25); say(st.r0c3, "a1", 0.25); say(st.r1c0, "d9", 0.25); say(st.r1c1, "a0", 0.25); say(st.r1c2, "bb", 0.25); say(st.r1c3, "11", 0.25); say(st.r2c0, "90", 0.25); say(st.r2c1, "9a", 0.25); say(st.r2c2, "f4", 0.25); say(st.r2c3, "70", 0.25); say(st.r3c0, "a1", 0.25); say(st.r3c1, "b5", 0.25); say(st.r3c2, "0e", 0.25); say(st.r3c3, "2f", 0.25); }
530
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
531
+ say(cap, "ShiftRows", 0.2);
532
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
533
+ }
534
+ recolor(st, fg, 0.25);
535
+ wait(0.35);
536
+ step("Round 9 · mix") {
537
+ recolor(chip0, dim, 0.15);
538
+ recolor(chip1, dim, 0.15);
539
+ recolor(chip2, magenta, 0.15);
540
+ recolor(chip3, dim, 0.15);
541
+ say(rnd, "Round 9 / 10", 0.15);
542
+ par { fade(f_shift, 0.15); show(f_mix, 0.2); recolor(st, magenta, 0.2); say(st.r0c0, "e9", 0.25); say(st.r0c1, "02", 0.25); say(st.r0c2, "1b", 0.25); say(st.r0c3, "35", 0.25); say(st.r1c0, "f7", 0.25); say(st.r1c1, "30", 0.25); say(st.r1c2, "f2", 0.25); say(st.r1c3, "3c", 0.25); say(st.r2c0, "4e", 0.25); say(st.r2c1, "20", 0.25); say(st.r2c2, "cc", 0.25); say(st.r2c3, "21", 0.25); say(st.r3c0, "ec", 0.25); say(st.r3c1, "f6", 0.25); say(st.r3c2, "f2", 0.25); say(st.r3c3, "c7", 0.25); }
543
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
544
+ say(cap, "MixColumns", 0.2);
545
+ say(exp, "Each column is multiplied by the fixed AES matrix over GF(2^8).", 0.2);
546
+ }
547
+ recolor(st, fg, 0.25);
548
+ wait(0.35);
549
+ step("Round 9 · xor") {
550
+ recolor(chip0, dim, 0.15);
551
+ recolor(chip1, dim, 0.15);
552
+ recolor(chip2, dim, 0.15);
553
+ recolor(chip3, lime, 0.15);
554
+ say(rnd, "Round 9 / 10", 0.15);
555
+ par { fade(f_mix, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "bd", 0.25); say(st.r0c1, "f2", 0.25); say(st.r0c2, "0b", 0.25); say(st.r0c3, "8b", 0.25); say(st.r1c0, "6e", 0.25); say(st.r1c1, "b5", 0.25); say(st.r1c2, "61", 0.25); say(st.r1c3, "10", 0.25); say(st.r2c0, "7c", 0.25); say(st.r2c1, "77", 0.25); say(st.r2c2, "21", 0.25); say(st.r2c3, "b6", 0.25); say(st.r3c0, "3d", 0.25); say(st.r3c1, "9e", 0.25); say(st.r3c2, "6e", 0.25); say(st.r3c3, "89", 0.25); }
556
+ say(rk.r0c0, "54", 0.1); say(rk.r0c1, "f0", 0.1); say(rk.r0c2, "10", 0.1); say(rk.r0c3, "be", 0.1);
557
+ say(rk.r1c0, "99", 0.1); say(rk.r1c1, "85", 0.1); say(rk.r1c2, "93", 0.1); say(rk.r1c3, "2c", 0.1);
558
+ say(rk.r2c0, "32", 0.1); say(rk.r2c1, "57", 0.1); say(rk.r2c2, "ed", 0.1); say(rk.r2c3, "97", 0.1);
559
+ say(rk.r3c0, "d1", 0.1); say(rk.r3c1, "68", 0.1); say(rk.r3c2, "9c", 0.1); say(rk.r3c3, "4e", 0.1);
560
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
561
+ say(cap, "AddRoundKey", 0.2);
562
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
563
+ }
564
+ recolor(st, fg, 0.25);
565
+ wait(0.35);
566
+ step("Round 10 · sub") {
567
+ recolor(chip0, cyan, 0.15);
568
+ recolor(chip1, dim, 0.15);
569
+ recolor(chip2, dim, 0.15);
570
+ recolor(chip3, dim, 0.15);
571
+ say(rnd, "Round 10 / 10", 0.15);
572
+ par { fade(f_xor, 0.15); show(f_sub, 0.2); recolor(st, cyan, 0.2); say(st.r0c0, "7a", 0.25); say(st.r0c1, "89", 0.25); say(st.r0c2, "2b", 0.25); say(st.r0c3, "3d", 0.25); say(st.r1c0, "9f", 0.25); say(st.r1c1, "d5", 0.25); say(st.r1c2, "ef", 0.25); say(st.r1c3, "ca", 0.25); say(st.r2c0, "10", 0.25); say(st.r2c1, "f5", 0.25); say(st.r2c2, "fd", 0.25); say(st.r2c3, "4e", 0.25); say(st.r3c0, "27", 0.25); say(st.r3c1, "0b", 0.25); say(st.r3c2, "9f", 0.25); say(st.r3c3, "a7", 0.25); }
573
+ par { say(sbox, "S-box: bd→7a 6e→9f 7c→10", 0.2); show(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
574
+ say(cap, "SubBytes", 0.2);
575
+ say(exp, "Each byte is replaced via the S-box (row = high nibble, col = low nibble).", 0.2);
576
+ }
577
+ recolor(st, fg, 0.25);
578
+ wait(0.35);
579
+ step("Round 10 · permute") {
580
+ recolor(chip0, dim, 0.15);
581
+ recolor(chip1, gold, 0.15);
582
+ recolor(chip2, dim, 0.15);
583
+ recolor(chip3, dim, 0.15);
584
+ say(rnd, "Round 10 / 10", 0.15);
585
+ par { fade(f_sub, 0.15); show(f_shift, 0.2); recolor(st, gold, 0.2); say(st.r0c0, "7a", 0.25); say(st.r0c1, "89", 0.25); say(st.r0c2, "2b", 0.25); say(st.r0c3, "3d", 0.25); say(st.r1c0, "d5", 0.25); say(st.r1c1, "ef", 0.25); say(st.r1c2, "ca", 0.25); say(st.r1c3, "9f", 0.25); say(st.r2c0, "fd", 0.25); say(st.r2c1, "4e", 0.25); say(st.r2c2, "10", 0.25); say(st.r2c3, "f5", 0.25); say(st.r3c0, "a7", 0.25); say(st.r3c1, "27", 0.25); say(st.r3c2, "0b", 0.25); say(st.r3c3, "9f", 0.25); }
586
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
587
+ say(cap, "ShiftRows", 0.2);
588
+ say(exp, "Row 0 is unchanged; row r is cyclically left-shifted by r bytes.", 0.2);
589
+ }
590
+ recolor(st, fg, 0.25);
591
+ wait(0.35);
592
+ step("Round 10 · xor") {
593
+ recolor(chip0, dim, 0.15);
594
+ recolor(chip1, dim, 0.15);
595
+ recolor(chip2, dim, 0.15);
596
+ recolor(chip3, lime, 0.15);
597
+ say(rnd, "Round 10 / 10", 0.15);
598
+ par { fade(f_shift, 0.15); show(f_xor, 0.2); recolor(st, lime, 0.2); say(st.r0c0, "69", 0.25); say(st.r0c1, "6a", 0.25); say(st.r0c2, "d8", 0.25); say(st.r0c3, "70", 0.25); say(st.r1c0, "c4", 0.25); say(st.r1c1, "7b", 0.25); say(st.r1c2, "cd", 0.25); say(st.r1c3, "b4", 0.25); say(st.r2c0, "e0", 0.25); say(st.r2c1, "04", 0.25); say(st.r2c2, "b7", 0.25); say(st.r2c3, "c5", 0.25); say(st.r3c0, "d8", 0.25); say(st.r3c1, "30", 0.25); say(st.r3c2, "80", 0.25); say(st.r3c3, "5a", 0.25); }
599
+ say(rk.r0c0, "13", 0.1); say(rk.r0c1, "e3", 0.1); say(rk.r0c2, "f3", 0.1); say(rk.r0c3, "4d", 0.1);
600
+ say(rk.r1c0, "11", 0.1); say(rk.r1c1, "94", 0.1); say(rk.r1c2, "07", 0.1); say(rk.r1c3, "2b", 0.1);
601
+ say(rk.r2c0, "1d", 0.1); say(rk.r2c1, "4a", 0.1); say(rk.r2c2, "a7", 0.1); say(rk.r2c3, "30", 0.1);
602
+ say(rk.r3c0, "7f", 0.1); say(rk.r3c1, "17", 0.1); say(rk.r3c2, "8b", 0.1); say(rk.r3c3, "c5", 0.1);
603
+ par { show(rk, 0.2); show(rklab, 0.2); fade(sbox, 0.2); }
604
+ say(cap, "AddRoundKey", 0.2);
605
+ say(exp, "Each state byte is XORed with the matching round-key byte.", 0.2);
606
+ }
607
+ recolor(st, fg, 0.25);
608
+ wait(0.35);
609
+ step("Output · emit") {
610
+ par { fade(f_xor, 0.15); recolor(st, lime, 0.2); say(st.r0c0, "69", 0.25); say(st.r0c1, "6a", 0.25); say(st.r0c2, "d8", 0.25); say(st.r0c3, "70", 0.25); say(st.r1c0, "c4", 0.25); say(st.r1c1, "7b", 0.25); say(st.r1c2, "cd", 0.25); say(st.r1c3, "b4", 0.25); say(st.r2c0, "e0", 0.25); say(st.r2c1, "04", 0.25); say(st.r2c2, "b7", 0.25); say(st.r2c3, "c5", 0.25); say(st.r3c0, "d8", 0.25); say(st.r3c1, "30", 0.25); say(st.r3c2, "80", 0.25); say(st.r3c3, "5a", 0.25); }
611
+ par { fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
612
+ say(cap, "Ciphertext", 0.2);
613
+ say(exp, "The state is read out column by column as the 16-byte ciphertext.", 0.2);
614
+ }
615
+ recolor(st, fg, 0.25);
616
+ wait(0.35);
617
+
618
+ par { recolor(st, lime, 0.4); fade(sbox, 0.2); fade(rk, 0.2); fade(rklab, 0.2); }
619
+ pulse(st, 0.8);
620
+ text(done, (cx, h - 250), "ciphertext 69c4e0d86a7b0430d8cdb78070b4c55a"); size(done, 22); color(done, lime); hidden(done);
621
+ show(done, 0.5);
622
+ wait(1.6);