Technical Whitepaper

On-Device Security & Architecture

How PocketAI isolates inference, preserves battery, and eliminates cloud surveillance vectors.

1. Native ARM Sandbox Execution

PocketAI bundles compiled 64-bit llama.cpp native binaries optimized with ARM NEON instructions. The native C++ library executes in an isolated process sandbox managed directly by the Android Linux kernel. No unauthenticated third-party code is ever downloaded or dynamically evaluated.

2. SHA-256 Supply-Chain Verification

Large language model weights can be gigabytes in size. To prevent corrupted downloads or man-in-the-middle tampering, every model download:

  • Downloads into a temporary .part buffer with HTTP Range resume support.
  • Calculates a continuous SHA-256 cryptographic digest across the entire byte payload.
  • Refuses to load and discards any file whose checksum deviates from our verified manifest.

3. Memory Safety & Context Capping

Android process death from Out-Of-Memory (OOM) killer is the primary risk in mobile LLM execution. PocketAI incorporates an active memory guard that checks available device RAM before allocation:

Total RAM Needed ≈ Model_Weights (e.g. 1.06 GB) + (Context_Length * 2 * n_layers * n_heads * head_dim * precision) + App_Overhead (~300 MB)

4. Zero Network Dependencies for Pro Entitlements

Cloud license verification requires constant pinging of authentication servers. PocketAI uses local HMAC-SHA256 signature verification. Your entitlement is verified locally on the CPU in less than 2 milliseconds with zero battery drain.