Skip to content
/ zwc Public

Rust library for encoding binary data using zero-width characters

License

Notifications You must be signed in to change notification settings

raftario/zwc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zwc

Rust library for encoding binary data using zero-width characters. Also optionally includes helpers for compressing, encrypting and hiding data inside strings, and a CLI wrapping that functionality.

Try out the WebAssembly compiled version !

Usage

Web

There is a WebAssembly compiled version of the tool available. No need to install anything, just open the page in any modern browser and let the magic happen.

CLI

Alternatively, you can clone this repository and run cargo install --path cli to install the command-line version of the tool on your system. The binary will be available as zwcamo.

Why

StegCloak popped on my GitHub dashboard feed and I thought it was pretty cool, and decided to reimplement it myself for fun.

How it works

The basic encoding feature just converts each byte to anywhere between two and four zero-width unicode characters (depending on which bit patterns are used for compression), and vice-versa for decoding. Data is optionally compressed using Brotli and encrypted using ChaCha20-Poly1305.

Performance

On an i7-7700HQ @ 2.80GHz, roundtrip throughput for the sample text data was around 15 MiB/s for basic encoded and compressed data, and around 280 KiB/s for basic encoded and compressed, encrypted, quality 10 Brotli compressed data. You can run the benchmarks yourself for full results using cargo bench.

no_std support

The core encoding and decoding iterators do not do any heap allocation and support no_std. Extra helpers that require std are included by default but can be discarded by setting default-features to false.

About

Rust library for encoding binary data using zero-width characters

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published