Simulate a scanner decoding the matrix using the key above.
Download the standalone engine.
TrigHash differs from standard QR generation by interjecting a nonlinear mutation layer before the matrix generation.
nonlinear_distort function, we apply a formula approximating (alpha * i2 + beta). Variables alpha and beta are derived from your "strings of mutational formulas" (the entropy seed). This creates a time-variant (index-variant) distortion. The first byte is distorted differently than the second, creating a "rolling code" effect.The protocol operates on a principle of Symmetric Stream Mutation with Cipher Block Chaining (CBC).
1. Proof of ReversibilityWhere P is Plaintext, C is Ciphertext, and M is the Mutation Function. Because XOR (⊕) is its own inverse, and the receiver possesses the Key (K) and the previous byte (Ci-1), they can perfectly recalculate the mask M.
We use a Binary Quadratic Trigonometric function for the mask M:
i2 (quadratic) and ex (exponential) terms ensure that linear cryptanalysis fails. You cannot predict the output of index 10 based simply on index 1.Ci-1 (the previous encrypted byte), a change in a single bit of the input key propagates through the entire remaining stream.| Feature | Traditional QR Hash | TrigHash Protocol |
|---|---|---|
| Data Payload | Plaintext (Readable by anyone) | Ciphertext (Looks like garbage without Key) |
| Dependencies | Requires OpenSSL / Huge JS libs | Zero Dependencies (Pure Math) |
| Visual Output | Static (Always looks the same) | Dynamic (Changes based on Key) |
| Security Model | Database Lookup (Online) | Mathematical Entanglement (Offline) |
| Efficiency | High CPU overhead (RSA/AES) | Instant (Browser Math functions) |
Copy the code below to use the engine in any other project.