Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1494123 > unrolled thread

Question on ext4 directory hashes in combination with file name encryption

Started byRichard Weinberger <richard@nod.at>
First post2016-09-30 16:10 +0200
Last post2016-10-01 02:50 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  Question on ext4 directory hashes in combination with file name  encryption Richard Weinberger <richard@nod.at> - 2016-09-30 16:10 +0200
    Re: Question on ext4 directory hashes in combination with file name encryption Andreas Dilger <adilger@dilger.ca> - 2016-09-30 22:30 +0200
    Re: Question on ext4 directory hashes in combination with file name  encryption Theodore Ts'o <tytso@mit.edu> - 2016-10-01 02:50 +0200

#1494123 — Question on ext4 directory hashes in combination with file name encryption

FromRichard Weinberger <richard@nod.at>
Date2016-09-30 16:10 +0200
SubjectQuestion on ext4 directory hashes in combination with file name encryption
Message-ID<sn6FI-2MJ-5@gated-at.bofh.it>
Hi,

if I read the ext4 code correctly, you pass encrypted filenames to ext4fs_dirhash().
These filenames are not encoded and therefore binary gibberish.
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.

Thanks,
//richard

[toc] | [next] | [standalone]


#1494260 — Re: Question on ext4 directory hashes in combination with file name encryption

FromAndreas Dilger <adilger@dilger.ca>
Date2016-09-30 22:30 +0200
SubjectRe: Question on ext4 directory hashes in combination with file name encryption
Message-ID<sncBr-6LW-3@gated-at.bofh.it>
In reply to#1494123

[Multipart message — attachments visible in raw view] — view raw

On Sep 30, 2016, at 8:09 AM, Richard Weinberger <richard@nod.at> wrote:
> 
> Hi,
> 
> if I read the ext4 code correctly, you pass encrypted filenames to ext4fs_dirhash().
> These filenames are not encoded and therefore binary gibberish.
> 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.

The default hash function (half-md4) is an (old) crypto hash and works
fine with binary data.  Some of the other hash functions are less strong,
but I don't think anyone changes the hash function for ext4.

Cheers, Andreas





[toc] | [prev] | [next] | [standalone]


#1494331

FromTheodore Ts'o <tytso@mit.edu>
Date2016-10-01 02:50 +0200
Message-ID<sngF3-Vh-3@gated-at.bofh.it>
In reply to#1494123
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web