From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C3CFC433EF for ; Tue, 12 Oct 2021 17:30:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14DE160EFE for ; Tue, 12 Oct 2021 17:30:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232060AbhJLRcx (ORCPT ); Tue, 12 Oct 2021 13:32:53 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36811 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231756AbhJLRcw (ORCPT ); Tue, 12 Oct 2021 13:32:52 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 19CHUkqM025388 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Oct 2021 13:30:47 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 213D215C00CA; Tue, 12 Oct 2021 13:30:46 -0400 (EDT) Date: Tue, 12 Oct 2021 13:30:46 -0400 From: "Theodore Ts'o" To: Avi Deitcher Cc: linux-ext4@vger.kernel.org Subject: Re: algorithm for half-md4 used in htree directories Message-ID: References: <3A493D20-568A-4D63-A575-5DEEBFAAF41A@dilger.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Mon, Oct 11, 2021 at 07:58:00PM -0700, Avi Deitcher wrote: > Aha. I missed that the seed is injected into buf before passing it > into half_md4_transform. I was looking at it as just the empty buffer > before the first iteration of the loop (or, in my case, since I was > testing with a 6 char filename, the only iteration). > > I will repeat my experiment with that and see if I can tease it out. BTW, if you are looking for a userspace implementation of the hash, it's available in libext2fs in e2fsprogs. Cheers, - Ted