Salsa20 Hash

Technical details, regex signatures, and cracking commands for the Salsa20 algorithm.

Regex Identification Signature:
^[a-f0-9]{128}(:.+)?$
Not supported natively by Hashcat
Not supported natively by John the Ripper
← Back to Hash Identifier

What is Salsa20?

Salsa20 is a stream cipher designed by Daniel J. Bernstein in 2005 as part of his broader family of cryptographic primitives, including ChaCha. Originating from a need for high-speed, lightweight encryption resistant to side-channel attacks, Salsa20 was explicitly optimized for performance on modern x86 processors, leveraging SIMD instructions and cache-friendly memory access patterns. Structurally, it operates as a 256-bit block cipher with a 256-bit key (or 128-bit key in its truncated variant, ChaCha) and a 64-bit nonce, producing a keystream via a 16×16 matrix of 32-bit words processed through a 20-round double-round function. The algorithm’s design prioritizes simplicity and efficiency, avoiding complex modular arithmetic in favor of bitwise operations and modular additions, which enhances its suitability for hardware acceleration. Its primary use-case lies in authenticated encryption (e.g., via Poly1305-AES or HMAC-SHA256) and as a drop-in replacement for AES-CTR in environments where hardware acceleration of AES is unavailable or undesirable, such as in software-defined networking or embedded systems.

Despite its performance advantages, Salsa20 exhibits critical vulnerabilities stemming from its design choices. The absence of a cryptographic salt in the nonce (which is only 64-bit) renders it susceptible to replay attacks if the nonce is reused, a flaw exacerbated by its lack of built-in integrity protection in the base cipher. While the 20-round structure provides security margins against brute-force attacks (theoretically requiring 2¹²⁸ operations for a 128-bit key), optimizations like parallelized SIMD execution on GPUs or FPGAs have enabled practical attacks, particularly in scenarios where the cipher is used in a non-authenticated mode. Additionally, Salsa20’s reliance on linear transformations and the lack of a post-quantum-resistant foundation make it vulnerable to future advancements in quantum computing, which could exploit its algebraic structure. Collision resistance, though not its primary claim, remains unproven for the compression function, and empirical evidence of differential cryptanalysis attacks (e.g., via boomerang or truncated differentials) has highlighted weaknesses in specific round reductions, though full-round variants remain secure under classical assumptions.

Identifying Salsa20 Hashes

Identifying a hash blindly is often difficult because multiple algorithms can output strings of the exact same length. For example, a standard 32-character hexadecimal string could be MD5, NTLM, MD4, or LM. To definitively identify Salsa20, security researchers analyze the hash against a strict regular expression (regex) signature (shown above) to find structural matches.

How to Crack Salsa20

If you need to recover the plaintext password for a Salsa20 hash during a penetration test or forensics investigation, you must supply the correct module ID to your cracking software. Use the exact commands provided at the top of this page to target the hash successfully.