Files

18 lines
541 B
Markdown
Raw Permalink Normal View History

# Example 04: Identity Verification with Safety Numbers
Shows how two parties can compare safety numbers (60-digit fingerprints) out-of-band to detect a man-in-the-middle attack at session establishment.
## Run
```bash
bun run main.ts
```
## What it shows
- Generating identity fingerprints
- The "safety number" format (12 groups of 5 digits)
- Comparing fingerprints to verify a peer's identity
- What it looks like when a MITM is attempted (different fingerprint)
- `acceptIdentityChange()` for handling legitimate identity rotation