How can I generate SHA3 if there is no sha3sum command in coreutils?
I have sha1sum
or sha512sum
on an average Linux distro.
But where is the sha3sum
command that can generateSHA-3 commands?
linux hashsum bsd checksum
add a comment |
I have sha1sum
or sha512sum
on an average Linux distro.
But where is the sha3sum
command that can generateSHA-3 commands?
linux hashsum bsd checksum
On a Debian-based Linux, it's apparently part of thelibdigest-sha3-perl
package (not tested).
– Kusalananda
Feb 24 '17 at 10:54
if rhash is available in recent enough version then e.g.rhash --sha3-256
– frostschutz
Feb 24 '17 at 11:02
Doing it with SSL unix.stackexchange.com/a/493065/3285
– Evan Carroll
31 mins ago
add a comment |
I have sha1sum
or sha512sum
on an average Linux distro.
But where is the sha3sum
command that can generateSHA-3 commands?
linux hashsum bsd checksum
I have sha1sum
or sha512sum
on an average Linux distro.
But where is the sha3sum
command that can generateSHA-3 commands?
linux hashsum bsd checksum
linux hashsum bsd checksum
edited 33 mins ago
Evan Carroll
5,19594279
5,19594279
asked Feb 24 '17 at 10:51
pepitepepite
308421
308421
On a Debian-based Linux, it's apparently part of thelibdigest-sha3-perl
package (not tested).
– Kusalananda
Feb 24 '17 at 10:54
if rhash is available in recent enough version then e.g.rhash --sha3-256
– frostschutz
Feb 24 '17 at 11:02
Doing it with SSL unix.stackexchange.com/a/493065/3285
– Evan Carroll
31 mins ago
add a comment |
On a Debian-based Linux, it's apparently part of thelibdigest-sha3-perl
package (not tested).
– Kusalananda
Feb 24 '17 at 10:54
if rhash is available in recent enough version then e.g.rhash --sha3-256
– frostschutz
Feb 24 '17 at 11:02
Doing it with SSL unix.stackexchange.com/a/493065/3285
– Evan Carroll
31 mins ago
On a Debian-based Linux, it's apparently part of the
libdigest-sha3-perl
package (not tested).– Kusalananda
Feb 24 '17 at 10:54
On a Debian-based Linux, it's apparently part of the
libdigest-sha3-perl
package (not tested).– Kusalananda
Feb 24 '17 at 10:54
if rhash is available in recent enough version then e.g.
rhash --sha3-256
– frostschutz
Feb 24 '17 at 11:02
if rhash is available in recent enough version then e.g.
rhash --sha3-256
– frostschutz
Feb 24 '17 at 11:02
Doing it with SSL unix.stackexchange.com/a/493065/3285
– Evan Carroll
31 mins ago
Doing it with SSL unix.stackexchange.com/a/493065/3285
– Evan Carroll
31 mins ago
add a comment |
6 Answers
6
active
oldest
votes
There are a number of implementations, e.g. Mattias Andrée's sha3sum
, or the Perl Digest-SHA3 module. In Debian, install libdigest-sha3-perl
; in Fedora, install sha3sum
; both of these will provide a sha3sum
command based on the Perl module, which behaves in the same way as the binaries you're used to.
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite under Fedora you should use theperl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1
– GAD3R
Feb 25 '17 at 13:49
2
@GAD3R in Fedora the appropriate package issha3sum
(I had updated my answer after checking on a Fedora system).
– Stephen Kitt
Feb 26 '17 at 12:48
|
show 1 more comment
For what it's worth, Busybox has had code for it since 2013.
add a comment |
RHash application could do it:
rhash --sha3-256 yourfile
More info: rhash -h
it will work on Linux, BSD and Windows
add a comment |
If you're lazy like me and are used to md5sum, sha1sum, sha256sum:
Create the file /usr/local/bin/sha3256sum and make it executable with chmod +x sha3256sum.
#!/bin/bash
rhash --sha3-256 $1
Then you can run:
sha3256sum file
add a comment |
If you have openssl
installed you should have the hashalot
command which says :
Supported values for HASHTYPE:
ripemd160 rmd160 rmd160compat sha256 sha384 sha512
You can also use directly the sha384
command.
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
yes indeed, sorry for my mistake. Support for SHA3 inopenssl
is planned/in the work : github.com/openssl/openssl/issues/439
– Patrick Mevzek
Feb 26 '17 at 11:41
add a comment |
You can use OpenSSL
to do this, The below is demonstrated with OpenSSL 1.1.1 11 Sep 2018, from Ubuntu 18.10.
OpenSSL> help
...
Message Digest commands (see the `dgst' command for more details)
blake2b512 blake2s256 gost md4
md5 rmd160 sha1 sha224
sha256 sha3-224 sha3-256 sha3-384
sha3-512 sha384 sha512 sha512-224
sha512-256 shake128 shake256 sm3
So you can see it supports sha3-{224,384,512}
.
To checksum a file,
openssl dgst -sha3-512 /bin/echo
SHA3-512(/bin/echo)= c9a3baaa2aa3d667a4ff475d893b3e84eb588fb46adecd0af5f3cdd735be88c62e179f98dc8275955da4ee5ef1dc7968620686c6f7f63f5b80f10e43bc1f00fc
You can checksum a string with
printf "foobar" | openssl dgst -sha3-512
You can also change the output format
-c
Print the digest with separating colons
-r
Print the digest in coreutils format
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f347295%2fhow-can-i-generate-sha3-if-there-is-no-sha3sum-command-in-coreutils%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
6 Answers
6
active
oldest
votes
6 Answers
6
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are a number of implementations, e.g. Mattias Andrée's sha3sum
, or the Perl Digest-SHA3 module. In Debian, install libdigest-sha3-perl
; in Fedora, install sha3sum
; both of these will provide a sha3sum
command based on the Perl module, which behaves in the same way as the binaries you're used to.
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite under Fedora you should use theperl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1
– GAD3R
Feb 25 '17 at 13:49
2
@GAD3R in Fedora the appropriate package issha3sum
(I had updated my answer after checking on a Fedora system).
– Stephen Kitt
Feb 26 '17 at 12:48
|
show 1 more comment
There are a number of implementations, e.g. Mattias Andrée's sha3sum
, or the Perl Digest-SHA3 module. In Debian, install libdigest-sha3-perl
; in Fedora, install sha3sum
; both of these will provide a sha3sum
command based on the Perl module, which behaves in the same way as the binaries you're used to.
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite under Fedora you should use theperl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1
– GAD3R
Feb 25 '17 at 13:49
2
@GAD3R in Fedora the appropriate package issha3sum
(I had updated my answer after checking on a Fedora system).
– Stephen Kitt
Feb 26 '17 at 12:48
|
show 1 more comment
There are a number of implementations, e.g. Mattias Andrée's sha3sum
, or the Perl Digest-SHA3 module. In Debian, install libdigest-sha3-perl
; in Fedora, install sha3sum
; both of these will provide a sha3sum
command based on the Perl module, which behaves in the same way as the binaries you're used to.
There are a number of implementations, e.g. Mattias Andrée's sha3sum
, or the Perl Digest-SHA3 module. In Debian, install libdigest-sha3-perl
; in Fedora, install sha3sum
; both of these will provide a sha3sum
command based on the Perl module, which behaves in the same way as the binaries you're used to.
answered Feb 24 '17 at 11:02
Stephen KittStephen Kitt
165k24366446
165k24366446
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite under Fedora you should use theperl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1
– GAD3R
Feb 25 '17 at 13:49
2
@GAD3R in Fedora the appropriate package issha3sum
(I had updated my answer after checking on a Fedora system).
– Stephen Kitt
Feb 26 '17 at 12:48
|
show 1 more comment
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite under Fedora you should use theperl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1
– GAD3R
Feb 25 '17 at 13:49
2
@GAD3R in Fedora the appropriate package issha3sum
(I had updated my answer after checking on a Fedora system).
– Stephen Kitt
Feb 26 '17 at 12:48
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
In Debian, libdigest-sha3-perl is available in jessie and newer (which currently means stretch and sid).
– a CVn
Feb 24 '17 at 14:14
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
No package sha3sum available.
– pepite
Feb 24 '17 at 17:22
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite on Fedora? Which version?
– Stephen Kitt
Feb 24 '17 at 17:23
@pepite under Fedora you should use the
perl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1– GAD3R
Feb 25 '17 at 13:49
@pepite under Fedora you should use the
perl-Digest-SHA3
package rpmfind.net/linux/rpm2html/search.php?query=perl-Digest-SHA1– GAD3R
Feb 25 '17 at 13:49
2
2
@GAD3R in Fedora the appropriate package is
sha3sum
(I had updated my answer after checking on a Fedora system).– Stephen Kitt
Feb 26 '17 at 12:48
@GAD3R in Fedora the appropriate package is
sha3sum
(I had updated my answer after checking on a Fedora system).– Stephen Kitt
Feb 26 '17 at 12:48
|
show 1 more comment
For what it's worth, Busybox has had code for it since 2013.
add a comment |
For what it's worth, Busybox has had code for it since 2013.
add a comment |
For what it's worth, Busybox has had code for it since 2013.
For what it's worth, Busybox has had code for it since 2013.
answered Sep 11 '17 at 21:04
covcov
562
562
add a comment |
add a comment |
RHash application could do it:
rhash --sha3-256 yourfile
More info: rhash -h
it will work on Linux, BSD and Windows
add a comment |
RHash application could do it:
rhash --sha3-256 yourfile
More info: rhash -h
it will work on Linux, BSD and Windows
add a comment |
RHash application could do it:
rhash --sha3-256 yourfile
More info: rhash -h
it will work on Linux, BSD and Windows
RHash application could do it:
rhash --sha3-256 yourfile
More info: rhash -h
it will work on Linux, BSD and Windows
edited Apr 11 '18 at 9:12
Kiwy
5,91753556
5,91753556
answered Dec 7 '17 at 0:47
user6646542user6646542
312
312
add a comment |
add a comment |
If you're lazy like me and are used to md5sum, sha1sum, sha256sum:
Create the file /usr/local/bin/sha3256sum and make it executable with chmod +x sha3256sum.
#!/bin/bash
rhash --sha3-256 $1
Then you can run:
sha3256sum file
add a comment |
If you're lazy like me and are used to md5sum, sha1sum, sha256sum:
Create the file /usr/local/bin/sha3256sum and make it executable with chmod +x sha3256sum.
#!/bin/bash
rhash --sha3-256 $1
Then you can run:
sha3256sum file
add a comment |
If you're lazy like me and are used to md5sum, sha1sum, sha256sum:
Create the file /usr/local/bin/sha3256sum and make it executable with chmod +x sha3256sum.
#!/bin/bash
rhash --sha3-256 $1
Then you can run:
sha3256sum file
If you're lazy like me and are used to md5sum, sha1sum, sha256sum:
Create the file /usr/local/bin/sha3256sum and make it executable with chmod +x sha3256sum.
#!/bin/bash
rhash --sha3-256 $1
Then you can run:
sha3256sum file
answered Mar 19 '18 at 15:10
user3559338user3559338
311
311
add a comment |
add a comment |
If you have openssl
installed you should have the hashalot
command which says :
Supported values for HASHTYPE:
ripemd160 rmd160 rmd160compat sha256 sha384 sha512
You can also use directly the sha384
command.
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
yes indeed, sorry for my mistake. Support for SHA3 inopenssl
is planned/in the work : github.com/openssl/openssl/issues/439
– Patrick Mevzek
Feb 26 '17 at 11:41
add a comment |
If you have openssl
installed you should have the hashalot
command which says :
Supported values for HASHTYPE:
ripemd160 rmd160 rmd160compat sha256 sha384 sha512
You can also use directly the sha384
command.
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
yes indeed, sorry for my mistake. Support for SHA3 inopenssl
is planned/in the work : github.com/openssl/openssl/issues/439
– Patrick Mevzek
Feb 26 '17 at 11:41
add a comment |
If you have openssl
installed you should have the hashalot
command which says :
Supported values for HASHTYPE:
ripemd160 rmd160 rmd160compat sha256 sha384 sha512
You can also use directly the sha384
command.
If you have openssl
installed you should have the hashalot
command which says :
Supported values for HASHTYPE:
ripemd160 rmd160 rmd160compat sha256 sha384 sha512
You can also use directly the sha384
command.
answered Feb 25 '17 at 13:38
Patrick MevzekPatrick Mevzek
2,1321822
2,1321822
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
yes indeed, sorry for my mistake. Support for SHA3 inopenssl
is planned/in the work : github.com/openssl/openssl/issues/439
– Patrick Mevzek
Feb 26 '17 at 11:41
add a comment |
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
yes indeed, sorry for my mistake. Support for SHA3 inopenssl
is planned/in the work : github.com/openssl/openssl/issues/439
– Patrick Mevzek
Feb 26 '17 at 11:41
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
updating the question, sha384 is sha2. sha3 is not sha2.
– pepite
Feb 26 '17 at 11:10
yes indeed, sorry for my mistake. Support for SHA3 in
openssl
is planned/in the work : github.com/openssl/openssl/issues/439– Patrick Mevzek
Feb 26 '17 at 11:41
yes indeed, sorry for my mistake. Support for SHA3 in
openssl
is planned/in the work : github.com/openssl/openssl/issues/439– Patrick Mevzek
Feb 26 '17 at 11:41
add a comment |
You can use OpenSSL
to do this, The below is demonstrated with OpenSSL 1.1.1 11 Sep 2018, from Ubuntu 18.10.
OpenSSL> help
...
Message Digest commands (see the `dgst' command for more details)
blake2b512 blake2s256 gost md4
md5 rmd160 sha1 sha224
sha256 sha3-224 sha3-256 sha3-384
sha3-512 sha384 sha512 sha512-224
sha512-256 shake128 shake256 sm3
So you can see it supports sha3-{224,384,512}
.
To checksum a file,
openssl dgst -sha3-512 /bin/echo
SHA3-512(/bin/echo)= c9a3baaa2aa3d667a4ff475d893b3e84eb588fb46adecd0af5f3cdd735be88c62e179f98dc8275955da4ee5ef1dc7968620686c6f7f63f5b80f10e43bc1f00fc
You can checksum a string with
printf "foobar" | openssl dgst -sha3-512
You can also change the output format
-c
Print the digest with separating colons
-r
Print the digest in coreutils format
add a comment |
You can use OpenSSL
to do this, The below is demonstrated with OpenSSL 1.1.1 11 Sep 2018, from Ubuntu 18.10.
OpenSSL> help
...
Message Digest commands (see the `dgst' command for more details)
blake2b512 blake2s256 gost md4
md5 rmd160 sha1 sha224
sha256 sha3-224 sha3-256 sha3-384
sha3-512 sha384 sha512 sha512-224
sha512-256 shake128 shake256 sm3
So you can see it supports sha3-{224,384,512}
.
To checksum a file,
openssl dgst -sha3-512 /bin/echo
SHA3-512(/bin/echo)= c9a3baaa2aa3d667a4ff475d893b3e84eb588fb46adecd0af5f3cdd735be88c62e179f98dc8275955da4ee5ef1dc7968620686c6f7f63f5b80f10e43bc1f00fc
You can checksum a string with
printf "foobar" | openssl dgst -sha3-512
You can also change the output format
-c
Print the digest with separating colons
-r
Print the digest in coreutils format
add a comment |
You can use OpenSSL
to do this, The below is demonstrated with OpenSSL 1.1.1 11 Sep 2018, from Ubuntu 18.10.
OpenSSL> help
...
Message Digest commands (see the `dgst' command for more details)
blake2b512 blake2s256 gost md4
md5 rmd160 sha1 sha224
sha256 sha3-224 sha3-256 sha3-384
sha3-512 sha384 sha512 sha512-224
sha512-256 shake128 shake256 sm3
So you can see it supports sha3-{224,384,512}
.
To checksum a file,
openssl dgst -sha3-512 /bin/echo
SHA3-512(/bin/echo)= c9a3baaa2aa3d667a4ff475d893b3e84eb588fb46adecd0af5f3cdd735be88c62e179f98dc8275955da4ee5ef1dc7968620686c6f7f63f5b80f10e43bc1f00fc
You can checksum a string with
printf "foobar" | openssl dgst -sha3-512
You can also change the output format
-c
Print the digest with separating colons
-r
Print the digest in coreutils format
You can use OpenSSL
to do this, The below is demonstrated with OpenSSL 1.1.1 11 Sep 2018, from Ubuntu 18.10.
OpenSSL> help
...
Message Digest commands (see the `dgst' command for more details)
blake2b512 blake2s256 gost md4
md5 rmd160 sha1 sha224
sha256 sha3-224 sha3-256 sha3-384
sha3-512 sha384 sha512 sha512-224
sha512-256 shake128 shake256 sm3
So you can see it supports sha3-{224,384,512}
.
To checksum a file,
openssl dgst -sha3-512 /bin/echo
SHA3-512(/bin/echo)= c9a3baaa2aa3d667a4ff475d893b3e84eb588fb46adecd0af5f3cdd735be88c62e179f98dc8275955da4ee5ef1dc7968620686c6f7f63f5b80f10e43bc1f00fc
You can checksum a string with
printf "foobar" | openssl dgst -sha3-512
You can also change the output format
-c
Print the digest with separating colons
-r
Print the digest in coreutils format
answered 34 mins ago
Evan CarrollEvan Carroll
5,19594279
5,19594279
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f347295%2fhow-can-i-generate-sha3-if-there-is-no-sha3sum-command-in-coreutils%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
On a Debian-based Linux, it's apparently part of the
libdigest-sha3-perl
package (not tested).– Kusalananda
Feb 24 '17 at 10:54
if rhash is available in recent enough version then e.g.
rhash --sha3-256
– frostschutz
Feb 24 '17 at 11:02
Doing it with SSL unix.stackexchange.com/a/493065/3285
– Evan Carroll
31 mins ago