chi-square attack

term

securitycryptography

Kept in this browser · My desk

Westfeld and Pfitzmann's 1999 statistical test for LSB replacement, which checks whether the counts of each pair of values that differ only in the last bit have been equalized, as embedding random bits does.

Overwriting least significant bits moves values only within pairs (2i, 2i + 1) and keeps each pair's total, so the mean of each pair is the expected count after embedding and no original image is needed. Applied to growing samples of an image, the test exposed EzStego, Steganos and JSteg at once; it is weak against short messages scattered at random, does not see LSB matching, and Provos's OutGuess (2001) was designed to defeat it.

The formula. With k pairs, the expected count in pair i is n*ᵢ = (n₂ᵢ + n₂ᵢ₊₁)/2 and the observed count is the even member n₂ᵢ; χ² = Σ (nᵢ − n*ᵢ)²/n*ᵢ with k − 1 degrees of freedom, and the upper-tail probability p is read as the probability of embedding. Each expected count must exceed 4. A worked case. For a toy histogram of 300 pixels with counts 40, 20, 30, 50, 60, 30, 25, 45, χ² is 13.69 and p is about 0.003; after all least significant bits are replaced (31, 29, 41, 39, 44, 46, 36, 34), χ² is 0.11 and p is about 0.99. Results. On EzStego's half-filled image, p was 0.88 with 1% of the pixels and fell to essentially 0 once the sample passed the message; S-Tools at 50% capacity escaped, at 99.5% it did not. Provos's extended version slides a fixed 3.2% sample across the file to catch partial distortions.

Also known as: chi-squared attack, chi-square steganalysis, westfeld-pfitzmann attack, pairs of values attack, ataque qui-quadrado

← Back to C Back to the glossary