# 🎯 QUICK ANSWER: How to Solve This CTF Challenge

## The Solution in One Sentence

**Use MD5 collision attacks to create two different PNG files with the same hash that classify as different digits.**

## Why This is The Only Solution

After exhaustive testing:
- ✅ No bugs in the code
- ✅ Everything is deterministic
- ✅ The MD5 check is strict and unavoidable
- ✅ You MUST have `md5(img1) == md5(img2)` but `classify(img1) != classify(img2)`

## What You Need to Learn/Use

1. **HashClash** - MD5 collision generation tool
   - Repo: https://github.com/cr-marcstevens/hashclash
   - Creates chosen-prefix collisions
   - Can make two different files have same MD5

2. **PNG Format** - Understanding PNG chunks
   - Ancillary chunks (tEXt, iTXt, etc.) can store collision blocks
   - Critical chunks (IDAT, IHDR) contain actual image data
   - Can embed collision without breaking the image

3. **Adversarial Examples** - Creating misclassified digits
   - Use FGSM, PGD, or manual pixel manipulation
   - Make a "0" that classifies as "1", etc.
   - Stay within pixel budgets (10-65 pixels per pair)

## Step-by-Step Process

```
1. Create base adversarial images
   └─> Use reference images + adversarial attack
   └─> Ensure they classify correctly

2. Generate MD5 collision blocks  
   └─> Use HashClash with chosen-prefix
   └─> Input: two different PNG prefixes
   └─> Output: collision blocks

3. Embed collision in PNGs
   └─> Add to PNG ancillary chunks
   └─> Maintain valid PNG format
   └─> Verify MD5 matches

4. Test and iterate
   └─> Check MD5 hash matches
   └─> Check classifications differ
   └─> Repeat for all 10 pairs

5. Submit solution
   └─> Package in ZIP
   └─> Submit to server
   └─> Get flag!
```

## Difficulty Level

- **CTF Points**: 400-500 (very hard)
- **Time Needed**: 4-8 hours with experience
- **Skills**: Crypto + ML + File Formats

## Local Testing

Your environment is already set up! Run:
```bash
python test_client.py  # Test submissions
python analyze_challenge.py  # See requirements
```

## Resources to Get Started

1. **Learn about MD5 collisions**:
   - "Chosen-Prefix Collisions for MD5" paper by Marc Stevens
   - HashClash documentation

2. **Study similar CTF challenges**:
   - Search "MD5 collision CTF writeup"
   - Look for PNG collision examples

3. **Understand PNG format**:
   - PNG specification
   - Chunk structure documentation

## The "Aha!" Moment

The challenge title "**Nothing Ever Changes**" refers to:
- The **bytes** don't change (same MD5)
- But the **meaning** changes (different classification)

This is the essence of both MD5 collisions AND adversarial examples!

---

**TL;DR**: Install HashClash, create adversarial digit images, generate MD5 collisions, embed in PNGs, submit. Good luck! 🚀
