Salsteg technical · what it protects, and how
The technical file

What Salsteg protects, what it doesn't, and how it does it

Two readings of the same page. The first half takes five minutes and needs no background. The second half is for whoever will audit this — every number below was checked against the shipped code, and the parts that are weak are stated as plainly as the parts that are strong.

Part one · in plain words

The short version

Salsteg puts a file inside a photograph. What comes out is a normal picture — one you can send through WhatsApp, Telegram or email like any other. Only the password opens what is inside, and the password never leaves the device it was typed on.

1
You write something, or attach a file. It is compressed, encrypted in the browser, and then broken into single bits.
2
The bits go into the busy parts of a photo — leaves, texture, edges — one bit in the lowest digit of a colour. The picture still looks like the picture.
3
You send the picture, or the PDF version of it. The PDF is the safe one for chat apps: they forward it untouched, while a photo gets re-compressed and the message is lost.
4
The other person opens salsteg.com and types the password. The same picture goes in, the file comes out. No account needed to understand what to do, no app to install.

What it is good for

  • Sending a document through a channel you don't fully trust.
  • Making the content invisible to anyone who only glances at the message.
  • Keeping the file off every server — it is encrypted before it is hidden.
  • Proving the file arrived intact: one changed bit and decryption fails loudly.

What it is not

  • It does not hide that you two are talking. Metadata is out of scope.
  • It does not survive a service that re-compresses images.
  • It cannot recover a forgotten password. There is no reset, by design.
  • It cannot protect a device that is already compromised.
The one rule that matters in practice: send the exported PNG or the PDF as a file. If a chat app turns it back into a photo, the pixels are rewritten and the hidden message is gone — that is a property of steganography, not a bug in Salsteg.
Part two · for the technical reader

Cryptographic stack

Parameters below are the constants in the shipped stego.js / chatcrypto.js, not a design intention.

StageChoiceWhy
Key derivationArgon2id, t=2, m=64 MiB, p=4, 32-byte output Memory-hard, so parallel guessing is bounded by RAM, not by cores. No PBKDF2 fallback: the code throws if the WASM fails to load rather than silently deriving a different key.
EncryptionAES-256-GCM, random 12-byte IV per message, 16-byte tag AEAD: a single flipped bit in the carrier fails decryption instead of returning plausible garbage.
Header sealHMAC-SHA256(SHA-256(password), "steg-header"), first 8 bytes No length oracle: the payload length sits behind 64 bits of password-derived MAC, so a wrong password is rejected at hashing speed.
WhiteningChaCha20 keystream, key SHA-256(pw‖"whitening") Makes the embedded bits statistically uniform, which removes the chi-square signal that plain LSB embedding leaves behind.
Slot orderFisher–Yates driven by ChaCha20, key SHA-256(pw‖"shuffle") Without the password you do not know which pixels to read — extraction is not a reading problem but a key problem.
Randomnesscrypto.getRandomValues for salt, IV, nonces, padding OS CSPRNG throughout; no Math.random anywhere on the crypto path.
Password generator20 characters from a 75-symbol alphabet 124.6 bits by calculation. Ambiguous glyphs (I, l, O, 0, 1) removed so it can be read over a phone.

The hiding layer

  • Capacity is 3 bits per pixel — one bit in each of R, G, B. A container header adds 284 bytes of overhead.
  • Slots come from a Sobel edge map, tried at thresholds 40/30/20/10 until there is room for the payload.
  • All placement math runs on LSB-cleared pixels, so embedding cannot perturb the ordering it is writing into, and the reader reconstructs the same order.
  • Output is PNG only. JPEG-class recompression destroys LSB payloads; the PDF wrapper embeds the PNG verbatim so a chat app forwards it byte-for-byte.
  • Encode verifies before it offers a download — the payload is extracted again from the finished carrier and compared.
Flat covers are refused, on purpose. If a picture has too little detail to hold the payload on edges, the old code fell back to variance order — which puts the header at slots anyone can compute, turning the picture into a password oracle at hashing speed (≈0.064 ms per guess, billions per second on a GPU). So the encoder says "pick a photo with more texture" instead. The reader keeps the variance path, so images made before that change still open.

What a guess costs an attacker

Per candidate password, an attacker pays one edge-map reconstruction, one 64-bit header test, and — only when the header matches — one full Argon2id derivation. Measured with native code at these exact parameters: 45 ms per derivation, ≈22 guesses per second per CPU core. The in-browser WASM build is several times slower, which is the owner's cost when encoding, not the attacker's.

AttackerThroughputNote
One modern CPU core≈22 guesses/smemory-bandwidth bound
One 24 GB GPU≈8.5×10³ guesses/s≈384 parallel 64 MiB lanes
100-GPU cluster≈10⁶ guesses/soptimistic ceiling
Password classEntropyTime at 10⁶ guesses/sVerdict
Generated by Salsteg (20 chars, 75 symbols)124.6 bits ≈5×10²³ yearsnot the attack surface
Four random diceware words≈50 bits≈18 years adequate, not eternal
Human passphrase, decent rules≈35 bits≈5 hours marginal
Typical reused password≈30 bits≈10 minutes cracked
Anything on a common list<20 bitsunder a second cracked

Average case, halved entropy. Grover halves the effective entropy again — the generated-password case still sits at ~2⁶² work — and no known quantum speedup removes Argon2's memory cost.

Limits, stated without varnish

LimitSeverityWhat to do about it
One secret: the password. No reset, no escrow, no recovery. by design Use the generator and store it separately from the carrier.
No forward secrecy, no revocation. One compromised password opens every picture made with it.by design One password per sensitive exchange, treated like a one-time pad.
Re-encoding destroys the payload.operational Send PNG or PDF as a file; confirm the reveal on the other side.
Metadata — who sent what, to whom, when — is not hidden. out of scope Steganography conceals content. Traffic analysis needs a different discipline.
Endpoint compromise defeats all of the above. out of scope Device hygiene. The tool never touches the network, which narrows but does not close it.
Payload ceiling 999,488 B; a 12 MP photo yields ≈470 KB because the output PNG is capped at 2 MB.capacity Fine for documents; not for media.
Adaptive edge embedding is not a formal cover model. With the original photo an analyst could attempt difference analysis.residual risk Appropriate against opportunistic and moderately-resourced adversaries; not a covert channel against state-level traffic analysis.

Verify it yourself

Nothing here asks to be trusted. The single-file build can be audited in one read-through, and the hosted app can be watched while it works.

  • Watch the network tab. Encoding makes no request. The encryption happens in the page; the server never sees the password or the plaintext.
  • Read the source. stego.js is the hiding and crypto core; js/app-legacy.js is the UI. Both are unminified.
  • Check the container. Magic 53 4D, version 2, 8-byte metadata, length inside the sealed header.
  • Break it on purpose. Flip one bit in the carrier and the GCM tag fails. Re-save the picture as JPEG and the app says it cannot find a message rather than pretending one exists.
Why there is no "military-grade" badge on this page. Because the useful claim is a measurable one: 64 MiB of memory-hard work per guess, a 124.6-bit password, and a threat model this page is honest about. Everything else is decoration.