QT 6.5 HOWITZER
DOCS / TOOLING & RUNTIME / MOBILE KEY ENCLAVE

Mobile Key Enclave & IPC Protocol

Howitzer Mobile acts as a hardware wallet for LLM API keys on iOS and Android. It prevents malicious or unverified mobile applications from harvesting raw developer API credentials.

1. The Vulnerability: Raw Key Pasting

When users paste an OpenAI or Anthropic API key into a third-party mobile client, that application gains full, unrestricted access to the user's account balance. If the third-party app is compromised, logs payloads to an external server, or suffers a supply-chain attack, the key is permanently leaked.

2. Hardware Enclave Architecture

Howitzer Mobile stores API keys exclusively inside the device's isolated hardware security module:

  • iOS: Apple Secure Enclave using kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly and hardware-bound ECC keypairs.
  • Android: Android KeyStore with StrongBox Keymaster hardware backing where available.
  • Isolation: Keys are never loaded into plain-text JavaScript or stored in unencrypted SQLite/SharedPreferences storage.

3. Inter-App IPC & URL Scheme Hook

Third-party apps request inference via a standardized custom URL scheme or local loopback proxy:

IPC URL Scheme Syntax howitzer://v1/infer
howitzer://v1/infer?app_id=com.example.notes&model=claude-3-5-sonnet&callback=notesapp://ai_response

When triggered:

  1. Howitzer Mobile comes to the foreground and presents a biometric confirmation prompt (FaceID / TouchID).
  2. The prompt displays the calling app's identity, requested model, and estimated token cost.
  3. Upon approval, Howitzer Mobile dispatches the prompt using the hardware-stored key directly to the model provider.
  4. The response is returned to the calling application via the secure callback URL. The calling app never sees or possesses the API key.

4. Granular Spending Governance

Users retain absolute sovereignty over their token budget:

  • Per-App Ceilings: Limit App X to $2.00/day and App Y to $10.00/month.
  • Model Restrictions: Prevent an untrusted app from querying expensive models like o1-preview.
  • Instant 1-Tap Revocation: Immediately sever all permissions for any app from the Howitzer Mobile dashboard.