From: Phillip Lougher Subject: Re: partially encrypted filesystem Date: Thu, 04 Dec 2003 18:20:05 +0000 Sender: linux-kernel-owner@vger.kernel.org Message-ID: <3FCF7AD5.4050501@lougher.demon.co.uk> References: <1070485676.4855.16.camel@nucleon> <20031203214443.GA23693@wohnheim.fh-wedel.de> <20031204141725.GC7890@wohnheim.fh-wedel.de> <20031204172653.GA12516@wohnheim.fh-wedel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Kallol Biswas , linux-kernel@vger.kernel.org, "linux-fsdevel@vger.kernel.org" Return-path: To: =?ISO-8859-1?Q?J=F6rn_Engel?= In-Reply-To: <20031204172653.GA12516@wohnheim.fh-wedel.de> List-Id: linux-fsdevel.vger.kernel.org J=F6rn Engel wrote: >=20 > So - as sick as it sounds - jffs2 may actually be the fs of choice > when doing encryption, even though working on a hard drive and not > flash. Cool. :) >=20 Considering that Jffs2 is the only writeable compressed filesystem, yes= =2E=20 What should be borne in mind is compressed filesystems never expect=20 the data after compression to be bigger than the original data. In the= =20 case where the compressed data is bigger, the original data is used=20 instead, which is hardy ideal for an encrypted filesystem, and so more=20 than a direct substitution of compression function for encrypt function= =20 is needed - this is of course only relevant if the encryption algorithm= =20 used could return more data... >=20 > Depends on how much security you really care about. If you really > don't mind the pain involved, some metadata should explicitly *not* b= e > encrypted, to avoid known plaintext attacks. To a serious attacker, > this could be a death stroke for ext[23] over cryptoloop, actually. >=20 You're assuming the metadata (inodes, indexes and directory entries),=20 are encrypted with the same key, and therefore decrypting the directory= =20 data using plaintext attacks will give the attacker the key to the=20 entire metadata? There is nothing preventing the directory data being=20 encrypted separately with a different key, and therefore a plaintext=20 attack would get nothing more than the directory information. As you say, you highlight a drawback with cryptoloop and cloop, because= =20 they cannot distinquish between different types of data. This sort of=20 thing should always be done at the fs level rather than the block level= =2E.. > In real life, though, the humans are usually the weakest link, so thi= s > doesn't matter anyway. >=20 Hmmm, why not give give up completely then? Phillip