-
Notifications
You must be signed in to change notification settings - Fork 0
Home
NABIL edited this page Mar 21, 2026
·
1 revision
"Hack our STORY" — JuCrypt
STORY2 is a symmetric block cipher that uses a shared narrative passphrase as its key. Two people who know the same story can encrypt and decrypt messages without exchanging random key bytes.
| Page | Contents |
|---|---|
| Installation & Setup | Requirements, C extension build |
| API Reference |
encrypt, decrypt, decrypt_str
|
| Architecture & Design | Round structure, MDS construction, key schedule |
| Security & Cryptography | Differential/linear bounds, attack boundaries, threat model |
| Performance & Benchmarks | Throughput numbers, C extension optimisations |
| Custom S-box Pool |
customju/sboxes.json format, pool loading rules |
| Changelog | Version history |
from story2 import STORY2
story = "The summer we found the tide pool near the lighthouse"
# Encrypt
ct, nonce, tag = STORY2.encrypt("Hello, world", story)
# Decrypt
pt = STORY2.decrypt_str(ct, story, nonce, tag)
print(pt) # Hello, world| Property | Value |
|---|---|
| Block size | 16 bytes (128-bit) |
| Derived key | 256-bit, HMAC-SHA256 from story passphrase |
| Rounds | 5 (fixed) |
| MDS matrix | 16×16 Cauchy over GF(2⁸), branch number 17 |
| Permutation | None — full diffusion from MDS alone |
| Authentication | HMAC-SHA256 over nonce ‖ ciphertext |
| Mode | CTR with 8-byte random nonce |
| S-box | Key-dependent, pool of 255 bijections |
| Whitening | Final ARK, independently derived key |
S-NAB-035, LOVELACE Brigade. Author: I., Nabil.