Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp709385pxb; Fri, 14 Jan 2022 14:39:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJziXDnuArkysLu5DuIDEJh0D22Z6A+sf3/6XqDv0C44TalWu1D9ci6X2l44+FijQxfHt1ou X-Received: by 2002:a17:902:c10c:b0:14a:8def:dc2f with SMTP id 12-20020a170902c10c00b0014a8defdc2fmr5595813pli.98.1642199941899; Fri, 14 Jan 2022 14:39:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642199941; cv=none; d=google.com; s=arc-20160816; b=vNrb06u4LiNyf8MG1zWrpI11HmBXvK0pUeiWU7kFgHLuS/cm53ziHqQX0HMTp92GfS jI9D2az9NzkTvcZuhYkV0AzFVTqOX4qVAUkmYT/Ag6NtD/vw91/CFI/i13QLRkeT5rKD 7tOMZ0tDr516F6/iTu0U/qSHtiycgyWEwfZYX5b4e4iZotLuvMyRvtF1KaxuKriJWnDV 0mn0mZ1sc4M03aNsNRRJH7BzlDbLVwRseG8PA0sWt32RVuKOkXTMYEe0Qupzf191dAO4 kq4szCohZP9Tg/gPwDIm+pAxqRnFBb1Ns7qQF300Zmibqt00tvpfOlKYa9Z+VUSkDOl1 LdFw== 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=tFgML1uQ/Qzn1vSR4mCIz6pcZeXqvGjS03+Xmhw6EOs=; b=RK+KN8guO0p3NtRCpa4zLkY73a4Aj1WRkkby3uJpmhvoDaCXSaZOBIumwe+NZv62bl 2rvKLYjqAKAXb5y2qy0BlTZkZCEU9E64JilJXEA44mWuc26w2syT8XNIWVUi7So4A5SP lKBSTpfvnsj7bFRztpxYz6IDku9SpeS4UcrqxQhpjupkoQE5vhraHBkzclamsiaHTYFD lKi9LQvP8SLEnU92fbo5slUOavjub1apI5HPiOFqXn/zyYKj6T8nu3AW4G2feGpohpFO v2zKcLU0EjqQpgfWHFi34dtAJXK38piGrsgqI0lKDrTxZ9HLRUrZE4tTvo4/aEwNT++E bUwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=20210105 header.b=GzdGWz16; 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 lp2si8335698pjb.124.2022.01.14.14.38.36; Fri, 14 Jan 2022 14:39:01 -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=GzdGWz16; 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 S236588AbiANPUw (ORCPT + 99 others); Fri, 14 Jan 2022 10:20:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236022AbiANPUv (ORCPT ); Fri, 14 Jan 2022 10:20:51 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77EA3C061574; Fri, 14 Jan 2022 07:20:51 -0800 (PST) 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 427F8B8243B; Fri, 14 Jan 2022 15:20:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A38DC36AEF; Fri, 14 Jan 2022 15:20:48 +0000 (UTC) Authentication-Results: smtp.kernel.org; dkim=pass (1024-bit key) header.d=zx2c4.com header.i=@zx2c4.com header.b="GzdGWz16" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zx2c4.com; s=20210105; t=1642173645; 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=tFgML1uQ/Qzn1vSR4mCIz6pcZeXqvGjS03+Xmhw6EOs=; b=GzdGWz16StVcPMrECW8MBygQFgy1yssgeUTpyKjGAG3jJcWLL+8CH8zut/dZjjjRHethuB CdCH1hOeuFHtxMNp3+KiF3nGQVG3+BvccvTiBidU6LxtxIsb6ADZC5K5I0S2BUngT6sENM 7wRS4fqM0svIA1vBKgq9ArSWcIPAEAA= Received: by mail.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id d0b260f1 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Fri, 14 Jan 2022 15:20:45 +0000 (UTC) Received: by mail-yb1-f174.google.com with SMTP id h14so24711622ybe.12; Fri, 14 Jan 2022 07:20:44 -0800 (PST) X-Gm-Message-State: AOAM533lKuhPZ+34OG5LbfM6rACd+ZHkZcdzWhF8zNsGCAu+bFwjayp8 6IrMfZ6AePzq9gq/IaoDkw+J0VbFGSV9bwgW6QY= X-Received: by 2002:a25:aae2:: with SMTP id t89mr13574829ybi.638.1642173643690; Fri, 14 Jan 2022 07:20:43 -0800 (PST) MIME-Version: 1.0 References: <20220112131204.800307-1-Jason@zx2c4.com> <20220112131204.800307-2-Jason@zx2c4.com> <87tue8ftrm.fsf@toke.dk> In-Reply-To: From: "Jason A. Donenfeld" Date: Fri, 14 Jan 2022 16:20:33 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC v1 1/3] bpf: move from sha1 to blake2s in tag calculation To: Ard Biesheuvel Cc: Alexei Starovoitov , =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , Network Development , LKML , Geert Uytterhoeven , Herbert Xu , Jean-Philippe Aumasson , Linux Crypto Mailing List , bpf Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Jan 14, 2022 at 4:08 PM Ard Biesheuvel wrote: > Yeah, so the issue is that, at *some* point, SHA-1 is going to have to > go. So it would be helpful if Alexei could clarify *why* he doesn't > see this as a problem. The fact that it is broken means that it is no > longer intractable to forge collisions, which likley means that SHA-1 > no longer fulfills the task that you wanted it to do in the first > place. I think the reason that Alexei doesn't think that the SHA-1 choice really matters is because the result is being truncated to 64-bits, so collisions are easy anyway, regardless of which hash function is chosen (birthday bound and all). But from Geert's perspective, that SHA-1 is still taking up precious bytes in m68k builds. And from my perspective, it's poor form and clutters vmlinux, and plus, now I'm curious about why this isn't using a more appropriately sized tag in the first place. On Fri, Jan 14, 2022 at 3:12 PM Jason A. Donenfeld wrote: > "checksum" -- the thing is only 64-bits, and as you told Andy Polyakov Whoops, meant Lutomirski here. x86 Andy, not crypto Andy :)