cSHAKE from command line
Robert Moskowitz
rgm at htt-consult.com
Wed Apr 19 02:50:41 UTC 2023
the Fedora user list provided:
==========
It looks like the package "python3-pycryptodomex" might have you want.
https://pycryptodome.readthedocs.io/en/v3.15.0/src/introduction.html
==========
So at least I can get cSHAKE within python.
On 4/17/23 08:40, Robert Moskowitz wrote:
> I am looking to generate a cSHAKE output via the openssl command line.
>
> In:
> https://wiki.openssl.org/index.php/Command_Line_Utilities#Generating_a_File_Hash
>
> I see I can generate a SHAKE128 hash by:
>
> openssl shake128 stringtohash.dat
>
> NIST SP800-185 defines cshake128 as:
>
> cSHAKE128(X, L, N, S) = KECCAK[256](bytepad(encode_string(N) ||
> encode_string(S), 168) || X || 00, L)
>
> In my usage, "N" will be a null string, but "S" will have a value.
>
> and FIPS202 defines SHAKE128 as:
>
> SHAKE128(M, d) = KECCAK[256] (M || 1111, d)
>
> Why 202 uses "M" & "d" and 185 uses "X" & "L" is beyond me, but eh.
>
> I don't see how to get from one to the other. Or maybe I am just
> missing the cSHAKE option, but the openssl wiki does not seem to have
> any reference to cSHAKE.
>
> thanks for the help.
>
>
More information about the openssl-users
mailing list