BLAKE3 reference implementation and checksum tool

DoneSubmitted by Leo Famulari.
Details
2 participants
  • Efraim Flashner
  • Leo Famulari
Owner
unassigned
Severity
normal
L
L
Leo Famulari wrote on 19 Oct 18:13 +0200
(address . guix-patches@gnu.org)
YW7ul4+U6++8nd/S@jasmine.lan
These patches add the BLAKE3 reference implementation and a BLAKE3checksum tool, b3sum.
It's *very* fast, much faster than SHA256 and even BLAKE2.
L
L
Leo Famulari wrote on 19 Oct 18:15 +0200
[PATCH 1/4] gnu: rust-duct-0.13: Update to 0.13.5.
(address . 51289@debbugs.gnu.org)
a377d6088b5796d97af81582798e2d367189b208.1634660132.git.leo@famulari.name
* gnu/packages/crates-io.scm (rust-duct-0.13): Update to 0.13.5.[arguments]<cargo-inputs>: Use rust-os-pipe-0.9 instead of rust-os-pipe-0.8.<cargo-development-inputs>: Remove key.--- gnu/packages/crates-io.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
Toggle diff (36 lines)diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scmindex 089b9f456c..4add0eef43 100644--- a/gnu/packages/crates-io.scm+++ b/gnu/packages/crates-io.scm@@ -14774,7 +14774,7 @@ (define-public rust-dtparse-1 (define-public rust-duct-0.13 (package (name "rust-duct")- (version "0.13.0")+ (version "0.13.5") (source (origin (method url-fetch)@@ -14783,17 +14783,15 @@ (define-public rust-duct-0.13 (string-append name "-" version ".tar.gz")) (sha256 (base32- "1ir3884i1yznkfdccqqbcb9v5sdpcgxlv41hgzncrqaljv18r0wj"))))+ "13bxiy0y1dck3xz28rqw5ylf2ykv6mk8ww6g8408x26hksjs1ihg")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-libc" ,rust-libc-0.2) ("rust-once-cell" ,rust-once-cell-1)- ("rust-os-pipe" ,rust-os-pipe-0.8)- ("rust-shared-child" ,rust-shared-child-0.3))- #:cargo-development-inputs- (("rust-tempdir" ,rust-tempdir-0.3))))+ ("rust-os-pipe" ,rust-os-pipe-0.9)+ ("rust-shared-child" ,rust-shared-child-0.3)))) (home-page "https://github.com/oconnor663/duct.rs") (synopsis-- 2.33.1
L
L
Leo Famulari wrote on 19 Oct 18:15 +0200
[PATCH 2/4] gnu: rust-os-pipe: Update to 0.9.2.
(address . 51289@debbugs.gnu.org)
12f6b29802b75c3c9a81d24b6b8320e7f696bd8e.1634660132.git.leo@famulari.name
* gnu/packages/crates-io.scm (rust-os-pipe-0.8): Replace with ...(rust-os-pipe-0.9): ... new variable.(arguments)<#:cargo-inputs>: Replace rust-nix-0.15 with rust-libc-0.2.--- gnu/packages/crates-io.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Toggle diff (34 lines)diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scmindex 4add0eef43..447dedde2d 100644--- a/gnu/packages/crates-io.scm+++ b/gnu/packages/crates-io.scm@@ -31962,10 +31962,10 @@ (define-public rust-os-info-3 "This library detects the operating system type and version.") (license license:expat))) -(define-public rust-os-pipe-0.8+(define-public rust-os-pipe-0.9 (package (name "rust-os-pipe")- (version "0.8.2")+ (version "0.9.2") (source (origin (method url-fetch)@@ -31974,12 +31974,12 @@ (define-public rust-os-pipe-0.8 (string-append name "-" version ".tar.gz")) (sha256 (base32- "049ax8shxik7mm68r2nf7xnrcq3z3p7hz54sbrcxwywxqsjdzs41"))))+ "04yjs1hf88jjm17g8a2lr7ibxyyg460rzbgcw9f1yzihq833y8zv")))) (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs- (("rust-nix" ,rust-nix-0.15)+ (("rust-libc" ,rust-libc-0.2) ("rust-winapi" ,rust-winapi-0.3)))) (home-page "https://github.com/oconnor663/os_pipe.rs")-- 2.33.1
L
L
Leo Famulari wrote on 19 Oct 18:15 +0200
[PATCH 4/4] gnu: Add BLAKE3 command line tool.
(address . 51289@debbugs.gnu.org)
3449bed51c76535445511b8dc554b640527f0564.1634660132.git.leo@famulari.name
* gnu/packages/crypto.scm (b3sum): New variable.--- gnu/packages/crypto.scm | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+)
Toggle diff (59 lines)diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scmindex 3b5957ef23..1b4906dc31 100644--- a/gnu/packages/crypto.scm+++ b/gnu/packages/crypto.scm@@ -1534,3 +1534,52 @@ (define-public rust-blake3-0.3 ;; Users may choose between these two licenses when redistributing the ;; program provided by this package. (license (list license:cc0 license:asl2.0))))++(define-public b3sum+ (package+ (name "b3sum")+ ;; Version 1 requires Rust >= 1.51.+ ;; <https://github.com/BLAKE3-team/BLAKE3/releases/tag/1.0.0>+ (version "0.3.8")+ (source+ (origin+ (method url-fetch)+ (uri (crate-uri "b3sum" version))+ (file-name (string-append name "-" version ".tar.gz"))+ (sha256+ (base32 "0h3fz16q5lk6mg7r8kjkjrq5hd4injngn5m7pswjbf2pyzjmg4b4"))))+ (build-system cargo-build-system)+ (arguments+ `(;; Install the source so that Cargo.toml is installed, because that is+ ;; the only reference to the license information.+ #:install-source? #t+ #:phases+ (modify-phases %standard-phases+ (add-before 'check 'patch-tests+ (lambda _+ (substitute* "tests/cli_tests.rs"+ (("/bin/sh") (which "sh")))))+ (add-after 'install 'install-doc+ (lambda* (#:key outputs #:allow-other-keys)+ (let* ((out (assoc-ref outputs "out"))+ (doc (string-append out "/share/doc/" ,name "-"+ ,(package-version this-package))))+ (install-file "README.md" doc)))))+ #:cargo-inputs+ (("rust-anyhow" ,rust-anyhow-1)+ ("rust-blake3" ,rust-blake3-0.3)+ ("rust-clap" ,rust-clap-2)+ ("rust-hex" ,rust-hex-0.4)+ ("rust-memmap" ,rust-memmap-0.7)+ ("rust-rayon" ,rust-rayon-1)+ ("rust-wild" ,rust-wild-2))+ #:cargo-development-inputs+ (("rust-duct" ,rust-duct-0.13)+ ("rust-tempfile" ,rust-tempfile-3))))+ (home-page "https://github.com/BLAKE3-team/BLAKE3")+ (synopsis "Command line BLAKE3 checksum tool")+ (description "This package provides @code{b3sum}, a command line+checksum tool based on the BLAKE3 cryptographic hash function.")+ ;; Users may choose between these two licenses when redistributing the+ ;; program provided by this package.+ (license (list license:cc0 license:asl2.0))))-- 2.33.1
L
L
Leo Famulari wrote on 19 Oct 18:15 +0200
[PATCH 3/4] gnu: Add BLAKE3 Rust implementation.
(address . 51289@debbugs.gnu.org)
e5a205bdc8a68776042823534aa77ff79443026d.1634660132.git.leo@famulari.name
* gnu/packages/crypto.scm (rust-blake3-0.3): New variable.--- gnu/packages/crypto.scm | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-)
Toggle diff (53 lines)diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scmindex 823b888b82..3b5957ef23 100644--- a/gnu/packages/crypto.scm+++ b/gnu/packages/crypto.scm@@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson <davet@gnu.org> ;;; Copyright © 2015, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>-;;; Copyright © 2016, 2017, 2018, 2019 Leo Famulari <leo@famulari.name>+;;; Copyright © 2016, 2017, 2018, 2019, 2021 Leo Famulari <leo@famulari.name> ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox> ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>@@ -1500,3 +1500,37 @@ (define-public cryfs additional security and privacy measures such as hiding file sizes and directory structure. However CryFS is not considered stable yet by the developers.") (license license:lgpl3+)))++(define-public rust-blake3-0.3+ (package+ (name "rust-blake3")+ ;; Version 1 requires Rust >= 1.51.+ ;; <https://github.com/BLAKE3-team/BLAKE3/releases/tag/1.0.0>+ (version "0.3.8")+ (source+ (origin+ (method url-fetch)+ (uri (crate-uri "blake3" version))+ (file-name (string-append name "-" version ".tar.gz"))+ (sha256+ (base32 "1cr5l5szgxm632px41kavl6cgils8h6yhdfkm6jsc5jgiivqai5n"))))+ (build-system cargo-build-system)+ (arguments+ `(#:skip-build? #t+ #:cargo-inputs+ (("rust-arrayref" ,rust-arrayref-0.3)+ ("rust-arrayvec" ,rust-arrayvec-0.5)+ ("rust-cc" ,rust-cc-1)+ ("rust-cfg-if" ,rust-cfg-if-0.1)+ ("rust-constant-time-eq" ,rust-constant-time-eq-0.1)+ ("rust-crypto-mac" ,rust-crypto-mac-0.8)+ ("rust-digest" ,rust-digest-0.9)+ ("rust-rayon" ,rust-rayon-1))))+ (home-page "https://github.com/BLAKE3-team/BLAKE3")+ (synopsis "BLAKE3 hash function Rust implementation")+ (description "This crate provides the official Rust implementation of the+BLAKE3 cryptographic hash function. BLAKE3 is faster than MD5, SHA-1, SHA-2,+SHA-3, and BLAKE2.")+ ;; Users may choose between these two licenses when redistributing the+ ;; program provided by this package.+ (license (list license:cc0 license:asl2.0))))-- 2.33.1
E
E
Efraim Flashner wrote on 31 Oct 14:36 +0100
Re: [bug#51289] BLAKE3 reference implementation and checksum tool
(name . Leo Famulari)(address . leo@famulari.name)(address . 51289@debbugs.gnu.org)
YX6bzaI112d240oN@3900XT
On Tue, Oct 19, 2021 at 12:13:11PM -0400, Leo Famulari wrote:
Toggle quote (5 lines)> These patches add the BLAKE3 reference implementation and a BLAKE3> checksum tool, b3sum.> > It's *very* fast, much faster than SHA256 and even BLAKE2.
I'd rather not remove the development-inputs for rust-duct but otherthan that it looks fine to me. Didn't try building or running it though.
-- Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפאGPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmF+m80ACgkQQarn3Mo9g1EpPw//RJF05n2G4iuX4ogfHGL0T00fuBkAWPBbA2pwHrjaQcPRO9jisLULH1aoUzixKCFxIOeXO5jBL7+IWzyINOGXV2uZrI0lYVs35IaHBtaUue5idvwQFXyhSPhoH4Zq2x/VN2Qc6fobDyJ0KQ4zxEQGAZT1si0vGUlaQHIDes2S8Kja4wfGKDvybsULVdGRUM4+Txeic5+NRehjTIO8jaUVFcOMoVaQk4N1OCyUpgevBa1lSVMJ0jjiEpzI2wb6/y7ViBRdKmP+8XMiESkukVTHvZCaH8mUSXb+AquuKLVrGjPWXvqfnJkWHSvpUAiAszWKoHlxjrF4HlWuJGJk4TYyP099TWbbHwyFLPBa13Sf/nj7HjiVQwQa5L2IAvaCFa5xFJ9UpE1zc4+LnuYQES2DjeE8AzPOvAkU65277HQN9a0SJgTgmE67MfYCM1YX4TZTH3pRgLhdmEfOyK+MKdJ1l8KRMfkmRs4PXvp3x+yoMCsRUuwiqksPUSyIlDfuZhoqp6PryugPEmWcYOXBYMGorJhBJnBhRBVvaxUyT5ikwEGNKrNYe/Ou0pdQjPntAbbhi6swre5aYCudDcO0EbV00o/3CyEo83VudO3bir5kU/lCXhdHb9VDD9n+6X0mrLk3qFHBgvfOtuGOONSXiZCq/HEBYasznHULjJLISlPj5Vc==7Mys-----END PGP SIGNATURE-----

L
L
Leo Famulari wrote on 4 Nov 16:53 +0100
YYQCEAJ5GEbzGfp8@jasmine.lan
On Sun, Oct 31, 2021 at 03:36:13PM +0200, Efraim Flashner wrote:
Toggle quote (3 lines)> I'd rather not remove the development-inputs for rust-duct but other> than that it looks fine to me. Didn't try building or running it though.
Thanks, I'll remove that part of the rust-duct commit.
I also realized that the commits changing rust-duct and rust-os-pipeneed to be in the opposite order: We have to create rust-os-pipe-0.9before using it in the updated rust-duct-0.13.
I'll test again and push soon.
L
L
Leo Famulari wrote on 10 Nov 17:37 +0100
YYv1Z+5+Id6iULhm@jasmine.lan
On Thu, Nov 04, 2021 at 11:53:52AM -0400, Leo Famulari wrote:
Toggle quote (2 lines)> I'll test again and push soon.
Pushed as 650dcc18e7f840a789a6aa06533b4a4ffc06af59
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 51289@debbugs.gnu.org