* Question on ext4 directory hashes in combination with file name encryption
@ 2016-09-30 14:09 Richard Weinberger
2016-09-30 20:20 ` Andreas Dilger
2016-09-30 22:05 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: Richard Weinberger @ 2016-09-30 14:09 UTC (permalink / raw)
To: linux-ext4, linux-fsdevel, linux-kernel
Cc: Theodore Ts'o, Eric Biggers, David Gstir
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question on ext4 directory hashes in combination with file name encryption
2016-09-30 14:09 Question on ext4 directory hashes in combination with file name encryption Richard Weinberger
@ 2016-09-30 20:20 ` Andreas Dilger
2016-09-30 22:05 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Dilger @ 2016-09-30 20:20 UTC (permalink / raw)
To: Richard Weinberger
Cc: Ext4 Developers List, linux-fsdevel, linux-kernel,
Theodore Ts'o, Eric Biggers, David Gstir
[-- Attachment #1: Type: text/plain, Size: 663 bytes --]
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
[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Question on ext4 directory hashes in combination with file name encryption
2016-09-30 14:09 Question on ext4 directory hashes in combination with file name encryption Richard Weinberger
2016-09-30 20:20 ` Andreas Dilger
@ 2016-09-30 22:05 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2016-09-30 22:05 UTC (permalink / raw)
To: Richard Weinberger
Cc: linux-ext4, linux-fsdevel, linux-kernel, Eric Biggers, David Gstir
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-01 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 14:09 Question on ext4 directory hashes in combination with file name encryption Richard Weinberger
2016-09-30 20:20 ` Andreas Dilger
2016-09-30 22:05 ` Theodore Ts'o
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.