Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122198 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75369 invoked from network); 19 Jan 2024 18:43:20 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jan 2024 18:43:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1705689840; bh=rnBt+OIb3Y/DG7+N7sLu/kffP8d8t3sgjqmE/u5Eizc=; h=From:Date:Subject:To:From; b=XXRXzLHo4jkOo4xBkr08It5hp2e+MfNF3C31yc8TEZUMtvBx5piGPWIcxxjKvTSdu 7BpZ/EUrBGQeYACLM0CDK/hqgT5OiMycSM/r8OAL2zXNHGiYreSk1J40SDt8577Ulk six6FxCygdYgeNZtw2iEyGTYTGUJpVz+vosSvEFogTzsQaZbO5bf8N0uM6FtdsYirU +C2wGmYRKfZR89qfdqSRGh1FyuWsfzyG69typ9Ral16XV+7OpA17A9oCQ1EgHnJ9ys hElaQRWYwJJY/80nZ6pSWYIgcb7KilNGU85kdFAaWrJzPWw3u+5Zyl209ATKB9ftfW Fz3qBawIU3KIg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 59C9418004A for ; Fri, 19 Jan 2024 10:44:00 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_05, DKIM_INVALID,DKIM_SIGNED,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from seahorse.cherry.relay.mailchannels.net (seahorse.cherry.relay.mailchannels.net [23.83.223.161]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 19 Jan 2024 10:43:59 -0800 (PST) X-Sender-Id: dreamhost|x-authsender|hans@loltek.net Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 23C9A901F75 for ; Fri, 19 Jan 2024 18:43:18 +0000 (UTC) Received: from pdx1-sub0-mail-a208.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 735BB902716 for ; Fri, 19 Jan 2024 18:43:17 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1705689797; a=rsa-sha256; cv=none; b=yzALEohlvRyIZbHzE4sqmJQw29OdmHkXNrl7JoFTMzysQ0kLmUXUeQLHcdq5nm+FCSMjs2 DKRyo1+xBdpgOotM2EGmdh9DdI0wNVSZWVwHlN28/0t8dIEzKVnCT759MWecViRfPPTndv 2h6ccXFtbKLF3X5tYa+0FvAl41saHRXqm/fowsn8xiXQhal9/lQLmXkIHHtrBRVXTUeyrV YoKvfwLHcelTPaCfv1gpQTlU+4AwEJBiaD0DRapZcC3+dsaq2q87yL1N66YqLLWRvQJxmF nDtTdTExOVFg4C6bVYGHbx8W6AiQO367RvBBkPD/iXJPpm4M+/73FFFwMEOunw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1705689797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: dkim-signature; bh=QSvqzRrhbwu0tLMIs6CmQTC0BmKuUfQ78efWsXNFFlo=; b=tPCmnsebtZFgwfUbYwX+bDxanIaVeHtfKx/USYwMadosctGD4VvNdphB5T3GeLLJ3qSxO+ DvS+8+FsUN/wOso4huzeJYdHcC3QXqixlC/ZwE3SqCJPVygX6yqXyeHlaZUJ6C+W60B2GP IixeT4CIfeeWOlVDp76eygayvDndpW5GVtIs5BXpU+z5I92Ijz3SsAGcmRJ6CkaLZ3Xa0b pHVq26waHg74uAF7zHQ4WeWgcNODXrMZSRv5L3mWxGO1bWEaTMgpZqzkh/MfrcVjB3jiFO AyNqNrqukgGVh+ppRZhbsZJJHvQ1+aVf/sZHYe7f1bLuiBZLCW+9EE+px4c2aw== ARC-Authentication-Results: i=1; rspamd-568947cb6c-bsmml; auth=pass smtp.auth=dreamhost smtp.mailfrom=hans@loltek.net X-Sender-Id: dreamhost|x-authsender|hans@loltek.net X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|hans@loltek.net X-MailChannels-Auth-Id: dreamhost X-Attack-Abaft: 3ac0dc731e2559e9_1705689797888_642189133 X-MC-Loop-Signature: 1705689797888:3835471928 X-MC-Ingress-Time: 1705689797888 Received: from pdx1-sub0-mail-a208.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.125.59.111 (trex/6.9.2); Fri, 19 Jan 2024 18:43:17 +0000 Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: hans@loltek.net) by pdx1-sub0-mail-a208.dreamhost.com (Postfix) with ESMTPSA id 4TGpQd0QypzJt for ; Fri, 19 Jan 2024 10:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=loltek.net; s=dreamhost; t=1705689785; bh=QSvqzRrhbwu0tLMIs6CmQTC0BmKuUfQ78efWsXNFFlo=; h=From:Date:Subject:To:Content-Type; b=VeFe4yvMLqscBdwDdgvLupk85tBInJt4kEiLqhwxE+DDBoaBwolAelRz6C4trSbZM aT3khGG8H+AnvAdCSPNEpDcsr+Rl7bBBZ7DowkUK1Molox5nm7pl1/zadsRJy+6Aoq T680C9pSDljx0XYQ/eL7mR0SODytRqr9DCr+TXFMHzNTm5Jo59E+75XbD4J8vgZECk UAzhnJq3w4Lhgi5F37Nk1YQhUqdLpAUHl+yDkDgTkhGw1QtHz2tsovfPnTZMLwlSuu nMF2c5gZfTJY3WSsEFUBRyDDlZWsXPlP8vjkoWnmsfsmCUYVWBSqTkzEbVN5DkMfNX 71ialxgxvkXMA== Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-dc25e12cc63so1307809276.0 for ; Fri, 19 Jan 2024 10:43:05 -0800 (PST) X-Gm-Message-State: AOJu0YytZj0RCffXFK5sdzTCrsz4AAef/STEVguPw6+uojyE82skho1y KA8lcOSwbDotpMgGklHS9q0fz4AnbKMQ/nrfb4dr8SyZX0UBx3Pj80byMeUUxLQE40kzEfJzwtP fNcs0Cd5MzJ4GB+wpPK5B6fLCGgI= X-Google-Smtp-Source: AGHT+IFQfgFisIXpcuTkiT1Gih8cT/Ubq/L4xjFtiAXngYVx8+J0M0gEjGDUzt/08+Bu0w0t6BY4mcIO0YB0t05Pp6E= X-Received: by 2002:a25:2e03:0:b0:db9:84c4:151a with SMTP id u3-20020a252e03000000b00db984c4151amr352594ybu.34.1705689784480; Fri, 19 Jan 2024 10:43:04 -0800 (PST) MIME-Version: 1.0 Date: Fri, 19 Jan 2024 19:42:54 +0100 X-Gmail-Original-Message-ID: Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000b37b08060f50d924" Subject: BLAKE3 hash From: hans@loltek.net (Hans Henrik Bergan) --000000000000b37b08060f50d924 Content-Type: text/plain; charset="UTF-8" Can we add the BLAKE3 hash? Created a PR here: https://github.com/php/php-src/pull/13194 BLAKE3 is a very fast ("blazing fast") cryptographically secure hash. It is the latest iteration of the BLAKE hash, which was a SHA3 finalist~ see https://github.com/BLAKE3-team/BLAKE3 for more info on BLAKE3. In the PR is a portable C implementation, along with optimized ARM-neon and x86_64 SSE2, SSE41, AVX2, and AVX512 implementations for GCC+unix and GCC+windows and MSVC (*MSVC is currently only using the portable implementation, but it should be easy for a developer equipped with MSVC to enable the optimized implementations. I don't have MSVC personally) That means the PR includes ~35 copies of the same algorithm, in hand-written assembly, optimized for various CPU/compiler/OS combinations. Which means the PR is hug*e.* It would be possible to only ship a subset of them (For example, keeping just the gcc+unix+SSE2 and gcc+unix+AVX2 and ARM-neon and trash the rest, would benefit a lot systems in-the-wild, and reduce the size of the PR substantially) It would also be possible to only ship the portable pure C implementation, but that would also be detrimental to the performance, which is the main motivator for adding BLAKE3 in the first place. But the groundwork to ship them all is already done (see the PR) Thoughts? --000000000000b37b08060f50d924--