Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:36675 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751131AbdBMW1s (ORCPT ); Mon, 13 Feb 2017 17:27:48 -0500 Subject: Re: fs/crypto: file-name encryption, optional ? To: "Theodore Ts'o" , Richard Weinberger References: <86003117-e684-cdc6-567f-a227ddfd7885@oracle.com> <20170209191727.4py6beqfu22xjrsj@thunk.org> Cc: linux-fsdevel From: Anand Jain Message-ID: Date: Tue, 14 Feb 2017 06:32:15 +0800 MIME-Version: 1.0 In-Reply-To: <20170209191727.4py6beqfu22xjrsj@thunk.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > OK, but what if in this "Evil Maid" attack, a particular encrypted > directly is replaced with an empty, unencrypted directory (by messing > with the file system metadata), and it's a directory where data ends > up getting stored after its downloaded from the air --- your e-mail, > for example, or maybe the directory where your pictures from the cell > phone camera is stored. > > Now a few days later, when you leave your cell phone unattended in > your hotel room in Shanghai, another "Evil Maid" might take your > phone, and harvest the data from the unencrypted directory --- and > since the directory is unencrypted, the newly created files would also > be encrypted. Win! The "Evil Maids" can now determine if you're from > that horrible terrorist group, the Falun Gong. Or maybe the "Evil > Maids" are working for your competitor, and they're just after your > company's business secrets. :-) > > The defense against this is that if a directory is encrypted, the > files and sub-directory must also be encrypted, and by the same key. > This is enforced at lookup and open time. And the hash of the key of > the top-level directories for each user are stored in a small amount > of "secure storage" available on the phone, and this is verified when > the system is booted. Right. How does file-name encryption comes as a defense for the above Evil maid attack ? Sorry looks like I am missing something to be convinced. Thanks, Anand