Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp431861pxb; Thu, 13 Jan 2022 09:18:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzZ6+7emXcqFtZqLc7h+jizzTVmVforPE6TQk6YwNQm9VQB071pT7rdwCdvRNRkdbjXCdVZ X-Received: by 2002:a17:902:6bc9:b0:149:b7bf:9b33 with SMTP id m9-20020a1709026bc900b00149b7bf9b33mr5551699plt.18.1642094289940; Thu, 13 Jan 2022 09:18:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642094289; cv=none; d=google.com; s=arc-20160816; b=DYnHGot2o+l+MGgh3cu5/arzPjpzyaCLyvgC5uCGxsdVtfHaG9pPy0e3VIimBnVvtF O7LePMPuBK65SPhbeL8Taexp4nxRLeeLKGBzsow4lh1lRVw9WS7pFWMSPZJ5fuZAUkks jzkjiYGYnbi5WSAhOyp8yy9vJ0+dBsK0LaREHmQ+eDTCJnSj2kXdYVwezHzBU1E2nb4C ZpNLstrfiBIUi0VfLUOwoybGedr5koDMIwGO70k1s3QTaK+tKkxwO1I4KVBhIdo66wsM ZtWdaWYyZc3wgqTpNVo8LqmWJLpST0f61SOMZL2n9g/XK29Qsoa0zR1O8HJjOTKI4bQl A5vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=V0JeEnmtJgLb+y+51mSgUr3EG3+TtCyN0Me8Wbf10SI=; b=cCW3O76l/8guEfzwqwVx91qw7N/Q6pW1hX21gcSd6bouWRxDPHl2Zn1NOb/7TdS/I3 scGqSSauvCgILzkFIKD6ixT0tAscsBoFAbSFHd3kK1XGgsPu+7uLhPdxaj2/ABq12sWZ bf9VwhP+HX9VjkpYGNyAwfa0bcrhgGfVFYVayG3XM16vSHCvjL8QwfpQcZJqn70aq5ER UjgiAisc0hF/Rc1D8kWyc3gW2HfV2Sq8/6kGG1S8KSFamacJY06Nnpd0TEGPe6kDZ2RF xniBHY/7PGf4ZyjMOQ3R/dXyy7XO8FCbVRnAgbL4sMW4geFbf5+F4nxczZdhpZVCaTAv Gdkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=EU4uyXl4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si3023291pjy.123.2022.01.13.09.17.57; Thu, 13 Jan 2022 09:18:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=EU4uyXl4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231365AbiAMMWY (ORCPT + 99 others); Thu, 13 Jan 2022 07:22:24 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:53886 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232789AbiAMMWY (ORCPT ); Thu, 13 Jan 2022 07:22:24 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BD5C5B81E01; Thu, 13 Jan 2022 12:22:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1426BC36AEC; Thu, 13 Jan 2022 12:22:21 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="EU4uyXl4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1642076537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=V0JeEnmtJgLb+y+51mSgUr3EG3+TtCyN0Me8Wbf10SI=; b=EU4uyXl436+kI+UsnnGnCRK9emZW6OBHqUuJJbvBFRLdhwjKw1Hjua83yG6/1Y/LwnkJSW c/ho+xCRKj3JkpapWxBtXFmXL2e0Ivybi7suTwgbVqoX1VMhKKYZA8QGVuoCJIz6YrJKUC SIIGAdpfx5QKTs7xvkOWJnGL9Z+1ucI= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id d6fa39be (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Thu, 13 Jan 2022 12:22:16 +0000 (UTC) Received: by mail-yb1-f177.google.com with SMTP id c10so14443771ybb.2; Thu, 13 Jan 2022 04:22:16 -0800 (PST) X-Gm-Message-State: AOAM532kTnQBELrUDYhAiBSM8iQ2xxK++BqbEto9GfVU1lF0v7pYlkzQ swdzLJxaOP2CAiwXvbykz/QmXK+jpWle8WSYL+g= X-Received: by 2002:a25:4109:: with SMTP id o9mr2956311yba.115.1642076534819; Thu, 13 Jan 2022 04:22:14 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a05:7110:209:b0:11c:1b85:d007 with HTTP; Thu, 13 Jan 2022 04:22:14 -0800 (PST) In-Reply-To: References: <20220112131204.800307-1-Jason@zx2c4.com> <20220112131204.800307-3-Jason@zx2c4.com> <87r19cftbr.fsf@toke.dk> <55d185a8-31ea-51d0-d9be-debd490cd204@stressinduktion.org> From: "Jason A. Donenfeld" Date: Thu, 13 Jan 2022 13:22:14 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC v1 2/3] ipv6: move from sha1 to blake2s in address calculation To: Ard Biesheuvel Cc: Hannes Frederic Sowa , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , "open list:BPF JIT for MIPS (32-BIT AND 64-BIT)" , Linux Kernel Mailing List , Geert Uytterhoeven , Herbert Xu , Jean-Philippe Aumasson , Linux Crypto Mailing List , Erik Kline , Fernando Gont , Lorenzo Colitti , hideaki.yoshifuji@miraclelinux.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On 1/13/22, Ard Biesheuvel wrote: > > The question is not whether but when we can/will change this. > > SHA-1 is broken and should be removed at *some* point, so unless the > feature itself is going to be obsolete, its implementation will need > to switch to a PRF that fulfils the requirements in RFC7217 once SHA-1 > ceases to do so. > > And I should also point out that the current implementation does not > even use SHA-1 correctly, as it omits the finalization step. This may > or may not matter in practice, but it deviates from crypto best > practices, as well as from RFC7217 > > I already pointed out to Jason (in private) that the PRF does not need > to be based on a cryptographic hash, so as far as I can tell, siphash > would be a suitable candidate here as well, and I already switched the > TCP fastopen code to that in the past. But SHA-1 definitely has to go. > Correction: this should be a cryptographically secure. That's part of the point of moving away from SHA-1 of course. But fortunately, siphash *is* considered to be cryptographically secure. Whether you want blake2s's keyed mode or siphash doesn't really matter to me. I thought the former's API mapped a bit neater here.