1RAHASH2(1)                BSD General Commands Manual               RAHASH2(1)
2

NAME

4     rahash2 — block based hashing utility
5

SYNOPSIS

7     rahash2 [-BbdDehjrknvq] [-a algorithm] [-b size] [-D algo] [-E algo]
8             [-f from] [-i iterations] [-I IV] [-n blocks] [-s string]
9             [-S seed] [-p type] [-x hexstr] [-t to] [-c hash] [[file] ...]
10

DESCRIPTION

12     This program is part of the radare project.
13
14     Rahash2 allows you to calculate, check and show the hash values of each
15     block of a target file. The block size is 32768 bytes by default. It's
16     allowed to hash from stdin using '-' as a target file. You can compare
17     against a known hash and get the result in the exit status.
18
19     You can hash big files by hashing each block and later determine what
20     part of it has been modified. Useful for filesystem analysis.
21
22     This command can be used to calculate hashes of a certain part of a file
23     or a command line passed string.
24
25     This is the command used by the 'ph' command of radare.
26
27     -a algo     Comma separated list of algorithms to use when hashing files
28                 or strings. See -L to list the supported hashing algorithms.
29                 This flag can be passed multiple times instead of separating
30                 them by commas.
31
32     -b blocksize
33                 Define the block size
34
35     -c hash     Compare the computed hash with this one. Allowed only when a
36                 single hash is computed.
37
38     -D algo     Decrypt instead of hash using the given algorithm (base64,
39                 base91, rc4, aes, xor, blowfish, rot, rol, ror, rc2, rc6,
40                 punycode)
41
42     -e          Use little endian to display checksums
43
44     -E algo     Encrypt instead of hash using the given algorithm (base64,
45                 base91, rc4, aes, xor, blowfish, rot, rol, ror, rc2, rc6,
46                 punycode)
47
48     -i iters    Apply the hash Iters times to itself+seed
49
50     -I [^]s:string|hexstr
51                 Set initialization vector (IV) for the cryptographic func‐
52                 tions.
53
54     -j          Show output in JSON (see -r and -J). If passed more than once
55                 results in -J
56
57     -J          New simplified JSON output, maybe this format will replace
58                 -j, but it's added as a new flag to not break backward com‐
59                 patibility until proper discussion
60
61     -B          Show per-block hash
62
63     -k          Show result using OpenSSH's VisualHostKey randomart algorithm
64
65     -n          Amount of blocks to hash
66
67     -s string   Hash this string instead of using the 'source' and 'hash-
68                 file' arguments.
69
70     -S [^]s:string|hexstr
71                 Set seed to hash with, use ^to prefix seed, otherwise it's
72                 suffixed. If the seed is just a dash '-' it will read from
73                 stdin. This is useful to provide huge XOR payloads or other
74                 crypto keys bigger than few bytes.
75
76     -f from     Start hashing at given address
77
78     -t to       Stop hashing at given address
79
80     -p arg      Show vertical entropy/statistical entropy graphs
81
82     -q          Quiet mode (-qq for even quieter!)
83
84     -r          Show output in radare commands
85
86     -x hexstr   Hash the given hexpair string instead of using the 'source'
87                 and 'hash-file' arguments.
88
89     -v          Show version information
90
91     -h          Show usage help message.
92

DIAGNOSTICS

94     The rahash2 utility exits 0 on success, and >0 if an error occurs.
95
96     When -c is used, exit status 0 indicates a match between the expected and
97     computed hashes.
98

SEE ALSO

100     radare2(1)
101

AUTHORS

103     pancake <pancake@nopcode.org>
104
105                                 Mar 12, 2022
Impressum