How secworks/aes works
Project type and purpose
• This is an open-source hardware IP core implementing the AES symmetric block cipher (FIPS-197) in Verilog.
• It provides a reusable “aes” core that can be integrated into ASIC or FPGA designs, supports key expansion (128/256-bit), separate encipher/decipher datapaths, and is built/tested via FuseSoC and OpenLane/sky130 flows.
File structure
• Top-level files: LICENSE, README.md, .github/ci.yml for CI.
• src/model/python: reference Python implementation of AES for functional verification.
• src/rtl: Verilog sources:
• aes.v – top-level wrapper (register interface, control/status, key & data ports)
• aes_core.v – core FSM, control logic
• aes_encipher_block.v, aes_decipher_block.v – datapaths
• aes_key_mem.v – round-key storage
• aes_key_gen.v (key expansion)
• src/tb: individual block and full-core testbenches.
• data/sky130.tcl + toolruns/Makefile: ASIC build scripts for SKY130 PDK with OpenLane.
README for insights
• Shows supported variants (on-the-fly keygen, dual-keys, CMT-SBOX).
• FuseSoC integration for simulation/linting.
Elements
• Clear component labels (e.g., “Control FSM”, “Key Mem”, “Encipher Block”)
• Key_in → Control FSM → Key Gen → Key Mem → Encipher/Decipher
• Data_in → Encipher/Decipher → Data_out
• Blue blocks = control logic
• Green blocks = datapaths
• Orange blocks = memory
• Gray blocks = external interfaces or test models
• Interface signals at block boundaries with widths (e.g., [127:0])