← Back to documentation
Snapshot of projects/fog-crypto-core/requirements/REQ.md — 28 Nov 2026

Fog-Crypto Core — Requirements Specification (RDM)

Project instance of process/templates/requirements-specification.md — CMMI-DEV v2.0, Level 3 (Defined). This document replaces the preliminary REQ-F1..F5 list and closes the original audit (Audit Fog-Crypto Core.docx, 2.1/5) and engineering reviews #1–#5. Revision 2.0 applies a deliberate de-escalation: a right-sized MVP (Phase 1) baseline plus a Phase 2 hardening backlog.

0. Document control

  • Status: Approved — MVP (Phase 1) baseline frozen; Phase 2 backlog tracked, not blocking.
  • Revision: 2.0
  • Source documents: Spécification CMMI Niveau 3 - Projet Fog-Crypto Core.docx (baseline), Audit Fog-Crypto Core.docx (corrective actions), process/cmmi-charter.md.
  • Traceability: bidirectional matrix in requirements/RTM.md.
  • Change control: any change to a frozen acceptance criterion is a DAR decision.

Convergence freeze rule (anti-hysteresis)

Once this MVP baseline is frozen, no review may add a new Mandatory requirement. Any new finding is recorded as Desirable / Phase 2 — except a blocking security flaw or a factual correctness error (a wrong number / internal inconsistency), which may update a Mandatory criterion via a DAR decision. This rule prevents the "each fix breaks something else" escalation loop and is itself normative (decision D-17).

Tiers

  • Mandatory (M) — required for the MVP (Phase 1); forms the frozen baseline.
  • Desirable (D) — Phase 2 hardening; documented, traceable, non-blocking for the MVP.

1. Purpose and scope

Fog-Crypto Core is an HW/SW co-design FPGA accelerator for an embedded-Linux IoT gateway. It offloads two critical computations from the host CPU:

  1. Authenticated encryption of industrial data streams (data **integrity and confidentiality at the source**).
  2. Real-time signal pre-processing (CIC filtering, moving averages) of raw sensor/ADC data.

MVP (Phase 1) baseline — a functional, industrially-relevant accelerator:

  • Target: AMD Xilinx Zynq UltraScale+ MPSoC (baseline ZU3EG; package = board on hand).
  • Reference line: 100 MbE (10× headroom over typical IIoT aggregate rates).
  • CPU offload: ÷ 2 (halve the host CPU load on a Cortex-A53).
  • Crypto: AES-256-GCM, unmasked, key in BBRAM; CAVP vectors only.
  • Clock: ≥ 150 MHz.

Two disjoint data paths (never conflated):

  • Sensor path (DSP): FMC LPC ADC → HP-bank 1.8 V capture (IDELAYE3/ISERDESE3) → CIC / moving-average → pre/post-trigger FIFO + PL_PS_IRQ0 threshold alert.
  • Crypto path: Ethernet 100 MbE → AES-256-GCM enclave → coherent SG-DMA (S_AXI_HPCx_FPD) → PL MAC (802.3x PAUSE + tx_er fail-safe) → egress.

2. Requirements

Conventions: ID = unique requirement identifier. Tier ∈ {Mandatory (M), Desirable (D)}. Type ∈ {Functional, Performance, Security, Interface, Constraint, Verification}.

Functional requirements

REQ-FOG-FUNC-001 — AES-256 encryption engine (PL) — Functional · M Parameterizable, synthesizable SystemVerilog AES-256 engine.

  • Acceptance: bit-exact vs. NIST CAVP AES-256 vectors; ≥ 1 block / 16 cycles (ample headroom for 100 MbE); synthesizes within the §REQ-FOG-HW-002/003 budget.

REQ-FOG-FUNC-002 — Real-time signal pre-processing (PL) — Functional · M Hardware CIC / moving-average on the FMC LPC ADC stream with a hardware alert.

  • Acceptance: no CPU wake during nominal operation; ±1 LSB vs. a bit-exact reference model; CIC group delay N·(R−1)/(2·F_s) < 1.5 µs; threshold crossing asserts PL_PS_IRQ0 ≤ 2 µs and freezes a pre/post-trigger window (hardware freeze < 2 µs, distinct from the ≤ 100 Hz async read); PL_PS_IRQ0 W1C ack → read-back + dsb sy.

REQ-FOG-FUNC-003 — Raw ADC acquisition (FMC LPC) — Functional · M Ingest of raw samples from an ADC mezzanine via the FMC LPC connector.

  • Acceptance: high-speed clock/data wired to HP I/O banks (1.8 V) (native IDELAYE3/ ISERDESE3); no overvoltage, no metastability; per-lane eye calibration; 2.5/3.3 V CMOS inputs use unidirectional shifters; HD banks → slow GPIOs ≤ 10 MHz.

Performance requirements

REQ-FOG-PERF-001 — Host CPU offload ÷ 2 — Performance · M Hardware offload at least halves the host CPU load.

  • Acceptance: on a continuous 100 MbE AES-256-GCM stream (1500-byte packets), hardware offload reduces 1 × Cortex-A53 CPU to ≤ 50 % of the software baseline (measured before/after).
  • Phase 2: ÷ 10 (≤ 8.5 %) and the 64-byte stress (≤ 400 cycles/packet) — see backlog.

REQ-FOG-PERF-002 — Line-rate encryption (100 MbE) — Performance · M The crypto path sustains the reference line rate with zero frame loss.

  • Reference line: 100 MbE (Phase 2: 1 GbE).
  • Acceptance: ≥ 0.149 Mpps @ 64 B and ≥ 97.5 Mbps L2 goodput @ 1518 B, sustained, zero loss; crypto clock ≥ 150 MHz; iterative AES + a single pipelined GHASH (H⁴ interleaving if needed) — no naive feedback stall.

REQ-FOG-PERF-003 — Bounded latency — Performance · M Deterministic latency bounds on both paths.

  • Acceptance: AES-GCM core ≤ 100 cycles; IRQ → C wake-up ≤ 5 µs; crypto end-to-end ≤ 20 µs (excluding the 12.14 µs wire serialization of a 1518-byte frame); **sensor PL_PS_IRQ0 ≤ 2 µs** (≤ 50 µs to userspace handler).

Security requirements

REQ-FOG-SEC-001 — Key confidentiality (BBRAM baseline) — Security · M Key material is never readable by the host CPU or mapped into the user address space.

  • Acceptance (MVP): the AES-256 key is held in the Zynq BBRAM (or eFUSE) and never exposed through an AXI-Lite/MMIO register; no key path visible to software; JTAG/eFUSE secure bits locked.
  • Phase 2: CSU hardware PUF + per-board Black Key Blob + AES-256-KW + RTL AXI4-Lite TrustZone filter on M_AXI_HPM0_LPD — see backlog.

REQ-FOG-SEC-002 — AES-256-GCM only + fail-safe + store-and-forward — Security · M Authenticated encryption only, with fault containment.

  • Acceptance: hardware GHASH; tag verify; ECB/CTR forbidden. Decryption is Store-and-Forward (plaintext held until tag_ok, purged on failure — NIST SP 800-38D §5.2.2). On truncation / parity-KAT fault / tag mismatch → halt output, zeroize, ERR_CRYPTO_FAULT, tx_er FCS poisoning.

REQ-FOG-SEC-003 — Side-channel resistance (DPA/CPA) — Security · D (Phase 2) First-order masked S-boxes (DOM/TI) + clock jitter.

  • Acceptance (Phase 2): ≥ 256 bits/cycle fresh entropy; masked GHASH H = H0 ⊕ H1; DONT_TOUCH + post-synthesis TCL share-merge check; TVLA |t| < 4.5 over ≥ 1 M traces. **Not required for the MVP** (unmasked core is accepted).

REQ-FOG-SEC-004 — Cryptographic validation — Security · M Validated against recognized vectors.

  • Acceptance (MVP): NIST CAVP AES-256-GCM vectors pass. Phase 2: power-on **FIPS 140-3 KAT** (hard-fault before link-up).

REQ-FOG-SEC-005 — Nonce/IV uniqueness (96-bit) — Security · M The 96-bit nonce/IV is never reused with the same key.

  • Acceptance: IV[95:0] = Salt[31:0] ‖ Counter[63:0] (J0 = IV ‖ 0x00000001); **no runtime eFUSE writes**; session-key rotation on warm reboot / partial reconfig / counter wrap-warning.

Interface requirements

REQ-FOG-IF-001 — Coherent DMA (HPC, correct no-allocate semantics) — Interface · M SG-DMA through coherent S_AXI_HPCx_FPD (CCI-400 + SMMU/IOMMU).

  • Acceptance: dma-coherent DT property; AxUSER[0]=1, AxPROT=3'b010 (hard-wired). S_AXI_HPC is ACE-Lite "no L2 allocation" — descriptor accesses are simple (no AxCACHE "allocate" assumption); payload writes use AxCACHE = 4'b1010 (no Write-Allocate).
  • Phase 2: OCM-resident / batched (B ≥ 8) descriptor rings, ≤ 0.25 refill/pkt — see backlog.

REQ-FOG-IF-002 — VFIO from Phase 1 — Interface · M The device is bound to vfio-platform.

  • Acceptance: libvfio + IOMMU groups; no UIO, no /dev/mem; the vfio-platform device provides a vfio_reset_handler kernel module.

REQ-FOG-IF-003 — Dual-domain interrupts — Interface · M Two interrupt domains.

  • Acceptance: crypto path — coalesced IRQ (N descriptors / T µs); sensor path — dedicated non-coalesced PL_PS_IRQ0 for threshold alerts. Phase 2: NAPI-style PMD at 1 GbE saturation.

REQ-FOG-IF-004 — DMA ownership handshake + ARMv8 barriers — Interface · M Split ownership with correct barriers.

  • Acceptance: Status Ring (HW-only) + Submission Ring (SW-only); 64-byte alignment; ldar/stlr acquire/release. Phase 2: doorbell amortization over B ∈ [8, 32] — see backlog.

REQ-FOG-IF-005 — Clock-domain crossing correctness — Interface · M

  • Acceptance: async FIFOs + 2-FF; scoped XDC + set_bus_skew on Gray pointers; CDC report zero violations.

REQ-FOG-IF-006 — Interface Control Document (ICD) — Interface · M

  • Acceptance: design/ICD.md specifies register maps, 96-bit IV, PL_PS_IRQ0/1, descriptor format, IDELAYE3 calibration; frozen before RTL.

Hardware constraints

REQ-FOG-HW-001 — FMC LPC voltage & SelectIO — Constraint · M

  • Acceptance: VADJ = 1.8 V; high-speed ADC LVDS on HP banks (native IDELAYE3/ISERDESE3, no shifter on native 1.8 V LVDS); SN74AXC/AVC only for 2.5/3.3 V CMOS; HD banks → slow GPIOs.
  • Phase 2: package XCZU3EG-SFVC784 (156 HP pins) if the on-hand board lacks HP pins.

REQ-FOG-HW-002 — SWaP & timing budget — Constraint · M

  • Acceptance: ≤ 70 % LUT/FF/DSP/BRAM on ZU3EG; WNS ≥ 0 ns at ≥ 150 MHz. Phase 2: ≥ 250 MHz.

REQ-FOG-HW-003 — OOC synthesis gate — Constraint · M

  • Acceptance: the (unmasked) AES-256-GCM core is synthesized out of context on ZU3EG before RTL freeze, confirming the ≤ 70 % budget. Phase 2: 2-share DOM masking profile + entropy generator included (≤ 15 000 LUTs enclave).

Software partitioning requirements

REQ-FOG-SW-001 — Data plane in C (no Python) — Functional · M

  • Acceptance: isolated, core-pinned, SCHED_FIFO; drives SG-DMA + PL MAC via VFIO; ldar/stlr; ARP/LLDP punt via a lockless POSIX shared-memory ring; no Python on the packet path.
  • Phase 2: PMD busy-polling with zero syscalls / bounded L2D_CACHE_REFILL — see backlog.

REQ-FOG-SW-002 — Control plane ≤ 100 Hz + hardware PAUSE — Constraint · M

  • Acceptance: control loop < 100 Hz; owns supervision, telemetry, key rotation, threshold config, PL_PS_IRQ0 handling, PHY MDIO (mdio_bus/netlink or VFIO — never /dev/uio); **802.3x PAUSE handled 100 % in the PL MAC hardware**; ARP via the IPC ring.

Verification & validation requirements

REQ-FOG-VV-001 — UVM — Verification · M

  • Acceptance: SVA + functional coverage ≥ 95 % + constrained-random + fault injection (truncated frames, corrupted tags, KAT failure, tx_er, AxPROT[1] rejection, store-and-forward purge).

REQ-FOG-VV-002 — Reference-model co-simulation — Verification · M

  • Acceptance: bit-exact C/Python golden model (AES-256-GCM + fixed-point CIC) in CI.

REQ-FOG-VV-003 — HIL / on-board benchmark — Verification · M

  • Acceptance: 100 MbE throughput, ÷ 2 CPU, latency, and ≤ 2 µs sensor IRQ measured on the ZU3EG board and archived in performance/.

2.1 Phase 2 hardening backlog (Desirable, non-blocking)

Deferred itemSource req.Phase 2 target
1 GbE line rate + 64-byte stressPERF-002, PERF-0011.488 Mpps @ 64 B; ≤ 400 cycles/pkt
÷ 10 CPU offloadPERF-001≤ 8.5 % on 1 × A53
DPA masking (DOM + entropy + TVLA)SEC-003t< 4.5, ≥ 256 b/cyc
FIPS 140-3 KAT + side-channel evalSEC-004power-on KAT, hard-fault
CSU PUF + Black Key Blob + AES-256-KW + RTL TZ filterSEC-001per-board key, HPM0_LPD
PMD busy-polling + doorbell batching + ≤ 0.25 refill/pktSW-001, IF-003, IF-004, IF-0011 GbE saturation
XCZU3EG-SFVC784 packageHW-001156 HP pins
≥ 250 MHz timingHW-002WNS ≥ 0 @ 250 MHz
Masked-core OOC budget (≤ 15k LUT)HW-0032-share DOM frozen

3. Industrial constraints

  • Real-time streams: continuous crypto + ADC sensor stream, no deterministic OS.
  • Resource limits (ZU3EG): 70 560 CLB LUTs / 360 DSP48E2 / 216 BRAM36.
  • Power/envelope: HP/HD bank voltage limits (HP ≤ 1.8 V); VADJ = 1.8 V.
  • Security standards: IEC 62443 alignment; AES-256-GCM per NIST/FIPS 140-3 (CAVP in MVP).
  • Determinism: fixed-point DSP, no wall-clock in the data path, coalescing, split ownership.
  • Key material: survives power cycles in BBRAM (MVP); never written to eFUSE at runtime.

4. Out of scope

  • 1 GbE line rate and DPA/FIPS hardening — Phase 2 (see backlog), not MVP.
  • PCIe / discrete FPGA cards and legacy "SPI/PCIe" wording — superseded by AXI4.
  • Cloud / back-office management beyond network egress.
  • Asymmetric crypto (RSA/ECC) and TLS termination.
  • Formal FIPS 140-3 module certification.

5. Mapping from the legacy list (REQ-F1..F5)

LegacyNew requirement(s)
REQ-F1 (÷10 CPU)REQ-FOG-PERF-001 (÷ 2 MVP, ÷ 10 Phase 2)
REQ-F2 (line-rate)REQ-FOG-PERF-002 (100 MbE MVP, 1 GbE Phase 2), REQ-FOG-PERF-003
REQ-F3 (bus interface)REQ-FOG-IF-001 … IF-006 (AXI4; SPI/PCIe superseded)
REQ-F4 (integrity at source)REQ-FOG-SEC-002, REQ-FOG-SEC-001
REQ-F5 (synthesizable RTL)REQ-FOG-FUNC-001, REQ-FOG-HW-002, REQ-FOG-HW-003

Source: raw markdown — published as-is from the source repository.