Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp536961pxb; Thu, 13 Jan 2022 11:23:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJw4oaJRs/vHO3Ryjy8CB0eX/eCm2wuuaixMIN5eLv619DRGYSHuh75XMReDn/ZWFY018OuQ X-Received: by 2002:a17:90b:2249:: with SMTP id hk9mr15778937pjb.246.1642101797977; Thu, 13 Jan 2022 11:23:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642101797; cv=none; d=google.com; s=arc-20160816; b=BQHbucsMVIB4+yLkXSrIp2qcQ1UH4ncFJzBrX9oy/96nDVJmJWmIbK53SmKvNt/PAj 6PEIkLUcjGz9eDPCocYpB5kDM+PcTZY47afJ1m7apW+flcOq+W5YzEkz2Hu2bTPuSg3x WJ7W3FKZPOPwtcoE3XCBcx16bIQGpoIuBqI2XEFa2UZsKQu2inGZWbQm9qKiqWLFUJSa 08QJnLsz1s8AiURcVZZh+mD1/JlLvt7XiWMC6rMBUD3doLCIIqP3Ie27VoCNBEkhrVl2 2yU+qS4iOWYIMbCS41CCk6hZgByNQJHFu6yQ1L0lESWcnSZfwQ9UTuB2HtG7FtIagVAs MVhA== 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:in-reply-to :references:mime-version:dkim-signature; bh=X5jETQgkQZS/2fpSntJpBBFhReQIN06u1o0hN2hor78=; b=oS8YEo4MDdspJsHiWE9UKVqBQgLtU0XEf7gEF5JzZzt9sG4TzWM4Dnqde9HUpRnRos crodFr6ILsxKZ1WP2iI2r0Gq3wpvcZHggpBwaj1W48CSo70jltswmDQYCDIQV8QV7CLI rLqi8b1wigPkiNN+9VZPJazhiBdziLWNKWjz2/WOn+4c3PARPpAm9/D/y+cDbSV+S7pk myijaYszLWxRD0UK2oeOjGGjA9VAUOmu89slKuidgwmYhKGAa3afvtSW1Tp2jBZDCBUp Ys8e14CSNuy8wVtTQyU0l3kJsV6Xuz/QfiPTxb8TfRDSYs+gJNTZDAewvEHZFVivvyZH tAfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cm0l6TUG; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a62si3696937pge.81.2022.01.13.11.23.05; Thu, 13 Jan 2022 11:23:17 -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=@kernel.org header.s=k20201202 header.b=cm0l6TUG; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232000AbiAMM3z (ORCPT + 99 others); Thu, 13 Jan 2022 07:29:55 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:57400 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbiAMM3z (ORCPT ); Thu, 13 Jan 2022 07:29:55 -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 DE2BCB8226C; Thu, 13 Jan 2022 12:29:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEFB1C36AEF; Thu, 13 Jan 2022 12:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642076992; bh=X5jETQgkQZS/2fpSntJpBBFhReQIN06u1o0hN2hor78=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=cm0l6TUG4CMMmVUp+jXxaKjNQyOVhj//O8GkLtbxT1csqRchAoKfMSsjZj228V4TM chNGd7GNKBS0UVgZX/FWjNvTNZ/QA/JD3E4n9H9x3cHB5bGkWKQUzh+HSb++jm1827 RIK6RZYwgJopXuPX7MZ4S7YH8Dk9I148EVxeKLeKEcaF8YTleX+nFSqiN+Ja/iZ4sK yA9OXCWOPfNswtKqUFLQPlRVmBS7TNJ8lLqIX6c9NNJIHFPfWz3AA6iIC7pyjLvn4m GDaFm6XZTBTkNn6yE8ER+1kaOGUtTzIwDoC8OTwpnqcO4r+i/XTRPGEMFH04mqsdmi QjsnxVMtkuKAA== Received: by mail-wr1-f53.google.com with SMTP id l25so9735844wrb.13; Thu, 13 Jan 2022 04:29:52 -0800 (PST) X-Gm-Message-State: AOAM533Sq8el3gUZcNzIxJF9a9uO5FiDMuOTQQghhtZ02gMmVXc4hfuW tj4m0oL2E1y3u7LzVPPPHPL2WrxUsBPEni4hk1Y= X-Received: by 2002:adf:f287:: with SMTP id k7mr3883893wro.417.1642076991005; Thu, 13 Jan 2022 04:29:51 -0800 (PST) MIME-Version: 1.0 References: <20220112131204.800307-1-Jason@zx2c4.com> <20220112131204.800307-3-Jason@zx2c4.com> <87r19cftbr.fsf@toke.dk> <55d185a8-31ea-51d0-d9be-debd490cd204@stressinduktion.org> In-Reply-To: From: Ard Biesheuvel Date: Thu, 13 Jan 2022 13:29:39 +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: "Jason A. Donenfeld" 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 Thu, 13 Jan 2022 at 13:22, Jason A. Donenfeld wrote: > > 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. Of course. I said it does not need to be based on a cryptographic *hash*. > 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. Fair enough. This is not on a hot path anyway, so it doesn't really matter performance wise.