diff --git a/app/cipher-identifier/page.tsx b/app/cipher-identifier/page.tsx new file mode 100644 index 00000000..3a6d5958 --- /dev/null +++ b/app/cipher-identifier/page.tsx @@ -0,0 +1,22 @@ +import type { Metadata } from "next"; +import CipherIdentifier from "../../components/cryptanalysis/CipherIdentifier"; +import Navbar from "../../components/layout/Navbar"; +import Footer from "../../components/layout/footer"; + +export const metadata: Metadata = { + title: "Cipher Identifier — Automated Cryptanalysis | CryptoViz", + description: + "Identify unknown ciphertext using automated statistical analysis. Uses frequency analysis, index of coincidence, entropy, Kasiski examination, and pattern matching to classify encryption methods.", +}; + +export default function CipherIdentifierPage() { + return ( +
+ {candidate.explanation} +
+ {candidate.recommendedActions.length > 0 && ( +{value}
+ {sublabel && ( +{sublabel}
+ )} ++ Cryptanalysis Tool +
++ Paste any ciphertext and run automated statistical analysis to identify the likely encryption method. Uses frequency analysis, index of coincidence, entropy, Kasiski examination, and pattern matching. +
++ How It Works +
++ The analyzer computes 12+ statistical metrics and compares them against known signatures for each cipher type. Confidence scores reflect how well the ciphertext matches each cipher's characteristics. +
++ Paste any encrypted text, encoding, or ciphertext for analysis. +
+| Letter | +Count | +Observed % | +English % | +Diff | +
|---|---|---|---|---|
| + {f.letter} + | ++ {f.count} + | ++ {(f.frequency * 100).toFixed(2)}% + | ++ {(f.englishFrequency * 100).toFixed(2)}% + | ++ {f.frequency > f.englishFrequency ? "+" : ""} + {((f.frequency - f.englishFrequency) * 100).toFixed(2)}% + | +
+ No clear cipher pattern detected. Try providing more text. +
++ Measures how likely two randomly chosen letters are the same. + English plaintext ≈ 0.065, random text ≈ 0.038. + + {" "}Current: {report.analysis.indexCoincidence.toFixed(4)} + + {" "}—{" "} + {report.analysis.indexCoincidence > 0.06 + ? "Consistent with monoalphabetic cipher (Caesar, substitution)." + : report.analysis.indexCoincidence > 0.04 + ? "Suggests polyalphabetic encryption (Vigenère)." + : "Consistent with strong encryption or random data."} +
++ Measures information density per character. Normal English ≈ 4.1-4.5 bits, + high entropy (>5.5) suggests encryption or encoding. + + {" "}Current: {report.analysis.entropy.toFixed(2)} bits/char + +
++ Finds repeated sequences and computes distances between them. + Common factors in these distances reveal the key length for polyalphabetic ciphers. + {report.analysis.suggestedKeyLength > 0 && ( + + {" "}Suggested key length: ~{report.analysis.suggestedKeyLength} + + )} +
+{item.desc}
+