# cr-marcstevens/sha1collisiondetection

Library and command line tool to detect SHA-1 collision in a file

Repository: https://github.com/cr-marcstevens/sha1collisiondetection
Canonical: https://ross.abutalabs.com/products/sha1collisiondetection
Language: C
License: NOASSERTION
License Family: other
Last push: 2025-10-30T19:26:00+00:00

## Health v2 (maintenance only)
Score: 45/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 49, release rhythm 8, longevity 100
- inputs: {"age_days": 3515, "days_push": 307, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1414, forks 222 (observed 2026-08-28T04:04:39.517622+00:00)

## What it is
A C library and command-line tool that computes SHA-1 hashes while detecting known cryptanalytic collision attacks against SHA-1 with probability 1. It acts as a near drop-in replacement for sha1sum and common SHA-1 libraries, offering a safe-hash mode that protects applications like digital signature verification from collision forgeries.

## Use cases
- detect sha-1 collision attacks in files
- drop-in replacement for sha1sum with collision detection
- protect digital signatures against sha-1 collision forgeries
- verify files like the shattered pdf collision
- compute safe sha-1 hashes for colliding files
- scan files for cryptanalytic hash collisions

## When to choose
- you must keep using SHA-1 but need protection against known collision attacks
- you want a fast drop-in replacement for sha1sum or existing SHA-1 libraries
- you need to detect forged files created with attacks like SHAttered or Sha-mbles

## When to avoid
- you can migrate to SHA-256 or other modern hash functions instead
- you need detection of arbitrary future collision attacks beyond the top 32 disturbance vectors
- you need a general-purpose cryptographic hashing library with many algorithms

## Facets
- artifact type: library
- maturity: stable
- function: cryptography, security, cli
- domain: security, developer-tools
- platform: windows, cli, cpp, c
- tags: sha1, collision-detection, hashing, counter-cryptanalysis, c, algorithms, linux, macos

## Member repositories
- cr-marcstevens/sha1collisiondetection (main) score 45

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:39.517622+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:38:12.432572+00:00, confidence not recorded.
  - readme: https://github.com/cr-marcstevens/sha1collisiondetection (fetched 2026-08-28T04:04:39.517622+00:00, sha 93a7afbd9852)
- Data as of 2026-08-30T08:39:29.467469+00:00.
