How It Works

AlJefra Store is an intelligent system marketplace that boots with your OS. When the system starts, it detects your hardware, registers the machine, queues unmet drivers and apps, and downloads the packages that are already available.

AI Bootstrap Flow

The AI bootstrap process works as follows:

1. System Powers On
   └─ Kernel boots with minimal drivers (storage, network)

2. Hardware Detection
   ├─ Bus enumeration (PCIe, USB, device tree)
   ├─ Discover devices
   └─ Collect hardware manifest (vendor IDs, device IDs, arch)

3. Register Machine + Sync Plan
   ├─ HTTPS POST to /v1/system/sync
   ├─ Include: CPU architecture, devices found, OS version, desired apps
   └─ Receive: per-machine queue summary and work plan

4. Send Manifest to Store
   ├─ HTTPS POST to /v1/manifest
   ├─ Include: hardware manifest with current driver coverage
   └─ Receive: list of recommended drivers

5. Download Drivers
   ├─ Retrieve .ajdrv packages from store
   ├─ Verify Ed25519 signatures
   └─ Check device compatibility

6. Install Drivers
   ├─ Unpack signed package
   ├─ Load driver binary
   ├─ Initialize driver via HAL interface
   └─ Enable device

7. System Ready
   └─ Hardware ready, sync report stored, future boots can pull queued work

This approach ensures that you get the exact drivers you need, optimized for your specific hardware configuration, without manual intervention.

Store API Endpoints

Applications and the kernel communicate with AlJefra Store via a standard HTTPS REST API. All endpoints require valid Ed25519 signatures for driver uploads.

Method Endpoint Description
POST /v1/system/sync Register a machine, queue missing drivers/apps, return sync summary
POST /v1/manifest Send hardware manifest, receive driver recommendations
GET /v1/drivers/{vendor}/{device}/{arch} Download driver package (.ajdrv) for specific hardware and architecture
GET /v1/catalog List all available drivers, categories, and metadata
GET /v1/updates/{version} Check for OS updates and security patches
POST /v1/drivers Upload new driver package (requires valid Ed25519 signature)

Example: Get Driver Recommendations

POST /v1/manifest HTTP/1.1
Host: store.aljefra.com
Content-Type: application/json

{
  "arch": "x86_64",
  "devices": [
    {"type": "pci", "vendor_id": "0x8086", "device_id": "0x1234"},
    {"type": "pci", "vendor_id": "0x10de", "device_id": "0x2204"}
  ],
  "os_version": "1.0"
}

HTTP/1.1 200 OK
Content-Type: application/json

{
  "recommendations": [
    {
      "driver": "intel-e1000",
      "version": "2.1.0",
      "url": "/v1/drivers/8086/1234/x86_64",
      "priority": "critical"
    },
    {
      "driver": "nvidia-rtx",
      "version": "1.5.0",
      "url": "/v1/drivers/10de/2204/x86_64",
      "priority": "high"
    }
  ]
}

Driver Package Format (.ajdrv)

AlJefra driver packages use a standardized binary format called .ajdrv (AlJefra Driver). Each package is a self-contained, signed, position-independent binary that can be loaded and executed by the kernel.

Package Structure

Section Size Description
Header 64 bytes Magic number (0x56444A41 "AJDV"), version, target architecture, vendor ID, device ID
Metadata Variable JSON-formatted driver name, version, description, dependencies, required features
Binary Code Variable Position-independent executable code implementing the HAL interface
Signature 64 bytes Ed25519 signature over header + metadata + binary code

Example .ajdrv Header (Hex Dump)

00000000: 4144 4a56                          AJDV (magic, little-endian 0x56444A41)
00000004: 01 00                              version=1.0
00000006: 00                                 arch=x86_64 (0=x86_64, 1=aarch64, 2=riscv64)
00000007: 8086                               vendor_id=0x8086 (Intel)
00000009: 1234                               device_id=0x1234
0000000b: 0000 0800                          metadata_size=2048 bytes
0000000f: 0000 4000                          binary_size=16384 bytes
...
00000040: 7b22 6e61 6d65 223a ...           metadata (JSON): {"name": "intel-e1000", ...}

Security Model

AlJefra Store provides multiple layers of security to ensure that drivers are safe, authentic, and unmodified:

Ed25519 Digital Signatures

Every driver package is signed with Ed25519, a modern public-key signature algorithm based on elliptic curve cryptography. Drivers are verified before installation:

Trust Chain

AlJefra Store establishes a chain of trust:

AlJefra Root Key (distributed with OS)
  ↓
Driver Publisher Keys (signed by root)
  ↓
Driver Packages (signed by publisher)
  ↓
Kernel Verification (checks signature chain)
  ↓
Safe Loading (driver can be loaded)

Verification at Install

When installing a driver, the kernel performs the following checks:

  1. Read .ajdrv package header and extract signature
  2. Verify Ed25519 signature against publisher's public key
  3. Check that driver architecture matches system (x86_64, ARM64, RISC-V)
  4. Verify device IDs match detected hardware
  5. Check driver version and dependencies
  6. Load driver binary into protected memory region
  7. Initialize driver via standardized HAL interface

Publisher Requirements

To publish drivers on AlJefra Store: