From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752818AbcJAAoU (ORCPT ); Fri, 30 Sep 2016 20:44:20 -0400 Received: from imap.thunk.org ([74.207.234.97]:50704 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752395AbcJAAoM (ORCPT ); Fri, 30 Sep 2016 20:44:12 -0400 Date: Fri, 30 Sep 2016 18:05:33 -0400 From: "Theodore Ts'o" To: Richard Weinberger Cc: linux-ext4@vger.kernel.org, linux-fsdevel , "linux-kernel@vger.kernel.org" , Eric Biggers , David Gstir Subject: Re: Question on ext4 directory hashes in combination with file name encryption Message-ID: <20160930220533.x4cbv2g2ynsetqhn@thunk.org> Mail-Followup-To: Theodore Ts'o , Richard Weinberger , linux-ext4@vger.kernel.org, linux-fsdevel , "linux-kernel@vger.kernel.org" , Eric Biggers , David Gstir References: <9a5198b3-0c00-a558-5132-9c38b4bb8795@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a5198b3-0c00-a558-5132-9c38b4bb8795@nod.at> User-Agent: NeoMutt/20160910 (1.7.0) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 30, 2016 at 04:09:09PM +0200, Richard Weinberger wrote: > > if I read the ext4 code correctly, you pass encrypted filenames to ext4fs_dirhash(). > These filenames are not encoded and therefore binary gibberish. That's correct. > Isn't this a problem for the ext4 hash functions? My fear is that these hashes are optimized > for ASCII strings and produce more collisions when binary data is used as input. I'm not particularly worried. In general, while the converse is true; that hashes that assume that they are used for binary data might not work as well for ASCII strings, the ext4 hash functions should work fine for binary data. - Ted