cipher
Cipher is WarFi's cryptography bench. The point here is not to chase the newest acronym, it is to understand the machinery well enough to trust it, and to share what that understanding builds. Two of WarFi's own projects anchor the section: LORICA, a paranoid post-quantum framework, and razhan-vault, a zero-knowledge password manager. Around them sits the practical knowledge every operator should have: the ciphers worth knowing, and how to actually encrypt, sign, and verify things from the command line. The name is deliberate. This is about ciphers and the craft of keeping secrets, not coins.
01Understand it, then trust it
Most people treat cryptography as a black box: pick a library, call encrypt, move on. That works until it does not, and when it fails it fails silently and completely. The WarFi approach is to open the box. You do not have to be a cryptographer to understand why a cipher is strong, what a mode of operation protects and what it does not, or why a key-derivation function matters more than the cipher some days. Understanding is what lets you trust a tool instead of hoping.
» Everything in this section is chosen to build that understanding: two projects that show the ideas in working code, the concepts behind them, and the everyday commands that put real cryptography in your hands today.
02Why Serpent, not only AES
AES is excellent and you should keep using it. But it is not the only strong cipher, and leaning on a single algorithm is a fragility of its own. Serpent was an AES finalist, designed by Anderson, Biham, and Knudsen. It uses 32 rounds where AES-256 uses 14, more than double the security margin, and after 25 years no cryptanalytic attack has dented it. It was judged too slow in 2000, which is exactly the trade a paranoid application should be willing to make: when the data matters more than the milliseconds, Serpent's conservative design is a feature, not a cost.
» 32 rounds versus AES-256's 14: a far larger margin against future cryptanalysis.
» A conservative design that chose security over speed, and has never been broken.
» Public domain, no patents, fully specified and auditable.
» A natural partner to AES when you want diversity rather than a single point of failure.
03On not rolling your own
There is a famous rule: do not roll your own crypto. It is good advice, and it needs a caveat. Building a cipher yourself, from the specification, is one of the best ways to truly understand it, and that is encouraged here. What the rule really warns against is trusting your hand-built implementation with real secrets. Home-grown code has not survived the years of attack that a vetted library has. So build to learn, and reach for audited, maintained implementations when it is time to protect something that matters.
Learn by building; protect by trusting what has been tested. The projects below are built from scratch for auditability and study, and they are honest about where a production deployment should swap in a hardened library.
04Defence in depth for encryption
LORICA, named for the layered plate armor of the Roman legions, is WarFi's answer to a simple fear: what if one algorithm falls, perhaps to a quantum computer we do not yet know exists? Its defence is mathematical diversity. Rather than trust any single primitive, LORICA layers several independent ones, drawn from different branches of mathematics, so that breaking the whole requires breaking all of them at once. An attacker would need to defeat a classical block cipher, a lattice problem, a code-based problem, and a hash-based scheme simultaneously. That is a far higher bar than any one of them alone.
» Serpent-256-CTR for the symmetric layer, the conservative cipher from above.
» Kyber / ML-KEM (lattice-based) and Classic McEliece (code-based) for key exchange.
» SPHINCS+ (hash-based) for signatures that rely on nothing but the strength of a hash.
» SHA3-512 (Keccak), with HMAC and HKDF, holding it together.
05The seven layers
LORICA stacks its protections so that each is independent of the others. No single break collapses the system; each layer an attacker clears still leaves the next, built on different mathematics.
» The tiers scale the paranoia to the threat: Standard pairs Kyber with Serpent for everyday secrets; Elevated adds McEliece; Paranoid adds SPHINCS+ for nation-state adversaries; Maximum widens every parameter for when speed truly does not matter.
06Why from scratch, in Rust
LORICA implements its primitives from scratch in Rust, with a single external dependency for secure randomness. That is a deliberate choice for a paranoid system: every line is visible and auditable, there is no hidden supply-chain risk, and Rust's memory safety removes a whole class of bugs that plague C crypto. It is a teaching artifact as much as a tool, the Serpent, SHA3, HMAC, and HKDF code reads like the specifications it follows.
LORICA's own documentation is candid that a real deployment should replace the simulated post-quantum pieces with a hardened library such as liboqs. That honesty is the point: understand the design here, harden it before you trust it with lives or livelihoods.
07A password manager you can read
razhan-vault is WarFi's terminal-based password manager, built on the same principle as the rest of the bench: a vault is only trustworthy if you can understand how it protects you. It keeps your secrets under modern, post-quantum-aware cryptography, with an architecture designed so that even the vault itself never learns your master password. For anyone who has wondered what a cloud password manager actually does with their data, razhan-vault is the version where you can check.
» Argon2id to turn your master password into a key, hardened against brute force and GPUs.
» Serpent-256-CTR to encrypt the vault contents, the conservative cipher again.
» Kyber-1024 post-quantum key encapsulation, so captured data stays safe against future quantum attack.
» Blake3 for fast, modern hashing and integrity.
08What zero-knowledge really means
Zero-knowledge, here, means the vault is built so that your master password and your plaintext secrets never leave your control. The key that unlocks everything is derived from your master password on your own machine, with Argon2id, and is never stored or transmitted. The vault at rest is just ciphertext; without your password it is noise. That is the difference between trusting a provider's promise and trusting mathematics: even a breach of where the vault is stored yields nothing usable.
The strength of any zero-knowledge vault still rests on one thing you control: the master password. A long, unique passphrase is what makes the Argon2id and Serpent layers meaningful. The radio and arsenal guides' advice on strong passphrases applies here most of all.
09Build notes and release
razhan-vault is an active WarFi project. Build instructions, the threat model, and the cryptographic design in full will be documented here as it is prepared for release, in the same spirit as the rest of the site: free to read, free to audit, free to learn from.
10Symmetric and asymmetric
Two families do most of the work. Symmetric ciphers (AES, Serpent, ChaCha20) use one shared key to both encrypt and decrypt; they are fast and protect bulk data. Asymmetric cryptography (RSA, elliptic curve, and the post-quantum schemes) uses a key pair, public and private, to solve the problem symmetric ciphers cannot: agreeing on a key with someone you have never met, and proving who sent something. Real systems use both, asymmetric to exchange a key, symmetric to move the data.
11Modes and authenticated encryption
A block cipher on its own only encrypts one block. A mode of operation is how you safely encrypt a whole message. The crucial modern idea is authenticated encryption: a mode that not only hides the data but detects tampering. Encrypting without authenticating is a classic, dangerous mistake, it leaves the door open to attacks that flip bits in the ciphertext.
» CTR turns a block cipher into a stream; fast, but must be paired with authentication.
» GCM and ChaCha20-Poly1305 are authenticated: they encrypt and verify integrity together. Prefer these.
» CBC is older and must be used carefully; without authentication it is fragile.
» The rule: never encrypt without also authenticating, or use a mode that does both.
12Hashing and key derivation
Hashes and key-derivation functions are often confused and do different jobs. A hash (SHA-256, SHA3, Blake3) is a fixed-size fingerprint of data, used for integrity and signatures. A KDF (Argon2, scrypt, PBKDF2) is a deliberately slow, salted function that turns a password into a key, slow on purpose so that guessing is expensive. Using a plain fast hash where a KDF belongs is one of the most common and damaging crypto mistakes.
» Integrity and fingerprints: SHA-256, SHA3-512, or Blake3 (fast and modern).
» Passwords into keys: Argon2id first choice, then scrypt, then PBKDF2 with a high iteration count.
» Always salt; never store a password hashed with a plain fast hash like SHA-256 alone.
» A signature proves both integrity and origin; a hash alone proves only integrity.
13The post-quantum shift
A large enough quantum computer would break today's RSA and elliptic-curve cryptography. It may not exist yet, but the threat is already here in one form: harvest now, decrypt later, where an adversary records encrypted traffic today to decrypt once the hardware arrives. The response is post-quantum cryptography, new schemes built on problems quantum computers are not known to solve. This is why LORICA and razhan-vault reach for Kyber and friends now rather than later.
» Kyber / ML-KEM: the standardised lattice-based key exchange; the practical workhorse.
» Dilithium / ML-DSA and SPHINCS+: post-quantum signatures.
» Classic McEliece: code-based, very conservative, large keys but a long track record.
» Anything that must stay secret for a decade should be thinking post-quantum today.
14GPG: encrypt, sign, verify
GnuPG is the veteran tool for public-key encryption and signing. Generate a key pair once, share your public key, and anyone can encrypt to you or verify your signatures. It is how software releases are signed and how many operators exchange secrets.
$ gpg --full-generate-key
$ gpg --armor --export you@warfi.net > warfi-pub.asc
$ gpg --encrypt --armor --recipient you@warfi.net secret.txt
$ gpg --decrypt secret.txt.asc
» To prove a file came from you unchanged, sign it; anyone with your public key can verify it.
$ gpg --detach-sign --armor release.tar.gz
$ gpg --verify release.tar.gz.asc release.tar.gz
15age: modern and simple
age is the modern alternative to GPG for file encryption: small, opinionated, and hard to misuse. A key pair is two short strings, and encrypting is one line. For encrypting a backup or sending a file, it is often the cleaner choice.
$ age-keygen -o key.txt
$ age -r age1ql3z7...recipient... -o secret.age secret.txt
$ age -d -i key.txt -o secret.txt secret.age
16Verify what you download
A habit worth building: never run a downloaded binary or image without checking it. Publishers post a checksum and usually a signature over that checksum. Verify the hash matches, then verify the signature is theirs. Both steps together prove the file is genuine and untampered.
$ sha256sum -c sha256sums.txt
$ gpg --verify sha256sums.txt.asc sha256sums.txt
17Encrypt the disk itself
For a laptop or a go-kit drive, full-disk encryption means a lost device is a non-event. On Linux, LUKS is the standard. It encrypts a whole partition behind a passphrase; without it, the disk is noise.
$ sudo cryptsetup luksFormat /dev/sdX
$ sudo cryptsetup open /dev/sdX securevol
$ sudo mkfs.ext4 /dev/mapper/securevol
luksFormat erases the target, so be certain of the device and keep backups. The passphrase is the whole defence; make it long. This closes the loop with the rest of WarFi: the strongest cipher is undone by a weak secret, and defended by a strong one.
Authorized use only. Use these tools and techniques solely on systems you own or have explicit written permission to test. Unauthorized access to computers, networks, or data is a crime in nearly every country, including the Philippines (RA 10175), the United States (CFAA), the United Kingdom (Computer Misuse Act 1990), and across the European Union (Directive 2013/40/EU). When in doubt, get permission in writing first. This is general information, not legal advice.