Menu

1 / 2

N! Ways to Hide a Message: Multi-Carrier Encoding in Rust

DEV Community·Matías Denda·6 months ago
#JTU0XwAn
#why#comment#rust#carrier#order
Reading 0:00
15s threshold

Post 2 of 6 in the series on building Anyhide , a Rust steganography tool. This post is about a small feature that multiplies your adversary's work by a factorial.

I like features that give you an outsized security improvement for very little code. Multi-carrier encoding is one of those. The implementation is maybe twelve lines. The effect is that the set of carriers you use becomes an ordered secret — and getting that order wrong produces deterministic garbage, which an attacker can't distinguish from using the wrong files entirely.

Let me explain.

The single-carrier recap

In a normal Anyhide flow, both parties share one file. They use it as a reference, and the sender encodes a message by computing byte positions into that file. Single file, single shared secret.

But "the carrier is the file we both have" is a constraint I wanted to relax. What if the carrier is a set of files ?…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.