NAME

sdlh - compute and print SDLH message digest of files

SYNOPSIS

sdlh [-256] [-slow] [-key keyfile] files

DESCRIPTION

Print the hash value computed on the string stored in a file. The message string is converted into a long integer x as in PKCS#1-OS2IP processing the characters in the reverse order.

hash(x) = g^x mod n

The length of the hash value will depend on the modulus used for hashing. Without the option -key the hash key (modulus and generator) is read from a config file .hashkey in the user's home directory. If the config file does not exist, default values for n and g are used. In any case a hash modulus must be at least 1024 bits long.
If no arguments are given, stdin is used and the message can be piped into the program.

OPTIONS

-256 The hash value has a fixed length of 256 bits.

-slow

The hash value is computed using one single operation of modular exponentiation. The default is fast, computing the hash values without prior conversion of the message into a long integer.

-key file

Reads the modulus and generator from a file.

CONFIGURATION FILES

$HOME/.hashkey Holds the modulus and generator values. The format of this file comprising 3 lines is :
     Hashmodulus = [1-9][0-9]*
     Generator = [1-9][0-9]*
     User's identification string 
Hashkey files given on the command line will overwrite the configuration file.

AUTHOR

Written by Ralf Senderek.

COPYRIGHT

All rights reserved. © 2003
This is free software. Use this software on your own risk or not at all. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO

pcp - the Pure Crypto Program (https://senderek.ie/research/pcp)