|
1 | | - |
2 | | -# FISE — Fast Internet Secure Extensible |
| 1 | +# FISE - Fast Internet Secure Extensible |
3 | 2 |
|
4 | 3 | [](https://www.npmjs.com/package/fise) |
5 | 4 | [](https://www.npmjs.com/package/fise) |
6 | 5 | [](https://github.com/anbkit/fise/blob/main/LICENSE) |
7 | 6 | [](https://www.typescriptlang.org/) |
8 | 7 |
|
9 | | -| AES (crypto-js) decrypt | ~0.4–0.9 ms | |
10 | | -| WebCrypto AES-GCM decrypt | ~0.15–0.35 ms | |
| 8 | +--- |
| 9 | + |
| 10 | +## 🔥 What is FISE? |
| 11 | + |
| 12 | +**FISE is a keyless, rule-based, high-performance envelope for protecting API responses and frontend data.** |
| 13 | + |
| 14 | +It is not a replacement for AES, TLS, or authentication. |
| 15 | +FISE is designed for *web response protection*, where traditional crypto is too heavy — or exposes static keys in the frontend. |
| 16 | + |
| 17 | +FISE focuses on: |
11 | 18 |
|
| 19 | +- high-speed transformations |
| 20 | +- rule-based obfuscation |
| 21 | +- infinite customization |
| 22 | +- zero shared pattern between apps |
| 23 | + |
| 24 | +--- |
| 25 | + |
| 26 | +## ⚡ Performance Benchmark (Node 20, M1) |
| 27 | + |
| 28 | +| Method | Avg Time (per op) | |
| 29 | +| ------------------------- | ----------------- | |
| 30 | +| **FISE encrypt** | ~0.02–0.04 ms | |
| 31 | +| **FISE decrypt** | ~0.01–0.02 ms | |
| 32 | +| AES (crypto-js) decrypt | ~0.4–0.9 ms | |
| 33 | +| WebCrypto AES-GCM decrypt | ~0.15–0.35 ms | |
12 | 34 |
|
13 | 35 | ### Why is FISE so fast? |
14 | | -- No heavy crypto unless you choose to plug it in |
| 36 | + |
| 37 | +- No heavy crypto unless you plug your own cipher |
15 | 38 | - Pure string operations |
16 | 39 | - No hashing, no PBKDF, no cost multipliers |
17 | | -- Easily runs thousands of encrypt/decrypt ops per frame on frontend |
18 | | -- Perfect for high-frequency API usage |
| 40 | +- Runs thousands of ops per frame in frontend |
| 41 | +- Ideal for high-frequency API usage |
19 | 42 |
|
| 43 | +**FISE is optimized for web response protection, not heavyweight cryptography.** |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## 🔐 The True Strength of FISE: Infinite Customization, Zero Standard Format |
| 48 | + |
| 49 | +FISE does **not** rely on a single encryption scheme. |
| 50 | +Its real power comes from **unpredictability** and **per-application diversity**. |
| 51 | + |
| 52 | +Every implementation of FISE can be completely different: |
| 53 | + |
| 54 | +- no fixed envelope format |
| 55 | +- no universal salt position |
| 56 | +- no predictable metadata |
| 57 | +- no shared offset rules |
| 58 | +- no standard scanning method |
| 59 | +- no constant cipher |
| 60 | +- no global pattern to exploit |
| 61 | + |
| 62 | +### Every website or app becomes its **own encryption dialect**. |
| 63 | + |
| 64 | +You can customize: |
20 | 65 |
|
21 | | -FISE is optimized for **web response protection**, not heavyweight cryptography — which is why performance is a core advantage. |
| 66 | +- salt generation |
| 67 | +- salt placement (front, end, interleaved, split, segmented) |
| 68 | +- timestamp-based entropy |
| 69 | +- metadata encoding (base36, base62, emoji, hex, XOR, zero-width chars) |
| 70 | +- metadata size |
| 71 | +- offset calculation |
| 72 | +- scanning rules (charCodeAt, primes, XOR signatures) |
| 73 | +- ciphers (XOR, AES, hybrid) |
| 74 | +- envelope structure |
| 75 | +- decoy blocks / noise injection |
22 | 76 |
|
| 77 | +Because the customization space is **effectively infinite**, two FISE pipelines are extremely unlikely to match. |
| 78 | + |
| 79 | +### This creates a special security property: |
| 80 | + |
| 81 | +- ❌ No universal decoder can exist |
| 82 | +- 🔒 Reverse-engineering one FISE app does **NOT** break another |
| 83 | +- 🧩 No fixed patterns for attackers |
| 84 | +- 🔄 Rules can be regenerated instantly if leaked |
| 85 | +- 🎭 Security comes from diversity, not secrecy alone |
| 86 | + |
| 87 | +> **FISE turns every web/app into its own unique encryption language — a moving target by design.** |
23 | 88 |
|
24 | 89 | --- |
25 | 90 |
|
| 91 | +## 📦 Installation |
26 | 92 |
|
27 | | -## 🔐 The True Strength of FISE: Infinite Customization, Zero Standard Format |
| 93 | +```bash |
| 94 | +npm install fise |
| 95 | +``` |
28 | 96 |
|
| 97 | +--- |
29 | 98 |
|
30 | | -FISE does **not** rely on a single encryption scheme. Its real power comes from **unpredictability** and **per-application diversity**. |
| 99 | +## 🚀 Basic Usage |
31 | 100 |
|
| 101 | +```ts |
| 102 | +import { encryptFise, decryptFise } from "fise"; |
32 | 103 |
|
33 | | -Every implementation of FISE can be entirely different: |
34 | | -- No fixed envelope format |
35 | | -- No universal salt position |
36 | | -- No predictable metadata structure |
37 | | -- No shared offset rule |
38 | | -- No standard scanning method |
39 | | -- No constant cipher |
40 | | -- No global pattern to exploit |
| 104 | +const encrypted = encryptFise("Hello, world!"); |
| 105 | +const decrypted = decryptFise(encrypted); |
41 | 106 |
|
| 107 | +console.log(encrypted); |
| 108 | +console.log(decrypted); // "Hello, world!" |
| 109 | +``` |
42 | 110 |
|
43 | | -### Every website or application becomes its **own encryption dialect**. |
| 111 | +> You can replace rules, cipher, salt logic, metadata logic, offset rules, scanning rules — everything. |
44 | 112 |
|
| 113 | +--- |
45 | 114 |
|
46 | | -You can customize: |
47 | | -- Salt generation logic |
48 | | -- Salt placement (end, front, interleaved, split, segmented) |
49 | | -- Timestamp-based entropy |
50 | | -- Metadata encoding (base36, base62, emoji, zero‑width characters, XOR, hex) |
51 | | -- Metadata size |
52 | | -- Offset calculation |
53 | | -- Scanning rules (charCodeAt patterns, XOR signatures, prime-based scanning) |
54 | | -- Ciphers (XOR, AES, hybrid layers) |
55 | | -- Envelope structure |
56 | | -- Decoy blocks / noise injection |
| 115 | +## 🧩 Architecture Overview |
57 | 116 |
|
| 117 | +A FISE transformation pipeline typically consists of: |
58 | 118 |
|
59 | | -Because these customizations are **effectively infinite**, two FISE implementations are extremely unlikely to share the same transformation pipeline. |
| 119 | +1. **Salt generation** |
| 120 | +2. **Metadata + entropy encoding** |
| 121 | +3. **Cipher layer (optional)** |
| 122 | +4. **Offset calculation** |
| 123 | +5. **Envelope mixing** |
| 124 | +6. **Custom insertion rules** |
| 125 | +7. **Final packed string** |
60 | 126 |
|
| 127 | +Every step is customizable. |
61 | 128 |
|
62 | | -### This creates a powerful security property: |
63 | | -- **No universal decoder can exist** |
64 | | -- **Reverse‑engineering one FISE app does NOT help decode another** |
65 | | -- **No fixed patterns for attackers to target** |
66 | | -- **Rules can be regenerated instantly if leaked** |
67 | | -- **Security comes from diversity, not secrecy alone** |
| 129 | +--- |
68 | 130 |
|
| 131 | +## 📚 Documentation |
69 | 132 |
|
70 | | -> **FISE turns every web/app into its own unique encryption language — a moving target by design.** |
| 133 | +- `docs/RULES.md` — how to customize rule engine |
| 134 | +- `docs/SPEC.md` — transformation specification |
| 135 | +- `docs/PERFORMANCE.md` — benchmark details |
| 136 | +- `docs/SECURITY.md` — threat model |
71 | 137 |
|
| 138 | +--- |
| 139 | + |
| 140 | +## 🛡 Security Philosophy |
| 141 | + |
| 142 | +FISE is not AES. |
| 143 | +FISE is not for secrets like passwords or tokens. |
| 144 | + |
| 145 | +It is built for **real-world API/web protection**: |
| 146 | + |
| 147 | +- prevent scraping |
| 148 | +- hide response semantics |
| 149 | +- avoid static keys |
| 150 | +- avoid universal decoders |
| 151 | +- add cost for attackers |
72 | 152 |
|
73 | | -FISE is a **keyless, rule-based, high-performance envelope** for protecting API responses and frontend data. |
| 153 | +--- |
| 154 | + |
| 155 | +## 🤝 Contributing |
| 156 | + |
| 157 | +See `CONTRIBUTING.md` |
| 158 | +We welcome rule designs, ciphers, scanners, metadata patterns, or optimization ideas. |
| 159 | + |
| 160 | +--- |
74 | 161 |
|
| 162 | +## 📄 License |
75 | 163 |
|
76 | | -- 🚀 Ultra-fast (microseconds) |
77 | | -- 🔒 No static key stored in frontend |
78 | | -- 🧩 Rule-based, fully extensible |
79 | | -- 🛡 Impossible to build a universal decoder |
80 | | -- 🌐 Designed for API/web response protection |
81 | | -- 📦 Zero dependencies |
82 | | -- ⚙️ Works everywhere: Node, Browser, RN, Edge Functions |
| 164 | +MIT © An Nguyen |
0 commit comments