No key to manage
Hiding a per-call key inside the cipher removes key storage entirely — the right trade-off for obfuscation, and stated plainly as not a replacement for audited cryptography such as AES.
Case study · Open source
A dependency-free Dart library that turns English and Arabic text into unreadable cipher text and back, with a fresh random key hidden inside every cipher.
thunder_encryption01Problem
Apps sometimes need to make text unreadable at a glance — in local storage, logs or QR payloads — without key management or native plugins. Most small Dart helpers only handle Latin text. Thunder Encryption supports English and Arabic letters, digits and common symbols in pure Dart, on every platform including web.
02My role
I wrote the cipher and the package (first published January 2025) and maintain it.
03How it works
Each call picks six random letters from the alphabet and derives a numeric key from their positions. The text is mapped to numbers and shifted in repeated rounds driven by that key; the six key letters are then embedded at fixed positions inside the cipher, with a length marker. Decryption extracts the letters, rebuilds the key and reverses the rounds — so the same text gives a different cipher every time and there is no key to store.
$ dart pub add thunder_encryption # Dart final cipher = TextEncryption.textEncryption("عبد الفتاح نضال الشنطي"); final plain = TextDecryption.textDecryption(cipher);
04Key technical decisions
Hiding a per-call key inside the cipher removes key storage entirely — the right trade-off for obfuscation, and stated plainly as not a replacement for audited cryptography such as AES.
No native code and no dependencies, so it runs the same in Flutter mobile, desktop and web.
Each language is a pair of maps (letter → value, value → letter), so contributors can add a language without touching the cipher.
05Hard parts solved
Characters outside the alphabet (, . line breaks, emoji) used to be encrypted as a. 1.1.0 throws an ArgumentError naming the character — and old ciphers still decrypt, because the alphabet and format didn't change.
The published archive had carried a whole Flutter app scaffold; removing it took the package from 321 KB to 65 KB.
06Outcome
1.1.0 added 13 real tests, CI, API documentation and an honest security note in the README.
Measured with the publish dry-run.
07Stack & links
© 2026 Abd Alftah Salem · Back to portfolio