How cataragamihai/apa_course_project works
Intercept & Decode is a bilingual Vigenère cryptanalysis demo. Users choose an archived transmission, run three cracking methods with live progress, and compare results; they can also reveal ground truth, encrypt custom text, and run archive or scaling experiments. The backend is stateless and reads its archive and wordlist from files. Edges reflect shown imports/calls or README-documented HTTP behavior; some experiment and data wiring is documented but not visible in the excerpts.
Main entry points: App.tsx App workflow · main.py FastAPI endpoints · dictionary_attack.py Dictionary attack · brute_force.py Brute-force search
Components 20
User interface
- App workflow
frontend/src/App.tsx - Mission selection
frontend/src/components/MissionSelect.tsx - Transmission view
frontend/src/components/Ciphertext.tsx - Algorithm controls
frontend/src/components/AlgorithmPanel.tsx - Archive mode
frontend/src/components/ArchiveMode.tsx
API and data
- HTTP client
frontend/src/api.ts - FastAPI endpoints
backend/app/main.py - Message archive
backend/app/data - Candidate wordlist
backend/app/data/wordlist.txt
Cryptanalysis
- Brute-force search
backend/app/cracking/brute_force.py - Dictionary attack
backend/app/cracking/dictionary_attack.py - Frequency analysis
backend/app/cracking/frequency_analysis.py - Vigenère cipher
backend/app/cipher.py - English scoring
backend/app/scoring.py
Results and localization
- Backend progress text
backend/app/i18n.py - Results and charts
frontend/src/components/ResultsTable.tsx - Comparison chart
frontend/src/components/ComparisonChart.tsx - Language context
frontend/src/i18n/LanguageContext.tsx - UI translations
frontend/src/i18n/translations.ts
Other components
- User
Connections 34
- User → App workflow: uses
frontend/src/App.tsx - App workflow → Mission selection: renders
frontend/src/App.tsx - App workflow → Transmission view: renders
frontend/src/App.tsx - App workflow → Algorithm controls: renders
frontend/src/App.tsx - App workflow → Archive mode: loads
frontend/src/App.tsx - App workflow → Results and charts: renders
frontend/src/App.tsx - App workflow → Comparison chart: loads
frontend/src/App.tsx - App workflow → Language context: provides
frontend/src/App.tsx - Mission selection → HTTP client: fetches messages
frontend/src/components/MissionSelect.tsx - Transmission view → HTTP client: requests reveal
frontend/src/components/Ciphertext.tsx - Algorithm controls → App workflow: runs via callbacks
frontend/src/App.tsx - App workflow → HTTP client: streams cracks
frontend/src/App.tsx - Archive mode → HTTP client: runs archive
frontend/src/components/ArchiveMode.tsx - HTTP client → FastAPI endpoints: HTTP requests
README.md - FastAPI endpoints → Message archive: reads archive
README.md - FastAPI endpoints → Candidate wordlist: loads candidates
README.md - FastAPI endpoints → Brute-force search: dispatches
backend/app/main.py - FastAPI endpoints → Dictionary attack: dispatches
backend/app/main.py - FastAPI endpoints → Frequency analysis: dispatches
backend/app/main.py - Brute-force search → Vigenère cipher: decrypts candidates
backend/app/cracking/brute_force.py - Brute-force search → English scoring: scores candidates
backend/app/cracking/brute_force.py - Dictionary attack → Vigenère cipher: decrypts candidates
backend/app/cracking/dictionary_attack.py - Dictionary attack → English scoring: scores candidates
backend/app/cracking/dictionary_attack.py - Dictionary attack → Candidate wordlist: tests words
- Frequency analysis → Vigenère cipher: extracts and decrypts
backend/app/cracking/frequency_analysis.py - Frequency analysis → English scoring: scores shifts
backend/app/cracking/frequency_analysis.py - Brute-force search → Backend progress text: formats progress
backend/app/cracking/brute_force.py - Dictionary attack → Backend progress text: formats progress
backend/app/cracking/dictionary_attack.py - Frequency analysis → Backend progress text: formats progress
backend/app/cracking/frequency_analysis.py - Language context → UI translations: selects copy
frontend/src/i18n/LanguageContext.tsx - Results and charts → Language context: reads translations
frontend/src/components/ResultsTable.tsx - Archive mode → Language context: reads translations
frontend/src/components/ArchiveMode.tsx - FastAPI endpoints → Frequency analysis: runs text-length experiments
README.md - FastAPI endpoints → Brute-force search: runs key-length experiments
README.md