Skip to content

Bypass Resistance Roadmap - Ensuring the Vision Holds True

Executive Summary

To ensure the Mandalorian Project's vision cannot be bypassed, we must move beyond marketing claims to provable security. This document outlines the concrete technical measures required to achieve true bypass resistance.


Critical Vulnerability: Current Hardware Limitations

VisionFive 2/JH7110 Reality Check

Security Feature Required VisionFive 2 Status Risk Level
OTP Key Fusing βœ“ Essential ❌ Not Available πŸ”΄ Critical
Secure Enclave/TEE βœ“ Essential ❌ Not Available πŸ”΄ Critical
Tamper Detection Mesh βœ“ Essential ❌ Not Available πŸ”΄ Critical
Side-Channel Resistance βœ“ High ❌ Not Available πŸ”΄ Critical
JTAG Disable βœ“ High ⚠️ Software-only 🟑 Medium
Hardware Watchdog βœ“ Medium βœ“ Available 🟒 Low

Verdict: VisionFive 2 is suitable for development only, not production security.


Phase 1: Immediate Hardening (0-6 months)

1.1 Software Security Implementation

Constant-Time Cryptography

// Required: Constant-time Ed25519 signing to prevent timing attacks
// Current implementation MUST be audited for:
// - Branch prediction leaks
// - Cache timing attacks  
// - Power analysis vulnerabilities

// Use: libsodium with constant-time guarantees
// OR: formally verified implementations from HACL* project

Fault Injection Resistance

// Required: Double-check all critical operations
int verify_signature(const uint8_t *msg, const uint8_t *sig) {
    int result1 = ed25519_verify(msg, sig);
    int result2 = ed25519_verify(msg, sig);  // Redundant check

    if (result1 != result2) {
        trigger_security_violation();  // Detect glitching attack
        return -1;
    }
    return result1;
}

1.2 Formal Verification Critical Paths

Component Verification Tool Property to Prove Priority
BeskarVault Frama-C + ACSL No key leakage πŸ”΄ Critical
Verified Boot Coq/Isabelle Chain of trust unbroken πŸ”΄ Critical
Continuous Guardian CBMC Checks cannot be disabled πŸ”΄ Critical
BeskarLink Tamarin Prover Protocol security 🟑 High
seL4 IPC seL4 proofs already βœ“ Capability isolation βœ“ Done

1.3 Reproducible Builds

# Required: Nix build configuration for bit-for-bit reproducible binaries
# File: build/mandalorian-build.nix

{ pkgs ? import <nixpkgs> {} }:

pkgs.stdenv.mkDerivation {
  name = "beskarcore-reproducible";
  src = ./beskarcore;

  # Pin all dependencies to specific versions
  buildInputs = [
    pkgs.gcc-riscv64-unknown-elf
    pkgs.cmake
    pkgs.ninja
  ];

  # Deterministic build flags
  CMAKE_FLAGS = [
    "-DCMAKE_C_COMPILER=riscv64-unknown-elf-gcc"
    "-DCMAKE_BUILD_TYPE=Release"
    "-DREPRODUCIBLE_BUILD=ON"
  ];

  # Strip timestamps and non-deterministic data
  postInstall = ''
    find $out -type f -exec strip --strip-all {} \;
    find $out -type f -exec touch -d '@0' {} \;
  '';
}

Phase 2: Hardware Security Module (6-12 months)

2.1 Discrete Secure Element Integration

Recommended: ATECC608B or STSAFE-A100

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Custom PCB Design             β”‚
β”‚                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  JH7110 SoC │◄──►│  ATECC608B   β”‚    β”‚
β”‚  β”‚             β”‚I2C β”‚  Secure Elem β”‚    β”‚
β”‚  β”‚             β”‚    β”‚              β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”  β”‚    β”‚  β€’ Key slots β”‚    β”‚
β”‚  β”‚  β”‚ seL4  β”‚  β”‚    β”‚  β€’ ECDSA     β”‚    β”‚
β”‚  β”‚  β”‚micro- β”‚  β”‚    β”‚  β€’ SHA-256   β”‚    β”‚
β”‚  β”‚  β”‚kernel β”‚  β”‚    β”‚  β€’ Tamper    β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚    β”‚    detect    β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                         β”‚
β”‚  Features:                              β”‚
β”‚  β€’ Keys generated IN secure element     β”‚
β”‚  β€’ Private keys NEVER leave chip        β”‚
β”‚  β€’ Physical tamper mesh on enclosure    β”‚
β”‚  β€’ Temperature/voltage glitch detection β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2.2 PCB Security Features

Feature Implementation Cost Timeline
Tamper Mesh Conductive ink pattern $5/board 3 months
Epoxy Encapsulation Chemical-resistant coating $10/board 3 months
Side-Channel Shielding Faraday cage enclosure $50/unit 6 months
Voltage Glitch Detect Analog comparator circuit $2/board 3 months
Temperature Sensor Β±0.1Β°C accuracy $1/board 1 month

Phase 3: Custom Silicon (24-36 months)

3.1 RISC-V SoC with Integrated HSM

Target Specifications:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Custom RISC-V Security SoC         β”‚
β”‚                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚     RISC-V Core (RV64GC)        β”‚    β”‚
β”‚  β”‚   β€’ 1.5 GHz, 4-wide issue       β”‚    β”‚
β”‚  β”‚   β€’ Crypto extensions (K)       β”‚    β”‚
β”‚  β”‚   β€’ Vector extensions (V)       β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚    Integrated HSM (Secure En)   β”‚    β”‚
β”‚  β”‚   β€’ OTP key fusing (256-bit)    β”‚    β”‚
β”‚  β”‚   β€’ Ed25519 hardware accel      β”‚    β”‚
β”‚  β”‚   β€’ SHA3-256 hardware accel     β”‚    β”‚
β”‚  β”‚   β€’ CRYSTALS-Dilithium (opt)    β”‚    β”‚
β”‚  β”‚   β€’ TRNG with >100 Mbps         β”‚    β”‚
β”‚  β”‚   β€’ Tamper mesh (on-chip)       β”‚    β”‚
β”‚  β”‚   β€’ Voltage/temp sensors        β”‚    β”‚
β”‚  β”‚   β€’ Self-destruct on breach     β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                         β”‚
β”‚  Security Features:                     β”‚
β”‚  β€’ JTAG permanently disabled via fuse   β”‚
β”‚  β€’ No debug interface post-production   β”‚
β”‚  β€’ Boot ROM immutable in silicon        β”‚
β”‚  β€’ Hardware watchdog (unstoppable)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3.2 Silicon Vendor Options

Vendor Process Security Features NRE Cost Timeline
SiFive 22nm Custom cores $3M 18-24 mo
Andes 28nm Security extensions $2M 12-18 mo
Codasip 40nm Customizable $1.5M 12-18 mo
Custom (TSMC) 7nm Full control $10M+ 36+ mo

Phase 4: Supply Chain Security

4.1 Reproducible Hardware

Component Verification Method Risk Mitigation
SoC X-ray imaging + power analysis Spot-check batches
Secure Element Challenge-response test 100% test at factory
PCB Automated optical inspection Photo documentation
Enclosure Tamper-evident seals Serial number tracking
Firmware Ed25519 signature Reproducible builds

4.2 Manufacturing Security

Factory Security Protocol:
1. Secure element keys generated IN factory HSM
2. Private keys NEVER transmitted electronically
3. One-time programming done via isolated air-gapped system
4. All programming logs to immutable Shield Ledger
5. Post-programming verification by independent team
6. Physical transport in tamper-evident containers
7. Chain of custody documentation for all units

Continuous Guardian: Implementation Requirements

5.1 Unbypassable Architecture

// File: beskarcore/src/continuous_guardian.c

// CRITICAL: Guardian code must be in read-only memory
__attribute__((section(".guardian_ro")))
const guardian_code_t guardian_rom = {
    .verify_interval_ms = 50,
    .signature = GUARDIAN_ED25519_SIG,  // Signed at build time
    .code_hash = { /* SHA3-256 of guardian code */ }
};

// CRITICAL: Hardware watchdog cannot be disabled by software
void guardian_init(void) {
    // Configure hardware watchdog timer
    // Once enabled, CANNOT be disabled until reset
    watchdog_configure(WATCHDOG_TIMEOUT_MS);
    watchdog_enable_permanent();  // One-way operation

    // Verify guardian code signature before starting
    if (!ed25519_verify(&guardian_rom, &build_time_public_key)) {
        emergency_halt();
    }

    // Start continuous verification
    timer_start_interrupt(50, guardian_check);
}

// CRITICAL: Runs from ROM, cannot be patched
__attribute__((section(".guardian_ro")))
void guardian_check(void) {
    // 1. Fast CRC32 of critical memory regions
    uint32_t crc = crc32_memory_regions();
    if (crc != expected_crc) {
        goto violation;
    }

    // 2. Full SHA3-256 verification (every 20th check)
    static int check_count = 0;
    if (++check_count % 20 == 0) {
        uint8_t hash[32];
        sha3_256_memory_regions(hash);
        if (memcmp(hash, expected_hash, 32) != 0) {
            goto violation;
        }
    }

    // 3. Verify code segment signatures
    if (!verify_code_signatures()) {
        goto violation;
    }

    // 4. Pet the watchdog
    watchdog_pet();
    return;

violation:
    // CRITICAL: Irreversible key destruction
    beskarvault_destroy_all_keys();
    shield_ledger_log_violation();
    emergency_halt();
}

5.2 Hardware Watchdog Requirements

Feature Implementation Bypass Resistance
Separate clock domain Independent oscillator Clock glitching
Voltage monitoring Brown-out detection Voltage glitching
Temperature monitoring Β±1Β°C accuracy Temperature attacks
External trigger Dedicated GPIO Software disable
Permanent enable OTP fuse Reconfiguration

Betrayal Resistance: Anti-Coercion Measures

6.1 Duress Detection

// File: beskarcore/include/beskar_vault.h

typedef enum {
    PIN_TYPE_NORMAL = 0,
    PIN_TYPE_DURESS = 1,    // Silent alarm + data destruction
    PIN_TYPE_WIPE = 2,      // Immediate full wipe
    PIN_TYPE_LAWFUL = 3,    // Plausible deniability mode
} pin_type_t;

// Duress PIN behavior:
// 1. Appears to unlock normally
// 2. Silently notifies trusted contacts
// 3. Marks all data for destruction on next sync
// 4. Activates continuous monitoring mode

6.2 No Remote Attestation Backdoors

Feature Risk Mitigation
Remote attestation Privacy leak Local-only attestation
Cloud backup Coercion target Peer-to-peer backup only
Automatic updates Supply chain attack User-controlled only
Debug logs Information leak Memory-only, no persistence

Verification Checklist

Before Production Release

  • [ ] Formal verification of BeskarVault key management
  • [ ] Formal verification of verified boot chain
  • [ ] Side-channel analysis (power, timing, EM)
  • [ ] Fault injection testing (voltage, clock, laser)
  • [ ] JTAG/debug interface permanently disabled
  • [ ] Reproducible builds verified by third party
  • [ ] Third-party security audit completed
  • [ ] Bug bounty program active
  • [ ] Supply chain security audit
  • [ ] Tamper mesh functional test
  • [ ] Hardware watchdog unstoppable
  • [ ] Duress PIN functionality verified
  • [ ] Key destruction irreversibility proven

Cost Summary

Phase Timeline Cost Deliverable
1: Software Hardening 6 months $200K Reproducible builds, formal verification
2: HSM Integration 6 months $100K Custom PCB with ATECC608B
3: Custom Silicon 24-36 months $2-5M RISC-V SoC with integrated HSM
4: Supply Chain Ongoing $50K/year Audited, reproducible manufacturing
Total Phase 1-2 12 months $300K Production-ready secure hardware

Conclusion

Without these measures, your system WILL be bypassed by:

  • Nation-state actors with physical access
  • Sophisticated criminals with $10K equipment
  • Supply chain interdiction

With these measures, bypass requires:

  • Custom silicon analysis ($1M+ equipment)
  • Physical destruction of the device
  • Coercion of the user (duress PIN mitigates)

The vision is achievable, but requires investment in actual security, not just claims.

"This is the way." πŸ”₯