---
title: "SHA-0"
description: "The 1993 original of SHA-1. Withdrawn within two years and fully collided in 2004. Here for old papers and puzzles and it has HMAC"
canonical_url: "https://hashes.agntn.dev/algorithms/sha0"
---
# SHA-0

> The 1993 original of SHA-1. Withdrawn within two years and fully collided in 2004. Here for old papers and puzzles and it has HMAC

<algorithm-facts name="sha0">



</algorithm-facts>

SHA-1 before the fix. FIPS 180 published it in 1993, the NSA withdrew it soon after without naming the flaw, and SHA-1 arrived in 1995 with exactly one change: a one-bit rotation in the message schedule. Same constants, same eighty steps, completely different digests.

That bit mattered. Chabaud and Joux described a collision attack in 1998, a full collision followed in 2004, and in 2005 Wang, Yin and Yu cut the cost to about 2^39 operations.

```ts
create("sha0").hash("abc").digest; // "0164b8a914cd2a5e74c4f7ff082c4d97f1edf880"
create("sha0").hash("").digest; // "f96cea198ad1dd5617ac084a3d92c6107708c0ef"
```

Node's OpenSSL doesn't have it and neither does Python's `hashlib`, which is exactly why a puzzle author reaches for it. Here it's for the exercise sheet, the 1998 paper and that puzzle. For anything real, [SHA-256](https://hashes.agntn.dev/algorithms/sha256).


## Sitemap

See the full [sitemap](https://hashes.agntn.dev/sitemap.md) for all pages.
