Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934085AbcLMT0K (ORCPT ); Tue, 13 Dec 2016 14:26:10 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:32952 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753521AbcLMTZr (ORCPT ); Tue, 13 Dec 2016 14:25:47 -0500 MIME-Version: 1.0 In-Reply-To: References: From: Linus Torvalds Date: Tue, 13 Dec 2016 11:25:45 -0800 X-Google-Sender-Auth: tWHBuVSHZAQsO3AC-hoAFgBZSPI Message-ID: Subject: Re: [PATCH v3] siphash: add cryptographically secure hashtable function To: "Jason A. Donenfeld" Cc: Andi Kleen , "kernel-hardening@lists.openwall.com" , LKML , Linux Crypto Mailing List , George Spelvin , Scott Bauer , Andy Lutomirski , Greg KH , Eric Biggers , Jean-Philippe Aumasson , "Daniel J . Bernstein" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 839 Lines: 20 On Mon, Dec 12, 2016 at 3:04 PM, Jason A. Donenfeld wrote: > > Indeed this would be a great first candidate. There are lots of places > where MD5 (!!) is pulled in for this sort of thing, when SipHash could > be a faster and leaner replacement (and arguably more secure than > rusty MD5). Yeah,. the TCP sequence number md5_transform() cases are likely the best example of something where siphash might be good. That tends to be really just a couple words of data (the address and port info) plus the net_secret[] hash. I think they currently simply just fill in the fixed-sized 64-byte md5-round area. I wonder it's worth it to have a special spihash version that does that same "fixed 64-byte area" thing. But please talk to the netwotrking people. Maybe that's the proper way to get this merged? Linus