F5 (steganographic algorithm)
termKept in this browser · My desk
A JPEG steganography algorithm by Andreas Westfeld (2001) that decrements the absolute value of coefficients instead of overwriting bits, spreads its changes with a password-driven permutation and uses matrix embedding to make fewer changes.
Presented at the Information Hiding workshop in Pittsburgh in April 2001 as "High capacity despite better steganalysis", F5 resisted the visual and chi-square attacks of the time. Fridrich, Goljan and Hogea broke it in 2002 by calibration, estimating the cover's histogram from a copy of the stego image cropped by four pixels and recompressed; nsF5 (2007) removed its shrinkage with wet paper codes and became a standard benchmark.
The steps. Westfeld described F5 as the end of a series. F3 decremented absolute values and used coefficients equal to 1 and −1, but when a 1 or −1 became 0 (shrinkage) the bit had to be embedded again, and since shrinkage only ever hits zeros F3 left an excess of even coefficients. F4 gave negative coefficients the inverted meaning (positive odd and negative even carry 1), which keeps the histogram's two characteristic properties. F5 added permutative straddling and matrix embedding with Hamming codes, carrying k bits in 2^k − 1 coefficients with at most one change; on Westfeld's test image, 217 bytes needed 1,157 changes with F4 and 459 with F5. The break. Shifting the 8 × 8 grid by four pixels destroys the block structure in which F5 worked, so the recompressed crop approximates the cover; the share of changed coefficients follows by least squares, and 10% of usable coefficients could be detected reliably. Not to be confused with F5, the networking company.
Also known as: f5 steganography, f5 algorithm, westfeld f5, f5 steganographic algorithm, algoritmo f5
Sources
- DDE Lab, Binghamton University, Steganographic Algorithms (read 2026-11-17): Westfeld, High capacity despite better steganalysis, Information Hiding 2001, Pittsburgh, 25 to 27 April 2001, LNCS 2137, pp. 289 to 302; original Java implementation
- Westfeld, F5: ein steganographischer Algorithmus, VIS 2001 (read 2026-11-17): F3, F4, F5, shrinkage, permutative straddling, matrix encoding; 217 bytes with 1,157 changes in F4 and 459 in F5
- Fridrich, Goljan and Hogea, Steganalysis of JPEG Images: Breaking the F5 Algorithm, Information Hiding 2002 (read 2026-11-17): calibration by cropping four pixels and recompressing; 10% of usable coefficients detectable
- Fridrich, Pevný and Kodovský, ACM MM&Sec 2007 (read 2026-11-17): nsF5, F5 without shrinkage using wet paper codes