jdvrif is a steganography command-line tool for concealing and extracting any file type via a JPG image.

Demo Image — KEY: Wtub-TzgD-VCvf-aLHW-UwY2-UBoF
Your data file is compressed with libdeflate/zlib, then encrypted with XChaCha20-Poly1305 (libsodium secretstream) under a 256-bit encryption key derived by Argon2id from a randomly generated 128-bit recovery KEY, and finally embedded in the cover image.
The KEY is displayed once, at the end of conceal, printed as 24 Base58 characters (letters and digits) in six groups of four (XXXX-XXXX-XXXX-XXXX-XXXX-XXXX) and is not saved by the program. Without it, the concealed file cannot be recovered. Its last two characters form a checksum, so most typing mistakes are reported straight away.
Using the default conceal mode, you can conceal any file type, with the finished image capped at 2 GiB. The other platform conceal modes and the compatible social media sites (listed below) have their own much smaller size limits and other requirements.
There is a Web edition of jdvrif, which you can use immediately, as a convenient alternative to downloading and compiling the CLI source code. Web file uploads are limited to 20 MiB.
An experimental Rust port jdvrif-rs is also available for those interested in that language. It is format-compatible: either build can recover the other's images.
jdvrif partly derives from the technique implemented by security researcher David Buchanan.
Unlike the common LSB (Least Significant Bit) steganography method of concealing data within the pixels of a cover image, jdvrif mostly hides data within application segments of a JPG image (ICC, EXIF, XMP, etc.).
| Conceal Mode | Storage Method | Compatible Platforms |
|---|---|---|
| (default / no option) | APP2/ICC Profile Segments | X-Twitter, Tumblr, Mastodon, Pixelfed, PostImage, ImgBB, ImgPile, Flickr & *Bluesky *(output image ≤ 2,000,000 Bytes [~1.9 MiB]) |
| -b | Framed EXIF, Photoshop & XMP Segments | Bluesky only (Legacy Method) |
| -r | JPEG DCT Coefficients (QIM) | Reddit, *Mastodon & **Bluesky *(output image ≤ 16 MiB and ≤ 8.3 megapixels) **(output image ≤ 2,000,000 Bytes [~1.9 MiB]) |
| -x | JPEG DCT Coefficients (J-UNIWARD/STC) | X-Twitter & *Bluesky *(output image ≤ 2,000,000 Bytes [~1.9 MiB]) |
Embedded data size limits for the platforms using the default APP2/ICC Profile Segments storage method can be found in the Compatible Platforms section.
For compatibility reasons, posting an image to the Bluesky platform requires the create_bsky_post.py script, found in the src/bsky folder of this repo. There is more information about the use of this script later in this readme.
The two platform exceptions to the default segment storage method are Reddit and X-Twitter. Both have their own conceal mode, and neither of those modes uses metadata segments at all: -r and -x carry the payload in the JPG image's DCT coefficients instead.
Reddit re-encodes uploaded images and discards the metadata segments the default mode relies on, so -r is the only mode that works on Reddit.
X-Twitter does preserve a single, small ICC segment, so the default mode still works on that platform, but only for a tiny payload (~10 KiB).
For the Reddit conceal mode (-r), we use the QIM steganography method (JPEG DCT-domain Quantization Index Modulation), as this is the only storage method that currently works for Reddit. The cover is transcoded to baseline Q75 4:2:0 and the payload is carried in its luminance DCT blocks.
To maximise storage capacity for the Reddit platform, use a cover image with large dimensions: 2048x2048, 4096x4096, 8192x8192 (max), etc.
Quality of the cover image is not important for this method and should be kept basic for the largest dimensions to help minimise cover image file size.
This steganography method is also compatible for posting on Mastodon and Bluesky. For Mastodon the output image must not exceed 16 MiB and have no more than 8.3 megapixels (3840x2160 worth of pixels, in any shape: 2160x3840 and 2880x2880 also pass). For Bluesky the output image size must not exceed 2,000,000 Bytes (~1.9MiB)
While the X-Twitter platform can use the default method provided by jdvrif, where data is concealed within APP2/ICC segments, X-Twitter limits this to a single ICC segment with a maximum size of just ~10 KiB.
To potentially carry more than ~10 KiB, use the X-Twitter platform conceal mode (-x). It abandons metadata segments entirely — nothing is written to an ICC profile — and instead uses adaptive J-UNIWARD distortion costs with Syndrome-Trellis Coding (STC).
The cover is prepared as progressive YCbCr 4:2:0 at its source-derived quality (capped at Q97): existing YCbCr 4:2:0 covers at Q97 or below stay in the DCT coefficient domain, while other layouts or higher qualities are transcoded.
This method is also compatible for posting on Bluesky as long as the output image does not exceed 2,000,000 (~1.9MiB).
To maximise storage capacity for the X-Twitter platform, use a high-quality/detailed cover image with large dimensions: 1024x1024, 2048x2048, 4096x4096 (max), etc.
The -r and -x carriers encrypt your data and key its location to your recovery KEY using Argon2id, but embedding still alters the image's DCT statistics, so dedicated steganalysis may reveal that an image carries hidden data.
This release reads only images made by jdvrif v10 or later. Images made with jdvrif v9.x or earlier (numeric PINs) need the legacy jdvrif release to recover.
Both DCT modes carry far less data than the default mode, so use capsize to measure a cover image before choosing a payload (see Checking capacity).
64-bit Linux only: the build enforces Linux in CMakeLists.txt and 64-bit targets in code (using sendfile(2), termios KEY entry, and O_TMPFILE staging via /proc/self/fd, with a duplicated-descriptor fallback when /proc is unavailable).
Building requires CMake 3.20 or newer, flock from util-linux, and either Ninja (preferred) or Make. The compiler must be GCC 14 or newer, or Clang 18 or newer paired with libstdc++ 14 or newer (libc++ is not supported: it lacks std::out_ptr before release 19 and std::views::zip, chunk and enumerate). The native libraries required are libsodium, libjpeg-turbo (both the turbojpeg and libjpeg APIs), zlib and libdeflate. No OpenMP is needed: the -x and -r carrier stages, and compression of inputs of 16 MiB or more when enough CPUs are available (at least 3 CPUs for 16–128 MiB, or at least 2 CPUs above 128 MiB, up to 32 threads), run on standard C++ threads. The carrier stages size their thread count by the CPUs the process may use, honouring OMP_NUM_THREADS and OMP_THREAD_LIMIT if set; configuring with -DJDVRIF_SERIAL_CARRIERS=ON (or JDVRIF_SERIAL_CARRIERS=ON ./compile_jdvrif.sh) runs them on one thread.
$ sudo apt update
$ sudo apt install g++ cmake ninja-build util-linux libsodium-dev libturbojpeg0-dev libjpeg-dev zlib1g-dev libdeflate-dev
$ g++ --version # confirm the reported version is 14 or newer
$ git clone https://github.com/CleasbyCode/jdvrif.git
$ cd jdvrif/src
$ chmod +x compile_jdvrif.sh
$ ./compile_jdvrif.sh
$ sudo cp jdvrif /usr/local/binIf your distribution ships GCC 14 as a versioned package, install g++-14 and build with CXX=g++-14 ./compile_jdvrif.sh.
The wrapper keeps dependency-tracked object files under src/build/, so later invocations rebuild only what changed, and it replaces the published jdvrif binary only after a complete, successful build. Set JDVRIF_JOBS=<count> to change the parallelism limit (default: CPU count, capped at 8), JDVRIF_BUILD_DIR=<path> to use a separate build cache, FORTIFY_LEVEL=2|3 to choose the _FORTIFY_SOURCE level for release builds (default: 3), or BUILD_MODE=sanitize for an ASan/UBSan build.
$ jdvrif
Usage: jdvrif conceal [-b|-r|-x] <cover_image> <secret_file>
jdvrif recover <cover_image>
jdvrif capsize [-r|-x] <cover_image>
jdvrif --infoRun jdvrif --info for the full built-in guide to modes, platform options and size limits.
$ jdvrif conceal your_cover_image.jpg your_secret_file.doc
Cover image: your_cover_image.jpg (36KiB).
Data file: your_secret_file.doc (6KiB).
Preparing cover image...
✓ 1280x960, Progressive YCbCr 4:2:0, Source-derived Q65 quantization, metadata removed.
Compressing data file...
✓ 6KiB -> 998 bytes (83% smaller).
Encrypting...
✓ XChaCha20-Poly1305, 256-bit key derived by Argon2id from the 128-bit recovery KEY.
Embedding...
✓ 1 ICC_PROFILE (APP2) segment.
Writing output image...
✓ 36.8KiB.
Platform compatibility for output image:-
✓ X-Twitter
✓ Tumblr
✓ Mastodon
✓ Pixelfed
✓ PostImage
✓ ImgBB
✓ ImgPile
✓ Flickr
✓ Bluesky
You must use the "create_bsky_post.py" script (found in the repo src/bsky folder)
to post the image to Bluesky.
Recovery KEY: [***Jgoe-TsV4-hWLD-SMP9-PJt7-nPTd***]
Important: Keep your KEY safe, so that you can extract the hidden file.
Saved "file-embedded" JPG image: jrif_4e87c566c.jpg (37703 bytes).
Complete!
$ jdvrif recover jrif_4e87c566c.jpg
Image file: jrif_4e87c566c.jpg (36.8KiB).
Locating hidden data...
✓ Default mode, 1 ICC_PROFILE (APP2) segment.
KEY: ****-****-****-****-****-****
Deriving key...
✓ Argon2id from the 128-bit recovery KEY.
Decrypting...
✓ XChaCha20-Poly1305, authenticated.
Decompressing...
✓ 998 bytes -> 6KiB.
Writing output file...
✓ your_secret_file.doc (6KiB).
Complete! Please check your file.jdvrif mode arguments:
conceal - Compresses, encrypts and embeds your secret data file within a JPG cover image.
recover - Decrypts, uncompresses and extracts the concealed data file from an embedded image (recovery KEY required; accepts .jpg, .jpeg, .jfif, .png, and filenames without an extension; the embedded format is identified from the file contents).
capsize - Reports the carrier capacity of a cover image for -r or -x mode. No image is saved.
Requirements for the cover image:
● JPEG only (.jpg, .jpeg, .jfif), at least 400x400 pixels, and grayscale, YCbCr or RGB colour — CMYK/YCCK images must be converted to RGB first. -r also needs at least 3,264 8x8 pixel blocks (464x464 for a square cover), one per header bit copy (192 header bits × 17 copies = 3,264 blocks).
● Default and -b upper dimensions are 4096x4096px; -r uses 8192x8192px, while -x is also capped at 4096x4096px.
● The default mode (no option) also rejects cover images whose estimated JPEG quality is above Q97; re-save the image at a lower quality if it is refused.
Requirements for the secret data file:
● The embedded filename must be no longer than 20 bytes, must not begin with . or - or end with a space or ., and must be valid UTF-8 without control characters, bidirectional-formatting or other default-ignorable characters, non-ASCII whitespace, or any of / \ : * ? " < > |. The name is stored in the image and restored on recover.
● Your data file is compressed before encryption. In the default, -r and -x modes the compressed form is kept only when it is smaller than the original; otherwise the file is stored as-is. -b mode always compresses and always stores the compressed form. In the default mode only, a data file larger than 10 MiB skips the compression attempt when its header shows an already-compressed format (ZIP, 7-Zip, RAR, gzip, MP4, MKV, MP3, JPG, PNG, etc.) or, failing that, when 32 sampled 32 KiB windows of it do not compress by at least 1%. The file's contents decide, not its extension, so a renamed archive is still recognised. For anything destined for a small platform limit, consider compressing it yourself first (zip, rar, 7z, etc.) so that you know its exact stored size.
Important
For Bluesky recovery, download the original uploaded image using the link supplied by create_bsky_post.py. The script uploads the image byte for byte, preserving its embedded data on the account's Personal Data Server (PDS).
Saving the image displayed by Bluesky downloads a processed CDN copy.
Use --original-link-in-post to include a clickable original-image download link in the post body, or --original-link-in-alt to include it in the image's alt text. See Posting and downloading Bluesky images.
Posting size limit measured by the combined embedded output image size (optimised cover image + ICC framing + encrypted stored payload):
● Flickr (200 MiB), ImgPile (100 MiB), ImgBB (32 MiB), PostImage (32 MiB), Pixelfed (15 MiB), Bluesky (2,000,000 Bytes (~1.9MiB)).
Size limit governed primarily by the embedded ICC segment budget (including the ~851-byte ICC header and encryption framing):
● Mastodon (~6 MiB - up to 100 ICC segments; 16 MiB total upload image size), Tumblr (~64 KiB single ICC segment), X-Twitter (~10 KiB single ICC segment / default method; 5 MiB total image cap).
For example, with Mastodon, if your optimised cover image is 1 MiB you can still embed a payload up to the ~6 MiB segment limit.
Platforms with their own conceal mode:
● Bluesky (-b option). This is now a legacy method as all conceal modes can now be posted to Bluesky. It will still be kept and maintained within jdvrif.
The finished "file-embedded" output JPG image must not exceed 2,000,000 bytes (~1.9 MiB), so the optimised cover image, segment headers, Base64 expansion (for XMP overflow), and encrypted payload share one budget. The encrypted payload on its own must not exceed 175,104 bytes (~171 KiB) (compressed data plus filename prefix and encryption framing).
A cover image already at 2,000,000 bytes leaves no room at all, so keep the cover smaller than the limit by the size of your compressed data file plus segment and Base64 overhead (up to ~15 KiB extra when overflowing into XMP). Use "create_bsky_post.py" to upload these images, then download the original through its supplied link for recovery. See Posting and downloading Bluesky images.
● Reddit (-r option). The cover image and the data file must each be no larger than 20 MiB, but the actual carrier capacity of the cover image is much smaller and depends on its dimensions. Use jdvrif capsize -r to measure it.
● X-Twitter (-x option). The cover image and the data file must each be no larger than 5 MiB, and the cover must not exceed 4096x4096 pixels. The actual carrier capacity is much smaller and depends on image quality and dimensions. Use jdvrif capsize -x to measure it.
In the default and -b modes, the cover image file may be up to 8 MiB; it is then losslessly optimised, and the optimised cover must not exceed 4 MiB in the default mode or 2,000,000 bytes in -b mode.
For platforms such as X-Twitter, Reddit & Tumblr, which have small data size limits, you may want to focus on data that compresses well, such as text files, etc.
x-twitter_j-uniward_stc_steg.mp4
jdvrif_xtwitter_web_txt.mp4
capsize reports how much encrypted payload a cover image can carry. Nothing is written to disk. With -x it prepares the cover exactly as conceal would and counts the capacity from the resulting carrier. With -r it validates the cover and fully decodes its scans, then computes the capacity from its dimensions without transcoding it to the Q75 carrier, so it cannot check the transcoded image against Reddit's 20 MiB upload limit: conceal -r still makes that check. Use -r for the Reddit carrier and -x for the X-Twitter carrier (-x is the default if no option is given).
$ jdvrif capsize -r basic_img_large_dims.jpg
Reddit capacity check for conceal -r mode only.
Cover Image: 384KiB, 8192x8192, Baseline YCbCr 4:2:0, Standard Q75 quantization (C3).
Theoretical C3 capacity limit for this cover image: 436906 bytes (~426KiB).
Conservative maximum stored payload capacity with a 20-byte filename: 436792 bytes (~426KiB).
Recommended maximum stored payload capacity with a 20-byte filename: 435768 bytes (~425KiB).The figure reported is the total encrypted envelope capacity, not a raw secret-file limit: the filename, encryption and recovery metadata consume 95 to 114 bytes for a single-frame payload, and larger payloads add framing overhead. Don't aim at the theoretical limit — where capacity allows, keep the stored payload at least 1 KiB below the conservative maximum. The size check performed by conceal is the authoritative one.
To create compatible "data-concealed" JPG images for posting on the Reddit platform, you must use the -r option with conceal mode.
$ jdvrif conceal -r my_image.jpg hidden.docThese images are compatible for posting on Reddit. They also work on Mastodon when the output image is no larger than 16 MiB and has no more than 8.3 megapixels (3840x2160 pixels); the platform compatibility report after conceal tells you which applies. Your embedded data file will be lost if posted on any other platform.
When saving/downloading an image from Reddit make sure to click on the image within the post to fully expand it before saving.
reddit_qim_steg.mp4
To create compatible "data-concealed" JPG images for posting on the X-Twitter platform using the J-UNIWARD steganography method, you must use the -x option with conceal mode.
$ jdvrif conceal -x my_image.jpg hidden.docThese images are only compatible for posting on X-Twitter. Your embedded data file will be lost if posted on a different platform.
When saving/downloading an image from X-Twitter make sure to click on the image within the post to fully expand it before saving.
Create the embedded JPG using conceal -b:
$ jdvrif conceal -b my_image.jpg hidden.docPost the resulting jrif_....jpg using create_bsky_post.py, in the repo's src/bsky folder (Python 3.11 or newer). The script uploads the original bytes, including the concealed data. Uploading through the Bluesky website or mobile app processes the image and removes the metadata needed for recovery.
Create an app password in your Bluesky account. Pass credentials through the environment rather than the command line. The following commands run from the repo's src folder:
$ pip install -r bsky/requirements.txt
$ export ATP_AUTH_HANDLE='you.bsky.social'
$ read -rsp 'Bluesky app password: ' ATP_AUTH_PASSWORD && printf '\n' && export ATP_AUTH_PASSWORD
$ python3 bsky/create_bsky_post.py "Steg image test" \
--image jrif_4e87c566c.jpg \
--alt-text "Description of the image" \
--original-link-in-post
$ unset ATP_AUTH_PASSWORDWith --original-link-in-post, the script preserves any non-empty post text, adds a blank line when text is present, and appends:
Use the following link to download this JPG image: <original-image URL>
The format label is JPG, PNG, Webp, or GIF, detected from the validated image contents rather than its filename. For a jdvrif output image, this is JPG.
The URL is marked as a clickable link in the published post, so viewers can open it directly. The script obtains the image CID during upload and constructs the link before creating the post; the original becomes publicly downloadable when the post references it.
The complete post, including the added sentence and URL, must fit Bluesky's 300-grapheme / 3,000-byte limits. These long URLs leave limited room for your own text. --original-link-in-post supports only one image: multiple original-image links cannot fit, so the script rejects that combination before login or upload. The script checks bytes and a conservative grapheme lower bound (exact for ASCII) locally, both before upload and with the completed URL; the PDS checks the exact Unicode grapheme limit. Text is not silently shortened. If the result is too long, shorten your text or use the alt-text option instead.
To place the link in the image's alt text, replace --original-link-in-post with --original-link-in-alt. This preserves your description and appends a blank line, Original image with embedded data:, and the URL. Viewers can copy the URL from the alt text; whether it is clickable depends on their client. The combined description and link must fit the script's 2,000-character alt-text limit, otherwise it stops before publishing and asks you to shorten the description.
Both options require --image, can be used together on a single-image post, and work with images accompanying a quoted post. For multiple images (up to four), use --original-link-in-alt instead: repeat --image and supply one --alt-text per image if using alt text. Each image receives its own original download link in attachment order. Without either link option, the script still prints the download links and curl commands in the terminal, but does not add them to the post or alt text.
The script prints Creating post: with a blank line before and after it. After a successful image post, it prints the new post's uri and cid as JSON, followed by the original download link(s) and an alternative curl command for each image. With --original-link-in-post, the download instructions look like this (the URL below is a placeholder):
Important: Use the following URL to download the image from Bluesky (This link will also appear in the image post text on Bluesky):
<original-image URL>
Alternative download option using curl:
curl --fail --location '<original-image URL>' --output image_69128425.jpg
Each curl filename has a randomly generated eight-digit suffix, such as image_69128425.jpg. Its extension (.jpg, .png, .webp, or .gif) comes from the validated image format. Copy and run the printed command to download the original; the script does not run curl itself. The alternative curl instructions appear only in the terminal, not in the Bluesky post. The parenthetical about appearing in the post text is shown only when --original-link-in-post is used.
The printed post CID identifies the post record, not the image. Use the complete download link supplied by the script. It has this form:
<PDS>/xrpc/com.atproto.sync.getBlob?did=<account-DID>&cid=<image-CID>
The script uses the account's PDS endpoint from the login's DID document when available, otherwise the configured upload service. Image-post stdout now contains JSON followed by download instructions, rather than a single JSON document.
To recover the data, open the supplied link and save the original image, or download it with curl (replace ORIGINAL_IMAGE_URL with the complete link and keep the quotes):
$ curl --fail --location 'ORIGINAL_IMAGE_URL' --output image_69128425.jpg
$ jdvrif recover image_69128425.jpgNo Bluesky login is required for the public download. If the browser saves the file under its CID without an extension, current jdvrif recover accepts that filename directly; there is no need to rename it. Enter the recovery KEY from the original conceal operation when prompted.
Keep the post available: deleting it can make the original blob unavailable even if a processed CDN copy remains cached. Downloading the original preserves what was uploaded; it cannot restore metadata already removed before upload. Do not use the displayed CDN image or an @jpg CDN URL for recovery.
See src/bsky/README.md for all helper options (multiple images, replies, quote posts, link cards) and details of its validation and security protections.
The earlier posting demo below does not show the new original-download-link options; follow the instructions above for downloading a recoverable image.
bluesky_cli_jpg.mp4
This section is for anyone writing a compatible implementation. Everything below is fixed by jdvrif v10.
The KEY is 16 bytes from a cryptographic random number generator (never all zero). It is written as:
-
Body — the 16 bytes read as one 128-bit big-endian integer, written in Base58 as exactly 22 digits, most significant first, padded on the left with
1(the zero digit). Alphabet (Bitcoin's):123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz. -
Check — two more characters:
digest = BLAKE2b-256(ASCII("jdvrif pin check v1") || key_bytes) (19-byte label, no NUL; unkeyed) value = big_endian_u32(digest[0..4]) mod 3364 check = alphabet[value / 58] || alphabet[value mod 58] -
Display — the 24 characters in six groups of four, joined with
-.
When a KEY is entered, spaces, tabs and - are ignored and letters are case-sensitive.
| Key bytes (hex) | KEY |
|---|---|
00000000000000000000000000000001 |
1111-1111-1111-1111-1111-126X |
000000000000000000000000000003d3 |
1111-1111-1111-1111-1111-Ht11 (check value 0) |
00000000000000000000000000000abf |
1111-1111-1111-1111-1111-pSzz (check value 3363) |
000102030405060708090a0b0c0d0e0f |
112d-rXXU-ifSr-RnXL-GbXg-8Egs |
8f3a1c5e9b2d4f60718293a4b5c6d7e8 |
Jgoe-TsV4-hWLD-SMP9-PJt7-nPTd |
ffffffffffffffffffffffffffffffff |
YcVf-xkQb-6JRz-qk5k-F2tN-LvUM |
Encryption key (KDF5) — 32-byte output from Argon2id (libsodium crypto_pwhash, ALG_ARGON2ID13) with the 16 raw key bytes as the password and the 16-byte random salt and costs stored in the image's 56-byte KDF5 region:
0..3 ASCII "KDF5"
4 algorithm id (1 = Argon2id13)
5 sentinel (0xA5)
6..7 random filler
8..23 16-byte Argon2id salt (must not equal "jdvrif-carrierv3")
24..47 24-byte secretstream header
48..51 Argon2id opslimit, big-endian u32
52..55 Argon2id memlimit, big-endian u32
Conceal writes libsodium's INTERACTIVE preset (opslimit = 2, memlimit = 64 MiB). Recovery accepts opslimit from libsodium's minimum up to 16 and memlimit up to 512 MiB, and rejects the reserved carrier salt.
Carrier key (-r and -x) — the first 16 bytes of Argon2id(password = the 16 key bytes, salt = ASCII jdvrif-carrierv3, opslimit 2, memlimit 64 MiB, 32-byte output). For key bytes 000102…0f it is f3559f3f621bca57b955a0c2a772c7e1.
Carrier positions (-r RQSTEG3, -x JXSTEG4) — every keyed value is PRF(d, x) = SipHash-2-4(carrier_key, LE64(d) || LE64(x)). Positions are a front-to-back Fisher–Yates shuffle of all n (n >= 1) candidate coefficients in scan order, drawing each swap from its own PRF call:
counter = 0
for i = 0 .. min(count, n - 1) - 1:
bound = n - i
threshold = (2^64 - bound) mod bound
repeat: w = PRF(layout_domain, counter); counter += 1 until w >= threshold
swap(items[i], items[i + (w mod bound)])
The first count items are the positions used, in order (-x: the header's positions, then the payload's, from one shuffle; -r: one shuffle each for header and payload). Each draw depends on the full 128-bit carrier key. Position draws use their own domain constants, separate from those for whitening, dither and parity direction, so no position draw reuses a whitening or dither value:
- -r (
RQSTEG3): header layout0x5251534c41594831, payload layout0x5251534c41595031, header whitening/dither0x4845414445527631, payload whitening/dither0x5041594c4f414431. - -x (
JXSTEG4): layout0x4a58535445474c31, header whitening0x4a58535445474831, payload whitening0x4a58535445475031, header direction0x4a58535445474448, payload direction0x4a58535445474450.
This hides where the data is. It does not stop statistical steganalysis from detecting that an image carries hidden data.
jdvrif encrypts and authenticates your data, but some exposure is outside what the program can control:
● Deleted temporary files are not wiped. Staged temporary files (compressed payloads on conceal, decrypted data on recover, and the output image before commit — encrypted payloads are streamed directly to the output image or held in memory, and recovery reads default-mode ciphertext in place) never get a visible name and are released when jdvrif exits, but releasing a file frees its disk blocks without overwriting them, so the data can stay on the disk until that space is reused. On SSDs, journalling or copy-on-write filesystems, or with snapshots, overwriting would not reliably erase it either. Use full-disk encryption if this matters to you.
● Memory. Keys, KEY input buffers and cipher stream state are locked in RAM with mlock(2) on a best-effort basis, and keys and plaintext buffers are wiped after use; jdvrif also tries to turn off core dumps for itself and block other processes running as your user from reading its memory (PR_SET_DUMPABLE 0 and RLIMIT_CORE 0, for that run only). These protections are best effort: if the system refuses PR_SET_DUMPABLE or RLIMIT_CORE (a seccomp filter in a sandbox or container, for example), jdvrif prints a warning and carries on without it, and mlock(2) can be refused under tight RLIMIT_MEMLOCK limits. Bulk plaintext, compression and Argon2id working buffers are not locked in RAM, so data in use can still be written to swap: use encrypted swap (or none) to cover that. A root user can read any process's memory.
● Interrupted recovery on some filesystems. Where the filesystem lacks O_TMPFILE or hard links, or /proc is unavailable, the recovered file is first copied to a hidden .jdvrif_publish_*.tmp file (mode 0600) beside the output, then renamed into place. If jdvrif is killed, crashes or loses power during that copy, the hidden file can be left behind holding some or all of the recovered data, so delete it. Ordinary errors and Ctrl+C remove it.
The test scripts live in src/tests (or tests/ at the repository root); run them from src after building (replacing tests/ with ../tests/ if tests/ sits at the repository root). Most take the binary to exercise with --bin:
$ bash tests/run_golden_tests.sh --bin ./jdvrif # recover pre-built images with known KEYs
$ bash tests/run_roundtrip_tests.sh --bin ./jdvrif # fresh conceal/recover round-trips
$ bash tests/run_security_smoke.sh --bin ./jdvrif # negative-path and boundary checks
$ bash tests/run_reddit_tests.sh --bin ./jdvrif # -r QIM carrier
$ bash tests/run_twitter_tests.sh --bin ./jdvrif # -x J-UNIWARD/STC carrier
$ bash tests/run_io_security_tests.sh --bin ./jdvrif # input-size bounds, KEY entry signal/job-control handling
$ bash tests/run_output_interrupt_tests.sh --bin ./jdvrif # interrupted fsync/stdout around output commit and KEY delivery
$ bash tests/run_build_hardening_tests.sh --bin ./jdvrif # template generation, release hardening flags and binary checks (--bin optional; defaults to ./jdvrif)
$ bash tests/run_jpeg_safety_tests.sh # JPEG parser/decoder safety (builds its own test binary)
$ bash tests/run_bsky_tests.sh # Bluesky posting helperThe remaining six build and run their own C++ unit and regression tests, and need no arguments: run_carrier_thread_tests.sh, run_codec_preparation_tests.sh, run_deflate_thread_tests.sh, run_filename_safety_tests.sh, run_signal_thread_tests.sh and run_worker_team_tests.sh.
-
libsodium — cryptographic random generation, Argon2id key derivation, XChaCha20-Poly1305 secret streams, the BLAKE2b recovery KEY checksum, Base64 and secure memory wiping. Dynamically linked as a system library.
License: ISC License
Copyright (c) 2013–2026 Frank Denis.
-
libjpeg-turbo — JPEG processing and lossless transformation. Dynamically linked as a system library.
This software is based in part on the work of the Independent JPEG Group.
Licenses: Independent JPEG Group License, Modified BSD 3-Clause License, and zlib License.
Copyright © 1991–2020 Thomas G. Lane and Guido Vollbeding.
Copyright © 2009–2026 D. R. Commander. All Rights Reserved.
Copyright © 2015 Viktor Szathmáry. All Rights Reserved.
-
zlib — Streaming zlib compression and decompression, including the multithreaded sliced compression of large inputs. Dynamically linked as a system library.
License: zlib License
Copyright (C) 1995–2026 Jean-loup Gailly and Mark Adler.
-
libdeflate — Fast whole-buffer zlib-format compression, and the raw-DEFLATE trial that samples large default-mode inputs for compressibility. Dynamically linked as a system library.
License: MIT
Copyright 2016 Eric Biggers.
Copyright 2024 Google LLC.
-
Compact ICC Profiles — embedded Adobe-compatible ICC profile.
License: CC0 1.0 Universal
-
J-UNIWARD reference implementation (Digital Data Embedding Laboratory, Binghamton University) — source of the Daubechies-8 wavelet filter coefficients (
twitter_juniward.cpp) and the constraint-height-7 STC submatrix constants (twitter_stc.cpp) used by -x.See src/THIRD_PARTY_NOTICES.md for attribution and the publications they come from.
-
Bryan Newbold / ATProto Hacker Cookbook —
create_bsky_post.py— Basis for the forked Bluesky posting helper (src/bsky/create_bsky_post.py). For reference see the Cookbook copy.License: CC0 1.0 Universal.
-
Requests — HTTP and Bluesky API requests.
License: Apache 2.0 / NOTICE
Copyright 2019 Kenneth Reitz.
-
urllib3 — HTTP transport under Requests; pinned for bounded decompression and safe chunked reads.
License: MIT
Copyright (c) 2008-2020 Andrey Petrov and contributors.
-
idna — IDNA2008/UTS46 encoding of internationalised hostnames.
License: BSD 3-Clause
Copyright (c) 2013-2026, Kim Davies and contributors.
-
chardet — charset detection for link-card pages that declare none.
License: 0BSD
Copyright (c) 2026 Dan Blanchard.
-
Pillow — Image validation, dimensions, and aspect-ratio handling.
License: MIT-CMU
PIL copyright © 1997–2011 Secret Labs AB and © 1995–2011 Fredrik Lundh and contributors.
Pillow copyright © 2010 Jeffrey “Alex” Clark and contributors.