Jacksum
Jacksum (JAva ChecKSUM) is a free, open source, cross-platform, feature-rich, multi-threaded command line tool for calculating hash values, verifying data integrity, finding files by their fingerprints, and finding algorithms to a hash value.
Jacksum supports 472 hash functions, and a bunch of features.
Jacksum is also a library. It is written entirely in Java
Is this the right package for you?
If you are skilled command line user (advanced user, sysadmin, computer scientist, cybersecurity engineer, penetration tester, forensics engineer, reverse engineer, ...) this package is for you.
If you are a Java developer and you want to use the power of Jacksum in your app, this lib in .jar format is for you as well.
If you prefer a graphical user interface and you just would like to calc and verify hashes with a graphical user interface, I recommend to download and use the Jacksum File Browser Integration installer which is available for many different file managers. See also Integrations.
Hash functions
Hash functions play an important role in many cryptographic and non-cryptographic mechanisms, for example when verifying data integrity or identifying files. They map a bit string m ∈ {0, 1}* of arbitrary length to a bit string h ∈ {0, 1}n of fixed length n ∈ ℕ.
The result of a hash function is the hash value.
Jacksum supports 472 hash functions, both cryptographic and non-cryptographic hash functions.
Cryptographic hash functions
This version supports the following cryptographic hash functions:
BLAKE-[224,256,348,512], BLAKE2b-[8..512], BLAKE2s-[8..256], BLAKE3, DHA-256, ECHO-[224,256,348,512], ed2k, FORK-256, Fugue-[224,256,348,512], GOST Crypto-Pro (GOST R 34.11-94), GOST R 34.11-94, Groestl-[224,256,384,512], HAS-160 (KISA), HAVAL-128-[3,4,5], HAVAL-[160,192,224,256]-[3,4,5], JH[224,256,284,512], KangarooTwelve, Keccak[224,256,384,512], Kupyna[256,384,512] (DSTU 7564:2014), LSH-256-[224,256], LSH-512-[224,256,384,512] (KS X 3262), Luffa-[224,256,348,512], MD2, MD4, MD5, MDC2, MarsupilamiFourteen, PANAMA, RIPEMD-128, RIPEMD[160,256,320], RadioGatun[32,64], SHA-0, SHA-1, SHA-[224,256,384,512], SHA-512/[224,256] (NIST FIPS 180-4), SHA3-[224,256,384,512], SHAKE[128,256] (NIST FIPS 202), SM3, Skein-1024-[8..1024], Skein-256-[8..256], Skein-512-[8..512], Streebog-[256,512] (GOST R 34.11-2012), Tiger, Tiger/128, Tiger/160, Tiger2, VSH-1024, Whirlpool-T, Whirpool-0, and Whirlpool.
Non-cryptographic hash functions
Classical checksums
This version supports the following classical checksums:
Adler-32, ELF (Unix), FNV-0_[32,64,128,256,512,1024], FNV-1_[32,64,128,256,512,1024], FNV-1a_[32,64,128,256,512,1024], Fletcher's Checksum, XXH32, cksum (Minix), cksum (Unix), joaat, sum (BSD Unix), sum (Minix), sum (System V Unix), sum [8,16,24,32,40,48,56], xor8
CRCs
This version supports the quasi-standard called "Rocksoft (tm) Model CRC Algorithm", and even an extended model of it which allows you to define CRCs based on particular parameters. This version supports the following CRCs explicitly:
CRC-8 (FLAC), CRC-16 (LHA/ARC), CRC-16 (Minix), FCS-16, CRC-24 (OpenPGP), CRC-32 (FCS-32), CRC-32 (MPEG-2), CRC-32 (bzip2), CRC-32 (FDDI), CRC-32 (UBICRC32), CRC-32 (PHP's crc32), CRC-64 (ISO 3309), CRC-64 (ECMA-182), CRC-64 (prog lang GO, const ISO), CRC-64 (.xz and prog lang GO, const ECMA)
Where to download?
The latest released .jar file can be found at https://github.com/jonelo/jacksum/releases/latest The .zip file also contains simple scripts to call Jacksum on Windows, Linux, and macOS from the command line.
How to install and configure it
Download the .jar (or .zip) file as described above, open a terminal (on Microsoft Windows, it is known as the "Command Prompt") and start Jacksum by typing
java -jar jacksum-3.4.0.jar
I recommend to adjust the Windows batch file (jacksum.bat) resp. the bash script (jacksum) for GNU/Linux and Unix operating systems (e.g. macOS) and to put the script to a folder that is reachable by your PATH environment variable in order to launch jacksum easily just by typing
jacksum
Details ...
The following snippet could help you to setup Jacksum on GNU/Linux. In the example below, the launch script will be stored in $HOME/bin/
which will also be added to your PATH. The jar file will be stored to /opt/java/apps/jacksum/
so other users on the computer have access to it as well.
$ echo 'export PATH="$PATH=$HOME/bin"' >> $HOME/.profile
$ export VERSION=3.4.0
$ unzip jacksum-$VERSION.zip
$ cp jacksum-$VERSION/unix/jacksum ~/bin && chmod +x ~/bin/jacksum
$ sudo mkdir -p /opt/java/apps/jacksum && cp jacksum-$VERSION/jacksum-$VERSION.jar /opt/java/apps/jacksum/
$ rm -R jacksum-$VERSION/
Examples of how to use it
jacksum -h examples
See also the EXAMPLES section of the manpage, and the Cheat Sheet in the Wiki.
Features
Jacksum supports 471 data fingerprinting algorithms, including checksums, CRCs, XOFs, cryptographic, and non-cryptographic hash functions. Jacksum also supports the "Rocksoft (tm) Model CRC Algorithm" to customize CRCs.
Jacksum can act as a classic file integrity software that generates, stores, and compares message digests to detect changes made to the files. Actually it can detect matching, non-matching, missing, and new files.
Jacksum traverses file trees recursively with a depth limit.
Jacksum also allows you to identify files by their digital fingerprints, find files that match a given hash value, find all duplicates of a file, and even find the algorithm to a checksum/CRC/hash by using a brute force algorithm.
Jacksum supports multi-threading on multi-processor and multi-core computer systems. Jacksum can compute multiple hashes simultaneously, and it can process multiple files simultaneously.
Input data can come from almost any source: files, disks, partitions, standard input stream (stdin), and/or provided directly by command line arguments. Also platform specific input such as NTFS Alternate Data Streams (ADS) on Microsoft Windows, and block devices, character devices, named pipes (FIFOs), and sockets (Unix-like OS only), and doors (Solaris only) are supported and can be hashed.
Output can occur in predefined standard formats (BSD-, GNU/Linux-, or Solaris style, SFV or FCIV) or in a user-defined format which is highly customizable, including many encodings for representing hash values: Hex (lower- and uppercase), Base16, Base32 (with and without padding), Base32hex (with and without padding), Base64 (with and without padding), Base64url (with and without padding), BubbleBabble, and z-base-32. Paths can be omitted, printed absolutely or relative to a different path.
Jacksum supports many charsets for reading and writing files properly, and it comes with full support for all common Unicode aware charsets such as UTF-8, UTF-16, UTF-16BE, UTF-16LE, UTF-32, UTF-32LE, UTF-32BE, and GB18030. A Byte-Order Mark (BOM) is supported for both input and output, even if a BOM is optional for the selected charset.
Jacksum is a command line tool, and it can be integrated in your file browser, see also Integration.
Jacksum can also be used as a library in your own projects by using its API. Jacksum keeps the binary small, because it bundles only what it really needs to do the job.
For more information, see also the comprehensive list of features.
System Requirements
- GNU/Linux, Microsoft Windows, or macOS
- JDK 11 or later
- 2 MiB disk space
Details ...
- To download the (Open)JDK 11 or later, you can go to any vendor that provides OpenJDK compatible builds, LTS (long term support) releases are recommended, examples are
- Supported architectures are dependent on the OS and the JDK vendor:
- x86 64 bit (x64)
- x86 32 bit (x86)
- ARM 64 bit (AArch64, resp. M1)
- ARM 32 bit (AArch32)
- PPC 64 bit (ppc64)
- a GitHub user have had success to run Jacksum without modification even on a smartphone running Android on ARM 64 bit, see also #7
- GNU/Linux is the correct term to refer to "Linux", see also https://www.gnu.org/gnu/linux-and-gnu.en.html
- actual RAM requirement is dependent on the OS, the architecture, the JDK, the JRE's (default) garbage collector settings and usage. Tests have shown that Jacksum feels pretty comfortable with 512 MiB Java heap on a x64 Windows 10 system for example while verifying millions of files of all sizes (0 bytes to several GiB).
Documentation
- Jacksum Release Notes (2002-2022)
- Jacksum Features
- Jacksum Manpage (with many examples)
- Jacksum Wiki
- Jacksum Source Code (on GitHub, mavenized with a pom.xml and an IntelliJ .idea config)
- Start your investigation journey by reading net.jacksum.cli.Main and net.jacksum.JacksumAPI
- Download and read the jacksum-3.2.0-javadoc.jar
- https://jacksum.net
Integrations
- Jacksum File Browser Integration for Microsoft Windows
- Jacksum File Browser Integration for GNU/Linux
- Jacksum File Browser Integration for macOS
- Jacksum on Docker
- HashGarten
- NumericalChameleon, see http://www.numericalchameleon.net
History
Jacksum version 1.0.0 was published in July 2002 on https://sourceforge.net/projects/jacksum/. Starting with Jacksum version 3.0.0 in September 2021, it moved its repo to GitHub.
Contribution
I appreciate feedback from users, bug hunters, and fresh ideas from open minded people. Feel free and file support requests, change requests, bug reports and feature requests on GitHub
Spread the word, or give a star here on GitHub.
How to clone/compile/package/install it (for developers)
Jacksum can be build by Maven. On the command line you can simply clone the source code by calling git clone
and compile/package/install by calling mvn install
. After installation, the .jar file can be found unter the target directory and in your $HOME/.m2/ directory structure. You should set JAVA_HOME properly so that the JDK tools such as javac and javadoc can be found.
Details ...
Example on Ubuntu 20.04.4 LTS:
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
$ git clone https://github.com/jonelo/jacksum.git
$ cd jacksum
$ git tag -l
v3.0.0
v3.0.1
v3.1.0
v3.2.0
v3.3.0
$ git checkout tags/v3.3.0 -b three-three-zero
$ mvn install
Call mvn -version
to check whether your maven would use at least Java 11. Alternatively use an IDE which supports both cloning from a GitHub repo and Maven.
License
The license that the project is offered under is the GPL-3.0+.