# Fog-Crypto Core — Technical Report

**28 November 2026** · Helveticore OÜ (Tallinn, Estonia)

*Fog-Crypto Core: an FPGA hardware accelerator (HW/SW co-design) for an embedded-Linux IoT
gateway, engineered under a CMMI Level 3 "Defined" process. This report covers the
implemented AES-256-GCM datapath (Milestones 0–5) and its verification.*

| | |
| --- | --- |
| **Project** | Fog-Crypto Core — FPGA hardware accelerator |
| **Hardware target** | AMD Xilinx Zynq UltraScale+ MPSoC — baseline ZU3EG |
| **Methodology** | CMMI-DEV Level 3 — V-Model · TDD · CBSE |
| **Report scope** | Milestones M0–M5 (crypto datapath) |
| **Status** | Datapath complete and bit-exact; integration + board work pending |

---

## Abstract

Fog-Crypto Core offloads authenticated encryption (AES-256-GCM) from the gateway CPU to the
FPGA fabric. The M0–M5 work delivers a complete SystemVerilog crypto datapath: an iterative
AES-256 core, a 4-stage pipelined GHASH (CLMUL + reduction) decoupled from the keystream
path, a store-and-forward + fail-safe wrapper (SEC-002), an AXI4-Stream wrapper, and SG-DMA
/ PL-MAC skeletons. The engine is **bit-exact over the full NIST CAVP GCM AES-256 corpus
(3,933 vectors)** and cross-checked against the vendored golden reference model (BLu85).

## Modules (`src/crypto-engines/`)

- `aes256_core.sv` — iterative AES-256 encrypt (52-cycle key expansion, 15 cyc/block).
- `ghash_core.sv` / `ghash_accumulator.sv` — 4-stage pipelined GF(2^128) multiplier.
- `aes256_gcm.sv` — GCM datapath (GCTR + pipelined GHASH + tag).
- `aes256_gcm_saf.sv` — store-and-forward + fail-safe (SEC-002).
- `aes256_gcm_axis.sv` — AXI4-Stream wrapper.
- `sg_dma.sv` / `pl_mac.sv` — integration skeletons.

## Verification (all green — Verilator 5.054 + cocotb 2.1)

- **NIST CAVP GCM AES-256 (IVlen=96): full 3,933-vector corpus bit-exact** (2,625 encrypt +
  1,308 decrypt, Taglen 32–128 bits).
- pycryptodome randomized sweep + FIPS-197 C.3 + NIST GHASH vector + 200 random GHASH.
- M4 fault injection: encrypt streams, decrypt success, corrupted-tag → no release.

## Next steps (integration / board)

1. Run the OOC synthesis in Vivado (`src/crypto-engines/synth/`) for real WNS + utilization.
2. Wire the SG-DMA data path to the AXI4-Stream core (128-bit↔byte serializer + stream↔MM bridge).
3. Full GMII/RGMII serialization for the PL MAC.
4. On-board benchmark (ZU3EG + Vivado + embedded Linux host).
