From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gwendal Grignou Subject: Re: [PATCH] fscrypt: use 32 bytes of encrypted filename Date: Fri, 21 Apr 2017 10:21:16 -0700 Message-ID: References: <20170418210642.6039-1-gwendal@chromium.org> <20170418230136.GA96152@gmail.com> <20170419001005.GA143911@gmail.com> <20170419014209.GB12215@jaegeuk.local> <20170419040138.GA563@zzz> <20170419204448.GA1021@jaegeuk.local> <20170421074402.GA7459@zzz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1d1cH0-0000sV-3X for linux-f2fs-devel@lists.sourceforge.net; Fri, 21 Apr 2017 17:23:10 +0000 Received: from mail-io0-f170.google.com ([209.85.223.170]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES128-SHA:128) (Exim 4.76) id 1d1cGy-0004g7-Vj for linux-f2fs-devel@lists.sourceforge.net; Fri, 21 Apr 2017 17:23:10 +0000 Received: by mail-io0-f170.google.com with SMTP id r16so121974137ioi.2 for ; Fri, 21 Apr 2017 10:23:08 -0700 (PDT) In-Reply-To: <20170421074402.GA7459@zzz> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net To: Eric Biggers Cc: Ryo Hashimoto , Eric Biggers , linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, Theodore Ts'o , Jaegeuk Kim , linux-ext4@vger.kernel.org, Kazuhiro Inaba > > In any case, I guess that unless there are other ideas we can do these patches: > > 1.) f2fs patch to start checking the name, as above > 2.) patch to start encoding last 32 bytes of the name (or second-to-last CTS > block, I haven't decided yet) rather than last 16 bytes, changing > fs/crypto/, fs/ext4/, and fs/f2fs/ Using second-to-last CTS block is CTS-CBC specific. If we use another method to encode filename (I am thinking of HEH, http://www.mail-archive.com/linux-crypto@vger.kernel.org/msg21826.html) that may not work anymore. We don't have to use the last 32 bytes: using for instance the last 24 should be good enough, the escape rate will be 1/2^64 instead 1/2^128. Gwendal. > 3.) cleanup patches to introduce helper function and switch ext4 and f2fs to it > > (1) and (2) will be backported. > > UBIFS can be changed to use the helper function later if needed. It's not as > important for it to be backported there since UBIFS does the "double hashing", > and UBIFS encryption was just added in 4.10 anyway. > > I can try to put together the full series when I have time. It probably would > make sense for it to go through the fscrypt tree, given the dependencies. > > Eric ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot