almoiz commited on
Commit
62ca970
Β·
verified Β·
1 Parent(s): f455a04

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +389 -3
README.md CHANGED
@@ -1,3 +1,389 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ # πŸ›‘οΈ Energy-Guard OS: Sovereign AI Security Gateway
5
+
6
+
7
+
8
+ > **The world's first on-premise AI security gateway delivering real-time protection for Large Language Models (LLMs) with performance that far surpasses cloud and traditional solutions.**
9
+
10
+ Energy-Guard OS is a CPU-native, sovereign AI security gateway that protects enterprise LLM deployments in real time. Operating at **under 13 milliseconds per request without a GPU**, fitting entirely within **411 MB**, and processing over **9,500 words per second**, it occupies a category that no competitor currently addresses: lightweight, sovereign, and comprehensively intelligent AI security.
11
+
12
+ ---
13
+
14
+ ## πŸš€ Key Capabilities and Features
15
+
16
+ ### ⚑ Ultra-Fast Performance
17
+ - **Internal kernel latency: 4.1 to 13 milliseconds**
18
+ - Single-request mode: ~13ms processing time
19
+ - Batch processing mode: ~4.1ms per request (at 100-250 batch size)
20
+ - Real-world API throughput: **427.77 requests/second**
21
+ - The system becomes **more efficient under load** through full tensor utilization
22
+
23
+ ### πŸ’Ύ Minimal System Footprint
24
+ - **Entire system operates at only 411 MB**
25
+ - Smallest known intelligent security gateway
26
+ - CPU-only operation β€” no GPU required
27
+ - No Kubernetes orchestration needed
28
+ - Zero external dependencies
29
+
30
+ ### πŸ”’ Complete Sovereignty (Air-Gapped)
31
+ - **No GPU or cloud connection required**
32
+ - Fully compliant with GDPR, EU AI Act, HIPAA, and SOX
33
+ - All processing occurs in RAM β€” zero disk writes of content
34
+ - Perfect for government, defense, and regulated industries
35
+ - Deploy on any bare-metal fleet without routing data through third-party clouds
36
+
37
+ ### 🌐 Comprehensive Threat Coverage
38
+ Energy-Guard OS is **the only system** that integrates threat intelligence for **IT, AI, and OT/SCADA** into a single processing line:
39
+
40
+ | Category | Frameworks | Coverage |
41
+ |----------|------------|----------|
42
+ | **AI Threats** | MITRE ATLAS | Model extraction, adversarial inputs, supply chain poisoning |
43
+ | **IT Threats** | MITRE ATT&CK | APT groups, lateral movement, Kerberoasting, pass-the-hash |
44
+ | **LLM Security** | OWASP LLM Top 10 | Prompt injection, insecure output, sensitive disclosure, XSS |
45
+ | **OT/SCADA** | Triton, Stuxnet, PIPEDREAM | Modbus/DNP3/Triconex patterns in AI conversations |
46
+ | **Evasion** | 8-Layer Decoding | Base64, URL, HTML, Hex, ROT13, Zero-width, Unicode, Double-encode |
47
+ | **Multilingual** | Arabic RTL + Unicode | Full semantic Arabic detection; Chinese, Russian, German support |
48
+
49
+ ### 🌍 Full Arabic Language Support
50
+ - Deep semantic processing of right-to-left (RTL) text
51
+ - Full Arabic attack detection at inference level
52
+ - Not surface-level filtering β€” true semantic understanding
53
+
54
+ ### 🧠 Session Intelligence
55
+ - **Cumulative threat scoring** across entire conversation sessions
56
+ - Multi-turn escalation detection
57
+ - Per-user risk accumulation with exponential decay
58
+ - Role-based adaptive thresholds
59
+ - Detects social engineering attacks spanning multiple conversation turns
60
+
61
+ ---
62
+
63
+ ## πŸ“Š Benchmarks
64
+
65
+ ### Performance Metrics
66
+
67
+ | Metric | Value | Notes |
68
+ |--------|-------|-------|
69
+ | **Capacity** | 9,541 words/second | 7.5Γ— above industry benchmark |
70
+ | **Single Request Latency** | 13 ms | Kernel processing time |
71
+ | **Batch Latency** | 4.1 ms/request | At 100-250 batch size |
72
+ | **Real-World RPS** | 427.77 req/sec | Live endpoint under load |
73
+ | **Peak Throughput** | 345 req/sec | Kernel stress test |
74
+ | **Stress Test** | 0 dropped batches | 2,500 requests, 10 threads |
75
+ | **System Footprint** | 411 MB | CPU-only, no GPU |
76
+
77
+ ### Detection Accuracy
78
+
79
+ | Attack Category | Accuracy | Status |
80
+ |-----------------|----------|--------|
81
+ | **Financial Data Leaks** (IBAN, SWIFT, wire transfers) | **100%** | Production Ready |
82
+ | **PII/Private Data** (SSN, passport, API keys, credentials) | **100%** | Production Ready |
83
+ | **Strategic Leaks** (M&A documents, roadmaps) | **100%** | Production Ready |
84
+ | **Technical Code** (malware, injection) | 72.8% | Active Improvement |
85
+
86
+ ### Independent Security Benchmark (JailbreakBench)
87
+
88
+ | System | F1-Score | Attack Success Rate ↓ | AUROC |
89
+ |--------|----------|----------------------|-------|
90
+ | **Energy-Guard OS** | **0.722** | **0.292** | **0.651** |
91
+ | LlamaGuard-2 | 0.529 | 0.640 | 0.680 |
92
+ | Keyword Filter | 0.246 | 0.860 | 0.570 |
93
+
94
+ ---
95
+
96
+ ## πŸ—οΈ Architecture: Three-Path Sovereign Decision Engine
97
+
98
+ Every input passes through three analytical paths in sequence. The first path to reach a definitive conclusion terminates the pipeline β€” enabling sub-13ms total latency without sacrificing coverage depth.
99
+
100
+ ```
101
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
102
+ β”‚ ENERGY-GUARD OS V27 β”‚
103
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
104
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
105
+ β”‚ β”‚ Path β‘  β”‚ β”‚ Path β‘‘ β”‚ β”‚ Path β‘’ β”‚ β”‚
106
+ β”‚ β”‚ Sovereign │──▢│ Rule Engine │──▢│ Neural Engine β”‚ β”‚
107
+ β”‚ β”‚ Energy Map β”‚ β”‚ (600+ regex)β”‚ β”‚ (15.4M params) β”‚ β”‚
108
+ β”‚ β”‚ < 1ms β”‚ β”‚ < 2ms β”‚ β”‚ 4-13ms β”‚ β”‚
109
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
110
+ β”‚ β”‚ β”‚ β”‚ β”‚
111
+ β”‚ β–Ό β–Ό β–Ό β”‚
112
+ β”‚ Known signatures Deterministic threats Novel & semantic β”‚
113
+ β”‚ Safe-category 8-layer decode Adaptive scoring β”‚
114
+ β”‚ fast-pass pre-scan β”‚
115
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
116
+ ```
117
+
118
+ ### 8-Layer Evasion Decoding Engine
119
+
120
+ Before any security analysis, every input is recursively decoded through 8 layers:
121
+
122
+ | Layer | Encoding Defeated | Example |
123
+ |-------|-------------------|---------|
124
+ | 1 | Base64 (Standard + URL-safe) | `aWdub3Jl...` β†’ "ignore all previous instructions" |
125
+ | 2 | URL Percent Encoding | `%69%67%6e...` β†’ "ignore" |
126
+ | 3 | HTML Entities | `&#105;&#103;...` β†’ "ignore" |
127
+ | 4 | Hex Escape Sequences | `\x69\x67...` β†’ "ignore" |
128
+ | 5 | ROT13 Cipher | `vtzber nyy...` β†’ "ignore all..." |
129
+ | 6 | Zero-Width Characters | `i​g​n​o​r​e` (hidden chars stripped) |
130
+ | 7 | Unicode Normalization | `ο½‰ο½‡ο½Žο½ο½’ο½…` / Cyrillic homoglyphs β†’ "ignore" |
131
+ | 8 | Double-Encoding | `%2569%6e...` decoded twice β†’ plain text |
132
+
133
+ > ⚠️ **Key Differentiator:** Without multi-layer recursive decoding, a single Base64 wrapper bypasses 100% of pattern-matching defenses in competing products.
134
+
135
+ ---
136
+
137
+ ## πŸ› οΈ Testing Tools
138
+
139
+ This repository includes official testing tools to independently verify all performance and security claims:
140
+
141
+ ### Tool A: Sovereign Master Test Suite (v10.2)
142
+
143
+ ```bash
144
+ # File: EnergyGuard_OS_Sovereign_Master_Test_Suite_v10.2.py
145
+ ```
146
+
147
+ | Property | Value |
148
+ |----------|-------|
149
+ | **Test Volume** | 10,000+ test cases |
150
+ | **Coverage** | OWASP LLM Top 10, MITRE ATLAS, MITRE ATT&CK |
151
+ | **Performance Mode** | AsyncIO pipeline β€” 1,000+ cases/second |
152
+ | **Stress Testing** | Up to 1,000 concurrent users |
153
+ | **Language Coverage** | Arabic + English attack vectors |
154
+ | **Output** | JSON report + per-category accuracy + latency histogram |
155
+
156
+ **What it validates:**
157
+ - Detection accuracy across all 8 attack taxonomy categories
158
+ - System stability under maximum concurrent load
159
+ - Sub-13ms latency validation across all test conditions
160
+ - Arabic vs. English detection parity
161
+
162
+ ### Tool B: EBMSovereign Independent Security Benchmark
163
+
164
+ ```bash
165
+ # File: EBMSovereign_Independent_Security_Benchmark.py
166
+ ```
167
+
168
+ | Property | Value |
169
+ |----------|-------|
170
+ | **Datasets** | JailbreakBench + HarmBench + Alpaca (public, reproducible) |
171
+ | **Detection Method** | Dual-signal: verdict string + risk_score threshold |
172
+ | **Metrics** | ASR, F1-Score, Precision, Recall, AUROC, FPR |
173
+ | **Baseline Comparison** | vs. LlamaGuard-2 proxy and keyword filter |
174
+ | **Output** | `benchmark_results.json` + `benchmark_report.txt` + 6 PNG figures |
175
+
176
+ **What it validates:**
177
+ - Attack Success Rate against 500 real-world jailbreak prompts
178
+ - False Positive Rate against 500 benign prompts
179
+ - API latency distribution (P50, P95, P99)
180
+ - Statistical significance via Mann-Whitney U test
181
+
182
+ ### Running the Evaluation Tools
183
+
184
+ ```bash
185
+ # Prerequisites
186
+ pip install aiohttp datasets scikit-learn matplotlib seaborn numpy tqdm scipy
187
+
188
+ # Configure API endpoint
189
+ BASE_URL = 'http://ebmsovereign.com/v1/process'
190
+
191
+ # Run Sovereign Master Test Suite
192
+ python EnergyGuard_OS_Sovereign_Master_Test_Suite_v10.2.py
193
+
194
+ # Run Independent Security Benchmark
195
+ python EBMSovereign_Independent_Security_Benchmark.py
196
+ ```
197
+
198
+ ---
199
+
200
+ ## πŸ”Œ Public API Reference
201
+
202
+ Test the system directly via the live endpoint (no registration required for initial testing):
203
+
204
+ | Property | Value |
205
+ |----------|-------|
206
+ | **Base URL** | `http://ebmsovereign.com/v1/` |
207
+ | **Authentication** | `X-API-Key` header (contact for production key) |
208
+ | **Response Format** | JSON with verdict, risk_score, and performance metadata |
209
+ | **Uptime SLA** | 99.9% under enterprise partnership |
210
+
211
+ ### Endpoint 1: Single Request Analysis
212
+
213
+ ```http
214
+ POST /v1/process
215
+ Content-Type: application/json
216
+ ```
217
+
218
+ **Request:**
219
+ ```json
220
+ {
221
+ "text": "Your prompt or LLM response to inspect",
222
+ "uid": "user_session_id_optional"
223
+ }
224
+ ```
225
+
226
+ **Response:**
227
+ ```json
228
+ {
229
+ "verdict": "βœ… SAFE",
230
+ "risk_score": 0.1234,
231
+ "label": "unknown",
232
+ "processing_time_ms": 12.87,
233
+ "uid": "user_session_id_optional",
234
+ "timestamp": 1775416327.208
235
+ }
236
+ ```
237
+
238
+ **Response Fields:**
239
+
240
+ | Field | Type | Range | Interpretation |
241
+ |-------|------|-------|----------------|
242
+ | `verdict` | string | "βœ… SAFE" or "🚨 BLOCKED" | Primary binary decision |
243
+ | `risk_score` | float | 0.0 – 1.0 | < 0.50: safe \| 0.50–0.85: borderline \| > 0.85: block |
244
+ | `processing_time_ms` | float | 0.39 – 15.0 ms | Internal engine time only |
245
+ | `label` | string | threat type or 'unknown' | Threat category for logging |
246
+ | `uid` | string | Echo of request uid | For request correlation |
247
+
248
+ ### Endpoint 2: Batch Processing
249
+
250
+ ```http
251
+ POST /v1/process_batch
252
+ Content-Type: application/json
253
+ ```
254
+
255
+ **Request:**
256
+ ```json
257
+ {
258
+ "queries": [
259
+ { "uid": "req_001", "text": "First text to inspect" },
260
+ { "uid": "req_002", "text": "Second text to inspect" },
261
+ ... up to 250 items per batch
262
+ ]
263
+ }
264
+ ```
265
+
266
+ **Response:**
267
+ ```json
268
+ {
269
+ "results": [
270
+ {
271
+ "uid": "req_001",
272
+ "verdict": "βœ… SAFE",
273
+ "risk_score": 0.1234,
274
+ "label": "unknown"
275
+ }
276
+ ],
277
+ "performance": {
278
+ "batch_size": 250,
279
+ "total_time_ms": 1040.12,
280
+ "avg_latency_ms": 4.16,
281
+ "throughput_rps": 240.35
282
+ }
283
+ }
284
+ ```
285
+
286
+ ### Risk Score Decision Logic (V27 Parser)
287
+
288
+ Implement this dual-signal logic to minimize false negatives:
289
+
290
+ ```python
291
+ def parse_v27_response(body: dict) -> tuple[bool, float]:
292
+ """
293
+ Parse Energy-Guard OS V27 response.
294
+ Returns: (is_blocked: bool, risk_score: float)
295
+ """
296
+ verdict = str(body.get('verdict', '')).upper()
297
+ risk_score = float(body.get('risk_score', 0.0))
298
+
299
+ # Signal 1: explicit verdict string
300
+ if 'BLOCKED' in verdict or 'WARNING' in verdict:
301
+ return True, risk_score # is_blocked = True
302
+
303
+ # Signal 2: risk score threshold fallback
304
+ if 'SAFE' in verdict and risk_score <= 0.85:
305
+ return False, risk_score # is_blocked = False
306
+
307
+ # Fallback: score-only decision
308
+ return risk_score > 0.85, risk_score
309
+ ```
310
+
311
+ ### HTTP Status Codes
312
+
313
+ | Code | Meaning | Action |
314
+ |------|---------|--------|
315
+ | 200 OK | Request processed successfully | Read verdict and risk_score |
316
+ | 422 | Validation error in payload | Ensure 'queries' array with 'uid' and 'text' |
317
+ | 429 | Rate limit exceeded | Implement exponential backoff |
318
+ | 500 | Kernel processing error | Retry once; report if persistent |
319
+ | 504 | Gateway timeout | Reduce batch size to 100–150 |
320
+
321
+ ---
322
+
323
+ ## πŸ“ˆ Competitive Comparison
324
+
325
+ | System | Deployment | CPU Latency | Size | GPU Required | On-Premise | ICS/SCADA | Arabic |
326
+ |--------|------------|-------------|------|--------------|------------|-----------|--------|
327
+ | Azure Prompt Shield | SaaS Only | ~349 ms | Cloud | Yes | ❌ | ❌ | ❌ |
328
+ | AWS Bedrock Guardrails | SaaS Only | ~200+ ms | Cloud | Yes | ❌ | ❌ | ❌ |
329
+ | Lakera Guard | SaaS/Hosted | ~61 ms | Unknown | Optional | Partial | ❌ | ❌ |
330
+ | LlamaGuard-86M | Self-hosted | ~304 ms | Large | Yes | βœ… | ❌ | ❌ |
331
+ | NeuralTrust-118M | Self-hosted | ~39 ms | Large | Optional | βœ… | ❌ | ❌ |
332
+ | CalypsoAI | Enterprise | ~250 ms | Large | Yes | βœ… | ❌ | ❌ |
333
+ | **Energy-Guard OS** | **Air-gapped/Any** | **4.1–13 ms** | **411 MB** | **No** | **βœ…** | **βœ…** | **βœ…** |
334
+
335
+ ---
336
+
337
+ ## 🎯 Use Cases
338
+
339
+ ### Deployment Patterns
340
+
341
+ | Pattern | Description | Best For |
342
+ |---------|-------------|----------|
343
+ | **Inline API Proxy** | Energy-Guard sits in front of OpenAI, Claude, Gemini | SaaS hosting, multi-tenant AI platforms |
344
+ | **Edge Sidecar** | Deployed alongside customer's LLM as container | Dedicated servers, private cloud, K8s |
345
+ | **Air-Gapped Gateway** | Fully isolated, no external dependencies | Government, defense, regulated industries |
346
+ | **Marketplace Add-On** | One-click activation from control panel | Self-serve cloud providers |
347
+
348
+ ### Target Segments
349
+
350
+ | Segment | Key Pain Point | Energy-Guard Value |
351
+ |---------|----------------|-------------------|
352
+ | **Banking & Finance** | Regulatory exposure (SOX, GDPR) | 100% financial leak detection; air-gapped |
353
+ | **Healthcare** | HIPAA compliance | PII/PHI filtering; on-premise; audit trail |
354
+ | **Government & Defense** | Classified data sovereignty | Air-gapped; Arabic + multilingual; ICS-aware |
355
+ | **Energy & Utilities** | OT/SCADA AI-enabled | Only product with native ICS/SCADA patterns |
356
+ | **SaaS/AI Builders** | Customer data protection | $0.001/req; 427 RPS; zero infrastructure |
357
+
358
+ ---
359
+
360
+ ## 🀝 Partnership Opportunities
361
+
362
+ | Partnership Tier | Model | Revenue Structure |
363
+ |------------------|-------|-------------------|
364
+ | **Technology OEM** | Embed engine in your platform | Negotiated royalty per activation |
365
+ | **Marketplace Reseller** | One-click add-on in marketplace | 30–40% margin |
366
+ | **White-Label Partner** | Deploy under your brand | 40–50% margin |
367
+ | **Referral Partner** | Refer enterprise customers | 20% commission |
368
+
369
+ ---
370
+
371
+ ## πŸ“ž Contact & Support
372
+
373
+ - **Website:** [ebmsovereign.com](https://ebmsovereign.com)
374
+ - **Email:** arrangements@ebmsovereign.com
375
+ - **Live API:** `http://ebmsovereign.com/v1/`
376
+ - **Partnership:** arrangements@ebmsovereign.com
377
+
378
+ ---
379
+
380
+ ## πŸ“„ License
381
+
382
+ Energy-Guard OS is commercial software. Contact EBMSovereign for licensing terms.
383
+
384
+ ---
385
+
386
+ <p align="center">
387
+ <strong>EBMSovereign Β· Sovereign AI Security</strong><br>
388
+ <em>CPU-native. 411 MB. 4.1–13ms. Air-gapped. Covers IT + AI + OT/SCADA. Speaks Arabic.</em>
389
+ </p>