Paul FOLTZEREmbedded systems · AI
FRCV
All projects
Coursework projectCompletedSeptember – October 2026

ASCON on FPGA — from SystemVerilog to the ZedBoard

A hardware implementation of ASCON authenticated encryption, the NIST standard, then full integration on a Zynq-7020 board.

A project from the Embedded Systems major: design the hardware core of ASCON-128 authenticated encryption in SystemVerilog, validate it in simulation, then build the integration layer that makes it run and display results on a real FPGA board.

ASCON is the authenticated cipher selected by NIST in 2023 for lightweight cryptography — the kind used in constrained devices, sensors and smart cards. Its principle fits in one sentence: a 320-bit state churned by a permutation, of which only 64 bits (the “rate”) are ever exposed to data; the rest, the capacity, never leaves. Four phases run over that same state — initialisation, absorption of associated data, block-by-block encryption, finalisation — and a single pass produces both the ciphertext and a 128-bit authentication tag.

ASCON-128 — the four phases ONE 320-BIT STATE, CROSSED BY FOUR PHASES rate — 64 bits capacity — 256 bits data only enters through the rate; the capacity stays secret 1 — INITIALISATION p¹² state ← IV ‖ key ‖ nonce 12 permutation rounds then XOR the key at the end 2 — ASSOCIATED DATA p⁶ XOR the block into the rate 6 rounds per block authenticated, not encrypted 3 — ENCRYPTION p⁶ C = P ⊕ rate the rate becomes the ciphertext 6 rounds per block 4 — FINALISATION p¹² XOR the key 12 permutation rounds tag ← 128 output bits key 128 b · nonce 128 b secret and public inputs associated data headers, metadata… plaintext, block by block 64 bits at a time ciphertext authentication tag — 128 bits Authenticated encryption: a single pass produces both the ciphertext and the tag. Flip one bit of the message or the associated data and the tag changes — tampering is detected.
The four phases of ASCON-128. Everything happens on a single 320-bit state: data only enters through the 64-bit rate, the capacity stays secret, and that same state ultimately yields the tag.

The heart of the implementation is the permutation. One round chains three purely combinational layers: adding a round constant, a substitution layer made of 64 five-bit S-boxes instantiated in parallel by a generate block — each taking a vertical slice of bits across the five state words — then linear diffusion where each word is XORed with two circularly rotated copies of itself. I had already implemented ASCON entirely from scratch the previous year, in a separate academic project; this version starts from the code base distributed with the assignment — enabled registers, state multiplexer and counter provided — to focus the effort on the permutation, its state machine, and above all the hardware integration that follows.

The defining architectural choice is to fold that round onto itself: a single combinational instance, looped onto a 320-bit state register, executes one round per clock cycle. This is the classic area-versus-throughput trade-off — unrolling the twelve rounds would have cut the latency but multiplied the logic by as much. A 26-state Moore machine sequences the phases and drives every enable signal, while a round counter with two init values tells the twelve rounds of initialisation apart from the six rounds of data processing.

ASCON — one permutation round, and its implementation ONE PERMUTATION ROUND — THREE SUCCESSIVE LAYERS Pc — constant addition A round constant (F0, E1, D2 … 4B) is XORed into the low byte of word X2. Purpose: break the symmetry between rounds, so no round looks like the next one. Ps — substitution 64 five-bit S-boxes in parallel. The i-th box takes bit i of each of the 5 words: a vertical slice. Purpose: non-linearity. It is the only layer that cannot be undone with a XOR. Pl — linear diffusion Each word is XORed with two copies of itself, circularly rotated: X0: 19 and 28 · X1: 61 and 39 · X2: 1 and 6 … Purpose: spread the influence of one bit across the whole word within a few rounds. IN HARDWARE — ONE ROUND PER CLOCK CYCLE mux init / loop input XOR data · key Pc Ps Pl output XOR key state register 320 bits the register output feeds back to the mux: 12 rounds (p¹²) or 6 rounds (p⁶) depending on the phase registers ciphertext · tag The three layers are purely combinational: the logic depth of one round sets the maximum frequency, and the number of rounds sets the latency. A 26-state Moore FSM sequences the phases and drives the enable signals; a round counter with two init values distinguishes p¹² from p⁶.
One permutation round and its hardware translation. The three layers are combinational: their logic depth sets the maximum frequency, the number of rounds sets the latency.

Validation was done in simulation on a testbench supplied with the assignment, with a 128-bit key and nonce and several data blocks. The waveform reads like the specification: the end-of-phase signals light up one after another, the ciphertext block appears when cipher_valid goes high, and the tag settles at the end of finalisation.

Simulation waveform of ASCON encryption in Vivado
Simulation of a complete encryption. The phase sequence can be followed through the end-of-phase signals — initialisation, associated data, encryption — then the ciphertext block appears as cipher_valid goes high.

The second part of the project was making all this visible on a real board, a ZedBoard built around a Zynq-7020. Around the core I wrote an integration layer: an MMCM taking the board clock from 100 to 150 MHz, a block RAM holding the blocks to encrypt, an address counter, and a second state machine — ten states this time — orchestrating everything: read a block, present it, wait for the core's acknowledgement, increment, repeat, then trigger finalisation.

ASCON on ZedBoard — the integration layer ZEDBOARD — ZYNQ-7020 (xc7z020) BOARD INPUTS 100 MHz clock on-board oscillator start button · reset 5 switches sel_val · sel_bits MMCM 100 → 150 MHz driver FSM 10 states read, present, wait, increment block RAM 64-bit blocks associated data + plaintext counter read address ASCON CORE SystemVerilog RTL 26-state Moore FSM 320-bit permutation 1 round per cycle outputs: ciphertext 64 b tag 128 b data init · associate_data · finalisation · data_valid end_initialisation · end_associate · cipher_valid · end_tag — the FSM waits on these acknowledgements two multiplexers ciphertext or tag, then 1 byte out of 16 8 LEDs one byte displayed the switches pick which byte to read Implementation result: 857 LUTs (1.6 %), 573 flip-flops, 1 block RAM, timing met at 150 MHz with 0.182 ns of slack.
The integration layer on the ZedBoard: clocking, memory, driver FSM and display chain. The ASCON core is just one block among others — everything else exists to feed it and make its result readable.

That left the display problem: how do you show a 64-bit ciphertext and a 128-bit tag on eight LEDs? The answer is a cascade of two multiplexers driven by the board switches — the first picks between ciphertext and tag, the second selects one byte out of sixteen. You walk through the result one byte at a time. The implementation fits in 857 LUTs, 1.6 % of the device, with 573 flip-flops and a single block RAM, and meets timing at 150 MHz with 0.182 ns of slack.

Implementation view of the placed-and-routed design on the Zynq-7020
The placed-and-routed design on the Zynq-7020. The occupied logic (highlighted) fits within a fraction of a single clock region — 1.6 % of the device's LUTs.

Key points

  • ASCON permutation in SystemVerilog: three combinational layers, 64 parallel S-boxes, one round per cycle
  • 26-state Moore machine sequencing the four phases of authenticated encryption
  • Full FPGA integration layer: MMCM, block RAM, driver FSM, multiplexed display on 8 LEDs
  • Implemented on Zynq-7020: 857 LUTs (1.6 %), timing met at 150 MHz