1cookfp(1)                   General Commands Manual                  cookfp(1)
2
3
4

NAME

6       cookfp - calculate file fingerprint
7

SYNOPSIS

9       cookfp [ option...  ][ filename...  ]
10       cookfp -Help
11       cookfp -VERSion
12

DESCRIPTION

14       The  cookfp  program is used to calculate the fingerprints of files.  A
15       fingerprint is a hash of the contents of a file.  The  default  finger‐
16       print  is cryptographically strong, so the probability of two different
17       files having the same fingerprint is less than 1 in 2**200.
18
19       The fingerprint is based on Dan  Berstien  <djb@silverton.berkeley.edu>
20       public  domain  fingerprint  0.50  beta  package  930809, posted to the
21       alt.sources newsgroup.  This program produces  identical  results;  the
22       expected test results were generated using Dan's package.
23
24       The  fingerprint  is a base-64-sanely-encoded fingerprint of the input.
25       Imagine this fingerprint as something universal and permanent.  A  fin‐
26       gerprint is 76 characters long, containing the following:
27
28       1.  A  Snefru-8  (version 2.5, 8 passes, 512->256) hash.  (Derived from
29           the Xerox Secure Hash Function.)
30
31       2.  An MD5 hash, as per RFC 1321.  (Derived from the  RSADSI  MD5  Mes‐
32           sage-Digest Algorithm.)
33
34       3.  A CRC checksum, as in the new cksum utility.
35
36       4.  Length modulo 2^40.
37
38       The output format is not expected to be compatible with anything.  How‐
39       ever, options are available to produce the purported output of Merkle's
40       snefru  program,  the  purported output of RSADSI's mddriver -x, or the
41       purported output of the POSIX cksum program.
42
43       If no files are named as input, the standard input will be  used.   The
44       special file name ``-'' is understood to mean the standard input.
45

OPTIONS

47       The following options are understood:
48
49       -Checksum
50               Print the CRC32 checksum and length of the named file(s).
51
52       -Identifier
53               Print a condensed form of the fingerprint (obtained by perform‐
54               ing a CRC32 checksum on the full fingerprint described above  -
55               a  definite  overkill).  This is an 8-digit hexadecimal number,
56               useful for generating unique  short  identifiers  out  of  long
57               names.   The first character is forced to be a letter (g-p), so
58               there is no problem in using the output as a variable name.
59
60       -Help
61               Provide some help with using the cookfp program.
62
63       -Message_Digest
64               Print the RSA Data Security, Inc. MD5 Message-Digest  Algorithm
65               hash of the named file(s).
66
67       -Snefru Print  the  Snefru  hash of the named file(s), derived from the
68               Xerox Secure Hash Function.
69
70       -VERSion
71               Print the version of the cookfp program being executed.
72
73       All other options will produce a diagnostic error.
74
75       Portions of this program are derived from sources  from  other  people,
76       sometimes  with liberal copyrights, and sometimes in the public domain.
77       These include:
78
79       Dan Bernstien
80               See common/fp/README for details.
81
82       Gary S Brown.
83               See common/fp/crc32.c for details.
84
85       RSA Data Security, Inc.
86               See common/fp/md5.c for details.
87
88       Xerox Corporation
89               See common/fp/snefru.c for details.
90
91       In addition to the above copyright holders, there  have  been  numerous
92       authors and contributors, see the named files for details.  Files names
93       are relative to the root of the cook distribution.
94
95
96
97Reference Manual                     Cook                            cookfp(1)
Impressum