How mupq/pqm4 works
Main Components
The system architecture should be divided into these key components:
a) Hardware Layer:
• ARM Cortex-M4 Development Boards
• NUCLEO-L4R5ZI (primary)
• STM32F4 Discovery
• NUCLEO-L476RG
• CW308T-STM32F3
• MPS2-AN386 (FPGA/simulation)
b) Core Cryptographic Components:
• KEM (Key Encapsulation Mechanisms) Module
• Digital Signature Module
• Common Cryptographic Primitives
• FIPS202 (SHA-3/SHAKE)
• SHA-2
• AES Module
c) Testing & Benchmarking Framework:
• Test Runner
• Benchmark System
• Testvector Generator
• Stack Usage Analyzer
d) Build System:
• Make-based Compilation
• Platform-specific Configurations
• Optimization Controls
Relationships and Data Flow
• Communication between host PC and target board
• Data flow between cryptographic modules
• Test/benchmark data collection paths
• Build system dependencies
Detailed Component Breakdown
For each cryptographic implementation, show:
• API interfaces
• Internal components
• Memory management
• Platform-specific optimizations
Implementation Variants
Different implementation types:
• clean (from PQClean)
• ref (NIST reference)
• opt (C optimized)
• m4 (Cortex-M4 optimized)
• m4f (Cortex-M4F optimized)
┌─────────────────────────────────────────────────────────┐
• Host System │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Test Scripts│ │Benchmark Tool│ │Build System │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┘
┌───────────────────────────────────────────────────────┐
• Communication Layer │
• ┌────────────┐ ┌───────────┐ ┌────────────┐ │
• Serial │ │ ST-Link │ │ QEMU │ │
• ┘ └───────────┘ └────────────┘ │
• ┘
┌───────────────────────────────────────────────────────┐
• Target Hardware Layer │
• ┌────────────────────────────────────────┐ │
• ARM Cortex-M4 Board │ │
• ┌──────────┐ ┌──────────┐ │ │
• KEM │ │ Sign │ │ │
• ┘ └──────────┘ │ │
• ┌──────────┐ ┌──────────┐ │ │
• SHA-3 │ │ AES │ │ │
• ┘ └──────────┘ │ │
• ┘ │
• ┘
Additional Elements
Include:
• Version information
• Supported platforms
• Memory requirements
• Performance metrics collection points
• Error handling paths
• Configuration options