Sovereign Security Architecture

Enterprise Security & Cryptography

Project Pak-LLM is built upon a defense-in-depth security model combining an AES-256-GCM credential vault, HMAC integrity tags, HMAC-SHA256 webhook verification, hybrid sovereign data boundaries, and automated PII redaction.

Domestic Control Plane

Hybrid Sovereign Cloud & Data Flow

Pak-LLM operates a hybrid sovereign model: account governance, PII scrubbing, RAG metadata, and domestic payment clearing reside under Pakistani jurisdiction, while inference executes via audited Zero-Data-Retention accelerators.

  • Domestic control plane: Karachi tenant boundaries with PII scrubbing
  • Confidential inference: Ephemeral in-memory execution via Groq, Hugging Face, Render
  • Zero Data Retention (ZDR): Customer prompts are never stored or used to train models
  • Air-gapped on-premise option: Full local appliance deployment for banking and defense
HITL + Zero Retention

Co-Exec Screen Sharing & Action Execution

Co-Exec processes only the screen you explicitly share, grounds UI elements, routes tasks through allowlisted capabilities, and requires a server-issued HITL token before any action runs.

  • Explicit getDisplayMedia/desktop consent; stop sharing at any time
  • Screen frames are processed in volatile memory and purged; no frame library
  • HMAC approval tokens bound to session, action and intent
  • Browser executes same-tab DOM only; OS-level control requires the desktop bridge
  • Electron IPC validates sender, token and rate limits before input injection
  • Credentials, OTP, payment and OS-security surfaces are blocked
Private Foundation

Model Provenance & Attestation

PakLLM_Coder is a private, sovereign enterprise foundation model (not public open-weights) licensed exclusively for on-premise hardware and sovereign cloud deployments.

  • Private bilingual model served only through the platform; weights are not distributed
  • Cryptographic SHA-256 integrity attestation for platform release artifacts
  • Strict internal audit guarantee: ZERO customer code or prompt training
  • PECA 2016 and Wasatiyyah Shariah algorithmic alignment
SHA-256 Sealed

Cryptographic API Gateway

All API keys generated via the Admin Dashboard are hashed immediately using one-way SHA-256 with salted tenant identifiers. Raw keys are never stored in plaintext and cannot be recovered if lost.

  • Granular RBAC scopes (chat:completions, embeddings, models:read, admin:all)
  • Sliding-window token bucket rate limiting (10 to 600 RPM)
  • Optional client IP address allow-listing and auto-expiry schedules
  • Instant zero-downtime key revocation from the Admin Console
Signed Delivery

HMAC-SHA256 Webhook Dispatcher

Every outbound event dispatch (chat completions, workflow approvals, courier dispatches) is cryptographically signed with a tenant-unique secret using HMAC-SHA256.

  • Standard signature header: x-pakllm-signature-256 (sha256=...)
  • Replay attack prevention with strict unix timestamp validation
  • Automated exponential backoff retries with delivery status audit logs
  • Payload integrity verification compatible with standard enterprise receivers
AES-256-GCM + HMAC

Credential Vault & Integrity Controls

Credentials are sealed with AES-256-GCM and every execution carries a keyed HMAC integrity tag. Post-quantum (ML-KEM / ML-DSA) migration is on the roadmap and is not implemented yet, so we do not claim FIPS 203/204 conformance.

  • AES-256-GCM authenticated encryption for Sovereign Vault secrets
  • HMAC-SHA3-512 integrity tags on workflow execution receipts
  • PBKDF2-SHA512 (120,000 iterations) PIN & WebAuthn / FIDO2 biometric Passkey App Lock with Admin Reset governance
  • TLS 1.3 and HSTS Preload at the public edge (no application-level lattice KEM)
Deterministic Filter

Amanah Gate PII & Shariah Redaction

Built-in domestic interceptor scanning inbound prompts and outbound completions in real time to scrub sensitive citizen information before it ever reaches volatile memory.

  • Automated Pakistani CNIC format redaction (XXXXX-XXXXXXX-X)
  • Domestic banking IBAN and account number sanitization
  • Proactive blocking of usurious (Riba) and deceptive (Gharar) financial schemes
  • Zero model training — prompts execute under strict Zero Data Retention (ZDR) terms
ISO 27701 • NIST 800-88

Co-Exec Zero-Retention Screen Shield

Pak-LLM Co-Exec analyzes shared screens ephemerally in volatile memory with strict sensitive-UI blocking and Human-in-the-Loop (HITL) execution controls.

  • Fail-closed ISO/IEC 27701 session consent required before any screen frame analysis
  • Immediate NIST SP 800-88 RAM zeroization with zero disk, database, or log persistence
  • Automatic blocking of autonomous actions on passwords, OTP/2FA, checkouts, and OS UAC prompts
  • Short-lived HMAC-SHA256 approval tokens and sandboxed Electron IPC origin verification
Approval-Protected

Private Business & Client Portals

Companies and clients who purchase API and Webhook access receive a private portal linked to their verified email so they can safely connect Pak-LLM to their own systems and data.

  • Every client portal is issued only after review and approval on agreed terms
  • Protected by your chosen password, 2-step verification (2FA), and App Lock
  • Your company instructions, guidelines, and connected systems stay strictly private to your account
  • Simple self-setup with clear guides and a built-in Pak-LLM v2.0 helper chatbot
Read-only default + HITL writes

Governed Microsoft 365, Email, Productivity & Social Media

Connected apps run under a deterministic policy that allows search, read and summarisation, requires explicit approval for every send/post/edit/share/delete, and blocks bulk outreach, scraping, fake engagement, impersonation, harassment, credential capture and haram promotion.

  • Least-privilege OAuth scopes; tokens purge on disconnect; no credential entry in chat
  • Approval required before outbound email, posts, comments, DMs, uploads, edits or deletes
  • Blocked: bulk/cold outreach, follower and contact scraping, fake reviews, bot engagement
  • Blocked: impersonation, threats, doxxing, non-consensual imagery and platform-security bypass
  • Islamic adab: no gheebah, buhtan, namimah, mockery or spreading immorality
  • Policy API: GET /api/apps/catalog and POST /api/apps/policy
Webhook Signature Verification Pattern
RFC 2104 HMAC-SHA256

When Pak-LLM dispatches an event to your webhook URL, inspect the x-pakllm-signature-256 header and verify using your webhook secret:

import crypto from "crypto";

export function verifyPakLlmSignature(payloadRawBody: string, signatureHeader: string, secret: string): boolean {
  const expectedSignature = `sha256=${crypto.createHmac("sha256", secret).update(payloadRawBody).digest("hex")}`;
  return crypto.timingSafeEqual(Buffer.from(signatureHeader), Buffer.from(expectedSignature));
}

Vulnerability Disclosure & Hall of Fame

We welcome independent security researchers to audit our public endpoints and reporting mechanisms under our coordinated vulnerability disclosure program.