cSHAKE from command line
Robert Moskowitz
rgm at htt-consult.com
Mon Apr 17 12:40:00 UTC 2023
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