Skip to content

Commit 28acb63

Browse files
committed
docs: update README with improved structure and clarity
1 parent 92a475b commit 28acb63

File tree

1 file changed

+128
-46
lines changed

1 file changed

+128
-46
lines changed

README.md

Lines changed: 128 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,164 @@
1-
2-
# FISE — Fast Internet Secure Extensible
1+
# FISE - Fast Internet Secure Extensible
32

43
[![npm version](https://img.shields.io/npm/v/fise.svg)](https://www.npmjs.com/package/fise)
54
[![npm downloads](https://img.shields.io/npm/dm/fise.svg)](https://www.npmjs.com/package/fise)
65
[![license](https://img.shields.io/npm/l/fise.svg)](https://github.com/anbkit/fise/blob/main/LICENSE)
76
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
87

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:
1118

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 |
1234

1335
### 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
1538
- Pure string operations
1639
- 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
1942

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:
2065

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
2276

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.**
2388
2489
---
2590

91+
## 📦 Installation
2692

27-
## 🔐 The True Strength of FISE: Infinite Customization, Zero Standard Format
93+
```bash
94+
npm install fise
95+
```
2896

97+
---
2998

30-
FISE does **not** rely on a single encryption scheme. Its real power comes from **unpredictability** and **per-application diversity**.
99+
## 🚀 Basic Usage
31100

101+
```ts
102+
import { encryptFise, decryptFise } from "fise";
32103

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);
41106

107+
console.log(encrypted);
108+
console.log(decrypted); // "Hello, world!"
109+
```
42110

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.
44112
113+
---
45114

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
57116

117+
A FISE transformation pipeline typically consists of:
58118

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**
60126

127+
Every step is customizable.
61128

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+
---
68130

131+
## 📚 Documentation
69132

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
71137

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
72152

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+
---
74161

162+
## 📄 License
75163

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

Comments
 (0)