https://github.com/copyleftdev/rrdeep

Rust implementation of Context-Triggered Piecewise Hashing (CTPH), inspired by tools like **ssdeep**

https://github.com/copyleftdev/rrdeep

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.5%) to scientific vocabulary

Keywords

cli foresics rust security testing-tools tooling
Last synced: 5 months ago · JSON representation

Repository

Rust implementation of Context-Triggered Piecewise Hashing (CTPH), inspired by tools like **ssdeep**

Basic Info
  • Host: GitHub
  • Owner: copyleftdev
  • License: other
  • Language: Rust
  • Default Branch: main
  • Homepage: https://rrdeep.vercel.app/
  • Size: 25.4 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
cli foresics rust security testing-tools tooling
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

rrdeep

Rust

rrdeep is a Rust implementation of Context-Triggered Piecewise Hashing (CTPH), inspired by tools like ssdeep. It computes spamsum-style fuzzy-hash signatures for files and compares them to gauge approximate similarity. This is especially useful for malware detection, data deduplication, forensics, or any use case where identifying partially matching data is key.

Features

  • Concurrent I/O: Uses a producer/consumer model to read and process large files in parallel.
  • Minimal Memory Usage: Streams data in 64 KB chunks, preventing the need to load entire files into memory.
  • Performance Metrics: Provides optional timing and throughput data (MB/s).
  • Score Capped at 100: Yields an integer similarity score from 0 to 100.
  • CLI Support: Compare two files (compare-files) or two fuzzy-hash signatures (compare).

Building

You need Rust (1.60+ recommended) and Cargo installed. Then run:

bash cargo build --release

This compiles the rrdeep binary into target/release/rrdeep.

Usage

  1. Compare two files: bash ./target/release/rrdeep compare-files file1 file2 Outputs fuzzy-hash signatures, a similarity score, and optional performance metrics.

  2. Compare two signatures: bash ./target/release/rrdeep compare "ABCDEF:ABCDEF:4" "XYZXYZ:XYZXYZ:4" Prints a similarity score and a short “Similar,” “Very Similar,” or “Different” result.

For help, just run: bash ./target/release/rrdeep --help

Example

```bash $ ./target/release/rrdeep compare-files a.txt b.txt

[RRDeep] Comparing: a.txt - Size: 14 bytes - Modified: 2025-01-22 06:29:03

b.txt - Size: 11 bytes - Modified: 2025-01-22 06:29:06

Signatures: a.txt -> AbCD:AbCD:1 b.txt -> XYZA:XYZA:1

Similarity Score: 62 Result: Similar

Performance Metrics: a.txt => processed 14 bytes in 0.000s => N/A MB/s b.txt => processed 11 bytes in 0.000s => N/A MB/s ```

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

See LICENSE for full details.


Owner

  • Name: Donald Johnson
  • Login: copyleftdev
  • Kind: user
  • Location: Los Angeles

GitHub Events

Total
  • Push event: 5
  • Create event: 2
Last Year
  • Push event: 5
  • Create event: 2

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels