A high-performance hardware implementation of a custom Hash algorithm based on the AES S-Box. This project was developed as part of the Hardware and Embedded Security course at the University of Pisa.
This module computes a 64-bit digest from an input message of arbitrary size. It leverages the non-linear properties of the AES S-Box to ensure cryptographic robustness. The architecture follows a synchronous FSMD (Finite State Machine with Datapath) approach, partitioned into four distinct logic blocks for optimal timing and modularity.
- Algorithm: Iterative transformation using AES S-Box (LUT-based).
- Handshake: Robust partial handshake protocol (
READY_TO_READ,byte_in_valid). - Architecture: Single-inter-round-pipelined iterative design.
- Verification: Golden reference model in C and automated SystemVerilog testbenches.
The design is optimized for FPGA implementation and includes:
- Control Unit: A 5-state FSM managing the synchronization and handshake.
- Datapath: Integrated XOR logic, circular barrel shifter, and AES S-Box LUT.
-
Internal State: 64-bit register array (
$H$ ) initialized with a specific IV.
The core was synthesized and verified on an Intel Cyclone V FPGA (5CGXFC9D6F27C7) using Quartus Prime.
| Metric | Value |
|---|---|
| Max Frequency ( |
111.15 MHz |
| Throughput (Steady State) | 3.07 Mbps |
| Area Occupancy | 224 ALMs |
| Efficiency | 0.0137 Mbps/ALM |
| Latency |
|
/db: SystemVerilog source files (Core logic and S-Box LUT)./tb: Testbench files for functional verification./model: Golden reference model implemented in C./modelsim: Simulation scripts and waveform configurations./quartus: Project files, SDC constraints, and synthesis reports.
You can run the simulation using ModelSim. A Python script launch_project.py is provided to automate the verification process:
- Compiles the C Golden Model.
- Runs the ModelSim simulation.
- Compares the outputs and reports the matching percentage.
Open the project in Intel Quartus Prime, set full_hash_wrapper.sv as the top-level entity, and run the compilation flow to inspect Timing Analysis (STA) and Resource Utilization.
- Giorgio Cecchi
- Luca Giannini
GPLv3 (GNU General Public License v3.0) - See the LICENSE file for details.