Dashboard Temp Share Shortlinks Frames API

HTMLify

customer_srs.html
Views: 34 | Author: devwajahat
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Customer SRS - zero-regex-engine</title>
    <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700;800&display=swap" rel="stylesheet">
    <style>
        html { scroll-behavior: smooth; }
        body { background-color: #0f172a; }
        ::selection { background-color: #b300ff; color: white; }
    </style>
</head>
<body class="h-screen flex overflow-hidden bg-gradient-to-br from-black to-[#b300ff]/20 text-white font-['Inter']">

    <aside class="w-72 bg-black/70 backdrop-blur-md border-r border-[#b300ff]/30 flex flex-col h-full shadow-[4px_0_24px_rgba(0,0,0,0.5)] z-10 shrink-0">
        <div class="p-6 border-b border-[#b300ff]/30">
            <h1 class="text-2xl font-bold text-white tracking-wide font-['Poppins']">DocGenius</h1>
        </div>
        <div class="p-4 flex-1 overflow-y-auto">
            <div class="mb-8">
                <div class="flex items-center gap-2 mb-3">
                    <h3 class="text-xs font-bold text-purple-400 uppercase tracking-widest">zero-regex-engine</h3>
                </div>
                <div class="space-y-1">
                    <a href="customer_srs.html" class="block w-full text-left px-3 py-2 rounded-lg text-sm transition font-medium mb-1 bg-[#b300ff] text-white shadow-[0_0_15px_rgba(179,0,255,0.4)]">Customer SRS</a>
                </div>
            </div>
        </div>
    </aside>

    <main class="flex-1 flex flex-col h-full bg-transparent overflow-y-auto relative">
        <div class="px-12 py-6 border-b border-gray-800/50 backdrop-blur-sm sticky top-0 z-20">
            <p class="text-purple-300 uppercase tracking-widest text-sm font-bold mb-1">zero-regex-engine</p>
            <h2 class="text-4xl font-extrabold text-white drop-shadow-lg font-['Poppins']">Customer SRS</h2>
        </div>

        <div class="p-12 pb-24">
            <article class="max-w-4xl mx-auto bg-gray-900/60 p-10 rounded-2xl border border-gray-800 shadow-2xl backdrop-blur-md">
                <h1 id="heading-0" class="font-bold text-white font-['Poppins'] text-4xl mt-12 mb-6 scroll-mt-10">Project: vgrep (Void Grep) - Zero-Knowledge Regex Engine</h1><p class="text-lg leading-relaxed text-gray-300 mb-6 font-['Inter'] tracking-tight"><b>Status:</b> Highly Experimental / Proof of Concept</p><h3 id="heading-2" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">1. Introduction</h3><h4 id="heading-3" class="font-bold text-white font-['Poppins'] text-xl mt-6 mb-3 scroll-mt-10">1.1&nbsp; Purpose</h4><p class="text-lg leading-relaxed text-gray-300 mb-6 font-['Inter'] tracking-tight">The Purpose of this document is to define the functional and non-functional requirements for vgrep (Void Grep) vgrep is a Command-Line Interfaace (CLI) utility&nbsp;designed to perform Regular Expression (Regex) pattern matching over Fully Homomorphically Encrypted (FHE) datasets. It allows a client to search a remote server's logs without exposing the search query to the server, and without the server exposing the raw logs to the client.</p><h4 id="heading-5" class="font-bold text-white font-['Poppins'] text-xl mt-6 mb-3 scroll-mt-10">1.2 Scope</h4><p class="text-lg leading-relaxed text-gray-300 mb-6 font-['Inter'] tracking-tight">vgrep replaces standard text-search utilities (like grep or awk) in environments where data privacy is paramount.</p><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">The Client encrypts a Regex pattern into a multi-dimensional mathematical cipher.</li><li class="mb-2">The Server evaluates this cipher against an encrypted dataset using a Finite State Machine (FSM) mapped to FHE boolean operations.</li><li class="mb-2">The Output is an encrypted boolean/string match returned to the client for local decryption.</li></ul><h4 id="heading-8" class="font-bold text-white font-['Poppins'] text-xl mt-6 mb-3 scroll-mt-10">1.3&nbsp;Definitions &amp; Acronyms</h4><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">FHE (Fully Homomorphic Encryption): A cryptographic scheme allowing arbitrary computations on ciphertexts, generating an encrypted result that matches the result of operations performed on the plaintext.</li><li class="mb-2">Zero-Knowledge Oracle: A server that executes logic on data without knowing the input, state, or output.</li><li class="mb-2">AST (Abstract Syntax Tree): The structural representation of the parsed Regular Expression.</li><li class="mb-2">Ciphertext Noise: The cryptographic "static" that grows with each FHE operation. If noise exceeds a threshold, decryption fails.</li></ul><h3 id="heading-10" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">2. Overall Description</h3><h4 id="heading-11" class="font-bold text-white font-['Poppins'] text-xl mt-6 mb-3 scroll-mt-10">2.1&nbsp; Purpose</h4><p class="text-lg leading-relaxed text-gray-300 mb-6 font-['Inter'] tracking-tight">vgrep is designed for POSIX-compliant backend systems.</p><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Client OS: Linux (Ubuntu/Debian prioritized).</li><li class="mb-2">Shell Integration: Fully compatible with standard shells (Bash, Zsh) and easily bindable within .zshrc aliases.</li><li class="mb-2">Session Management: Designed to run persistently in background jobs or detached tmux sessions, as FHE evaluation on large datasets may take significant compute time.</li><li class="mb-2">Server OS: Linux-based cloud instances equipped with heavy CPU/RAM resources for lattice-math calculations.</li></ul><h2 id="heading-14" class="font-bold text-white font-['Poppins'] text-3xl mt-10 mb-5 scroll-mt-10">System Features (Functional Requirements)</h2><h3 id="heading-15" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">3.1 Local Keypair Generation</h3><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Description: The system must generate a public evaluation key (for the server) and a private decryption key (safeguarded by the client).</li><li class="mb-2">Constraint: The private key must never leave the local execution environment.</li></ul><h3 id="heading-17" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">3.2 Client-Side Regex Parsing &amp; Encryption</h3><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Description: When the user inputs vgrep "^[0-9]{3}-DARK", the client binary must parse this Regex into an AST.</li><li class="mb-2">Mechanism: Instead of encrypting the string as a whole, the client maps each character to a u8 ASCII value and encrypts each bit into an FHE cipher state (e.g., using TFHE-rs or Zama's Concrete library).</li></ul><h3 id="heading-19" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">3.3 Server-Side FHE Evaluation</h3><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Description: The Python/Rust server must ingest the $Encrypted\_Regex$ and stream it against the $Encrypted\_Logs$.</li><li class="mb-2">Mechanism: The server executes a Homomorphic Finite State Machine. It translates logic gates (AND, OR, NOT) into polynomial additions and multiplications ($Enc(A) \otimes Enc(B)$).</li><li class="mb-2">Bootstrapping: The server must periodically apply "bootstrapping" algorithms to reduce Ciphertext Noise during deep recursive regex matching.</li></ul><h3 id="heading-21" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">3.4 Match Resolution &amp; Decryption</h3><p class="text-lg leading-relaxed text-gray-300 mb-6 font-['Inter'] tracking-tight"><b>Description:</b> The server must yield an $Encrypted\_Boolean$ (Match Found: True/False) or an $Encrypted\_Line$ without ever knowing the result. The client then decrypts this locally using the private key and prints the plaintext match to stdout</p><h2 id="heading-23" class="font-bold text-white font-['Poppins'] text-3xl mt-10 mb-5 scroll-mt-10">4. Non-Functional Requirements</h2><h3 id="heading-24" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">4.1 Security &amp; Cryptography</h3><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Post-Quantum Resistance: The underlying encryption must utilize Lattice-based cryptography (e.g., Learning With Errors problem), rendering it resistant to future quantum computing attacks.</li><li class="mb-2">Data in Memory: The server must physically be unable to dump plaintext memory, as all RAM states during execution remain encrypted.</li></ul><h3 id="heading-26" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">4.2 Performance Constraints</h3><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Speed: FHE operations are computationally expensive. Users must be explicitly warned that vgrep will be exponentially slower than standard grep.</li><li class="mb-2">Optimization: The server must parallelize homomorphic gate evaluations across multiple CPU cores to minimize latency.</li></ul><h3 id="heading-28" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">4.3 Error Handling</h3><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Silent Failures Forbidden: If the ciphertext noise ceiling is breached, the system must aggressively throw an exception rather than returning a corrupted false-negative match.</li><li class="mb-2">Syntax Limits: Complex regex features that require infinite lookarounds or unbounded backtracking must be gracefully rejected by the client parser before encryption.</li></ul><h2 id="heading-30" class="font-bold text-white font-['Poppins'] text-3xl mt-10 mb-5 scroll-mt-10">5. Interface Requirements</h2><h3 id="heading-31" class="font-bold text-white font-['Poppins'] text-2xl mt-8 mb-4 scroll-mt-10">5.1 Command-Line Syntax</h3><p class="text-lg leading-relaxed text-gray-300 mb-6 font-['Inter'] tracking-tight">The CLI must mimic standard Unix conventions to reduce the learning curve.</p><ul class="list-disc pl-6 mb-8 text-lg text-gray-300 leading-relaxed font-['Inter']"><li class="mb-2">Standard Usage: vgrep [OPTIONS] "PATTERN" [REMOTE_ENDPOINT]</li><li class="mb-2">Flags:<ul><li data-empty="false">-k, --keypath: Specify the path to the local .pem or .bin private key.</li><li data-empty="false">-i, --ignore-case: Homomorphically mutate the AST to match upper and lower case bits.</li><li data-empty="false">-v, --verbose: Print cryptographic metadata (noise levels, gate counts) to stderr.</li></ul><ul class="list-disc pl-6 mt-2"><li class="mb-2">-k, --keypath: Specify the path to the local .pem or .bin private key.</li><li class="mb-2">-i, --ignore-case: Homomorphically mutate the AST to match upper and lower case bits.</li><li class="mb-2">-v, --verbose: Print cryptographic metadata (noise levels, gate counts) to stderr.</li></ul></li></ul>
            </article>
        </div>
    </main>

    <aside class="w-64 bg-black/70 backdrop-blur-md border-l border-[#b300ff]/30 p-6 h-full overflow-y-auto shadow-[-4px_0_24px_rgba(0,0,0,0.5)] z-10 shrink-0">
        <h3 class="text-xs uppercase tracking-widest text-purple-400 font-bold mb-6">On this page</h3>
        <ul class="space-y-3 text-sm">
            <li style="padding-left: 0rem"><a href="#heading-0" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">Project: vgrep (Void Grep) - Zero-Knowledge Regex Engine</a></li><li style="padding-left: 1.5rem"><a href="#heading-2" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">1. Introduction</a></li><li style="padding-left: 2.25rem"><a href="#heading-3" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">1.1  Purpose</a></li><li style="padding-left: 2.25rem"><a href="#heading-5" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">1.2 Scope</a></li><li style="padding-left: 2.25rem"><a href="#heading-8" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">1.3 Definitions &amp; Acronyms</a></li><li style="padding-left: 1.5rem"><a href="#heading-10" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">2. Overall Description</a></li><li style="padding-left: 2.25rem"><a href="#heading-11" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">2.1  Purpose</a></li><li style="padding-left: 0.75rem"><a href="#heading-14" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">System Features (Functional Requirements)</a></li><li style="padding-left: 1.5rem"><a href="#heading-15" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">3.1 Local Keypair Generation</a></li><li style="padding-left: 1.5rem"><a href="#heading-17" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">3.2 Client-Side Regex Parsing &amp; Encryption</a></li><li style="padding-left: 1.5rem"><a href="#heading-19" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">3.3 Server-Side FHE Evaluation</a></li><li style="padding-left: 1.5rem"><a href="#heading-21" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">3.4 Match Resolution &amp; Decryption</a></li><li style="padding-left: 0.75rem"><a href="#heading-23" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">4. Non-Functional Requirements</a></li><li style="padding-left: 1.5rem"><a href="#heading-24" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">4.1 Security &amp; Cryptography</a></li><li style="padding-left: 1.5rem"><a href="#heading-26" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">4.2 Performance Constraints</a></li><li style="padding-left: 1.5rem"><a href="#heading-28" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">4.3 Error Handling</a></li><li style="padding-left: 0.75rem"><a href="#heading-30" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">5. Interface Requirements</a></li><li style="padding-left: 1.5rem"><a href="#heading-31" class="block hover:text-[#b300ff] transition text-gray-400 font-medium">5.1 Command-Line Syntax</a></li>
        </ul>
    </aside>

</body>
</html>