Watermarking is an attack which does not give any secrets to the attacker but
allows him to prove that the user of the encrypted ﬁle system has a certain
ﬁle stored on his drive. The ﬁle has previously been specially prepared by the
Following , data encrypted with the CBC cipher mode is vulnerable to
watermarking attacks under some circumstances. Consider a ﬁle which is divided
into ﬁle blocks B1 , ..., Bk of blocksize which are individually encrypted
using CBC and AES (whereas each ﬁle block consists of blocksize/16 cipher
blocks) (as in EncFS). The attack succeeds if the attacker is able to
calculate the XOR of the initialization vectors (IV) for some Bi and Bj , i !=
j. If so, the attacker prepares the ﬁrst plain text blocks of block i and j
Pi1 XOR Pj1 = IV(i) XOR IV(j)
Pi1 XOR IV(i) = Pj1 XOR IV(j)
This causes that
Ci1 = Enc(Pi1 XOR IV(i)) = Enc(Pj1 XOR IV(j)) = Cj1
i.e. the ﬁrst cipher block of ﬁle blocks i and j are identical. Therefore, the
attacker can test the cipher blocks Ci1 and Cj1 and conclude with high
probability whether this is his prepared ﬁle or not.
We analyzed the distribution of IV(i) XOR IV(j) for a randomly chosen blocks
and a random so-called fileIV which is used to make the IVs different from file
to file. This showed that IV(i) XOR IV(j) is not at all uniformly distributed.
There is a certain value for IV(i) XOR IV(j) which is highly more probable
that expected for a uniform distribution (2*10^-4).
We then watermarked a ﬁle such that the even ﬁle blocks start with the found
value and the odd ﬁle blocks with all zero. So, the encrypted ﬁle is
successfully recognized by testing whether there are two consecutive ﬁle
blocks that start with the same cipher block. Using a file with 50000 blocks we
achieved a probability of > 99.9% of recognizing the watermarked file.
EncFS 1.7.1 -- August 30, 2010
* add new IV initialization mode to foil watermark attack - see this 2010-08 analysis. The old IV setup is kept for backwards compatibility.
Test & stabilize =sys-fs/encfs-1.7.1
GLSA Vote: no.
GLSA Vote: no -> Closing. Feel free to reopen if you disagree.