From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jason A. Donenfeld" Subject: Re: [PATCH v3 1/3] siphash: add cryptographically secure hashtable function Date: Thu, 15 Dec 2016 00:34:30 +0100 Message-ID: References: <20161214035927.30004-1-Jason@zx2c4.com> <20161214184605.24006-1-Jason@zx2c4.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Tom Herbert , Netdev , "kernel-hardening@lists.openwall.com" , LKML , Linux Crypto Mailing List , Jean-Philippe Aumasson , "Daniel J . Bernstein" , Eric Biggers , David Laight To: Linus Torvalds Return-path: In-Reply-To: Sender: netdev-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org Hey Linus, On Thu, Dec 15, 2016 at 12:30 AM, Linus Torvalds wrote: > No. The bug is talking about "words" in the first place. > > Depending on your background, a "word" can be generally be either 16 > bits or 32 bits (or, in some cases, 18 bits). > > In theory, a 64-bit entity can be a "word" too, but pretty much nobody > uses that. Even architectures that started out with a 64-bit register > size and never had any smaller historical baggage (eg alpha) tend to > call 32-bit entities "words". > > So 16 bits can be a word, but some people/architectures will call it a > "half-word". > > To make matters even more confusing, a "quadword" is generally always > 64 bits, regardless of the size of "word". > > So please try to avoid the use of "word" entirely. It's too ambiguous, > and it's not even helpful as a "size of the native register". It's > almost purely random. > > For the kernel, we tend use > > - uX for types that have specific sizes (X being the number of bits) > > - "[unsigned] long" for native register size > > But never "word". The voice of reason. Have a desired name for this function family? siphash_3u64s siphash_3u64 siphash_three_u64 siphash_3sixityfourbitintegers Or does your reasonable dislike of "word" still allow for the use of dword and qword, so that the current function names of: siphash_3qwords siphash_6dwords are okay? Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933883AbcLNXeh (ORCPT ); Wed, 14 Dec 2016 18:34:37 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:54071 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933121AbcLNXef (ORCPT ); Wed, 14 Dec 2016 18:34:35 -0500 MIME-Version: 1.0 In-Reply-To: References: <20161214035927.30004-1-Jason@zx2c4.com> <20161214184605.24006-1-Jason@zx2c4.com> From: "Jason A. Donenfeld" Date: Thu, 15 Dec 2016 00:34:30 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 1/3] siphash: add cryptographically secure hashtable function To: Linus Torvalds Cc: Tom Herbert , Netdev , "kernel-hardening@lists.openwall.com" , LKML , Linux Crypto Mailing List , Jean-Philippe Aumasson , "Daniel J . Bernstein" , Eric Biggers , David Laight Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Linus, On Thu, Dec 15, 2016 at 12:30 AM, Linus Torvalds wrote: > No. The bug is talking about "words" in the first place. > > Depending on your background, a "word" can be generally be either 16 > bits or 32 bits (or, in some cases, 18 bits). > > In theory, a 64-bit entity can be a "word" too, but pretty much nobody > uses that. Even architectures that started out with a 64-bit register > size and never had any smaller historical baggage (eg alpha) tend to > call 32-bit entities "words". > > So 16 bits can be a word, but some people/architectures will call it a > "half-word". > > To make matters even more confusing, a "quadword" is generally always > 64 bits, regardless of the size of "word". > > So please try to avoid the use of "word" entirely. It's too ambiguous, > and it's not even helpful as a "size of the native register". It's > almost purely random. > > For the kernel, we tend use > > - uX for types that have specific sizes (X being the number of bits) > > - "[unsigned] long" for native register size > > But never "word". The voice of reason. Have a desired name for this function family? siphash_3u64s siphash_3u64 siphash_three_u64 siphash_3sixityfourbitintegers Or does your reasonable dislike of "word" still allow for the use of dword and qword, so that the current function names of: siphash_3qwords siphash_6dwords are okay? Jason From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com MIME-Version: 1.0 In-Reply-To: References: <20161214035927.30004-1-Jason@zx2c4.com> <20161214184605.24006-1-Jason@zx2c4.com> From: "Jason A. Donenfeld" Date: Thu, 15 Dec 2016 00:34:30 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: [kernel-hardening] Re: [PATCH v3 1/3] siphash: add cryptographically secure hashtable function To: Linus Torvalds Cc: Tom Herbert , Netdev , "kernel-hardening@lists.openwall.com" , LKML , Linux Crypto Mailing List , Jean-Philippe Aumasson , "Daniel J . Bernstein" , Eric Biggers , David Laight List-ID: Hey Linus, On Thu, Dec 15, 2016 at 12:30 AM, Linus Torvalds wrote: > No. The bug is talking about "words" in the first place. > > Depending on your background, a "word" can be generally be either 16 > bits or 32 bits (or, in some cases, 18 bits). > > In theory, a 64-bit entity can be a "word" too, but pretty much nobody > uses that. Even architectures that started out with a 64-bit register > size and never had any smaller historical baggage (eg alpha) tend to > call 32-bit entities "words". > > So 16 bits can be a word, but some people/architectures will call it a > "half-word". > > To make matters even more confusing, a "quadword" is generally always > 64 bits, regardless of the size of "word". > > So please try to avoid the use of "word" entirely. It's too ambiguous, > and it's not even helpful as a "size of the native register". It's > almost purely random. > > For the kernel, we tend use > > - uX for types that have specific sizes (X being the number of bits) > > - "[unsigned] long" for native register size > > But never "word". The voice of reason. Have a desired name for this function family? siphash_3u64s siphash_3u64 siphash_three_u64 siphash_3sixityfourbitintegers Or does your reasonable dislike of "word" still allow for the use of dword and qword, so that the current function names of: siphash_3qwords siphash_6dwords are okay? Jason