Skip to content

forbiddenlink/encryption-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Encryption Visualizer

Interactive educational platform for learning cryptographic algorithms through real-time visualizations

License React TypeScript Status

๐ŸŽฏ Overview

Encryption Visualizer is an interactive web application that demystifies complex cryptographic algorithms through step-by-step visualizations. Perfect for students, educators, developers, and security enthusiasts who want to understand how encryption actually works under the hood.

Why This Project?

Cryptography concepts are notoriously abstract and difficult to grasp. By visualizing each transformation, from plaintext to ciphertext, learners can:

  • See how data transforms at each step
  • Understand the mathematical operations involved
  • Compare different algorithms side-by-side
  • Experiment with custom inputs and keys
  • Learn security best practices through interactive content

โœจ Features

๐ŸŽจ Interactive Visualizations

AES (Advanced Encryption Standard)

  • Step-by-step encryption/decryption process
  • Key expansion visualization
  • State matrix transformations (SubBytes, ShiftRows, MixColumns, AddRoundKey)
  • Support for 128, 192, and 256-bit keys
  • Real-time byte-level color coding

RSA (Public Key Cryptography)

  • Prime number generation visualization
  • Modular arithmetic demonstrations
  • Public/private key pair creation
  • Encryption/decryption with mathematical notation
  • Padding schemes explained

Hashing Algorithms

  • SHA-256 round-by-round visualization
  • Avalanche effect demonstration
  • Hash comparison tool
  • Multiple algorithms (SHA-256, SHA-1, MD5)
  • Security warnings for deprecated methods

๐ŸŽ“ Educational Features

  • Guided Tours: Structured learning paths for different skill levels
  • Interactive Quizzes: Test your understanding after each module
  • Glossary: Comprehensive cryptography terminology
  • Best Practices: Industry-standard security recommendations
  • Real-World Examples: HTTPS, E2EE, digital signatures, and more

๐ŸŽฎ User Experience

  • Playback Controls: Play, pause, step forward/backward
  • Speed Control: Adjust animation speed to your learning pace
  • Dark/Light Modes: Eye-friendly viewing options
  • Fully Responsive: Works on desktop, tablet, and mobile
  • Accessible: WCAG 2.1 AA compliant

๐Ÿ› ๏ธ Tech Stack

Frontend

  • Framework: React 18+ with TypeScript
  • State Management: Zustand
  • Styling: Tailwind CSS + Shadcn/ui components
  • Animation: Framer Motion + React Spring
  • Visualization: D3.js v7+, Visx
  • Routing: React Router v6

Cryptography

  • Browser: Web Crypto API (SubtleCrypto)
  • Educational: Custom step-by-step implementations
  • Libraries: js-sha256, custom AES/RSA implementations

Development

  • Build Tool: Vite
  • Package Manager: pnpm
  • Testing: Vitest (unit), Playwright (e2e)
  • Linting: ESLint + Prettier
  • Type Checking: TypeScript strict mode

Deployment

  • Hosting: Vercel / Netlify
  • CI/CD: GitHub Actions
  • Performance: Lighthouse score > 90

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 20+ (download)
  • pnpm 8+ (npm install -g pnpm)
  • Git

Installation

# Clone the repository
git clone https://github.com/yourusername/encryption-visualizer.git
cd encryption-visualizer

# Install dependencies
pnpm install

# Start development server
pnpm dev

Visit http://localhost:3000 to see the app in action!

Available Scripts

pnpm dev          # Start development server
pnpm build        # Build for production
pnpm preview      # Preview production build
pnpm lint         # Lint code
pnpm lint:fix     # Fix linting errors
pnpm format       # Format code with Prettier
pnpm test         # Run unit tests
pnpm test:ui      # Run tests with UI
pnpm test:e2e     # Run end-to-end tests
pnpm type-check   # Check TypeScript types

๐Ÿ“š Documentation

๐ŸŽฏ Start Here

  • START_HERE.md โญ Read This First!
    • Complete project overview
    • Documentation guide
    • What we've covered (85+ areas)
    • Next steps

๐Ÿ“‹ Planning & Critical Documents

  • GAP_ANALYSIS.md ๐Ÿ” What Could Go Wrong

    • 10 critical failure points & solutions
    • Infrastructure, scalability, UX, security
    • Financial planning & business strategy
    • Launch & growth strategy
  • PREFLIGHT_CHECKLIST.md โœ… Are You Ready?

    • 9-phase comprehensive checklist
    • 100+ readiness checkpoints
    • Red flags vs. green lights
    • 80/20 rule (essential 20%)
  • PROJECT_PLAN.md ๐Ÿ“… 16-Week Roadmap

    • Complete development timeline
    • 13 phases with milestones
    • MVP โ†’ Full Platform โ†’ Advanced Features
    • Resource allocation & scheduling
  • FEATURES.md ๐ŸŽฏ Complete Feature Specification

    • All 75+ features organized by priority
    • MVP (Weeks 1-4)
    • Core Platform (Weeks 5-8)
    • Advanced (Weeks 9-12)
    • Cutting-Edge (Weeks 13-16)
    • User stories & acceptance criteria

๐Ÿ”ง Technical Documentation

  • TECH_SPEC.md โš™๏ธ Implementation Blueprint

    • Technical architecture
    • Data models & schemas
    • Crypto implementations
    • Animation strategies
    • Performance optimization
  • ARCHITECTURE_DIAGRAM.md ๐Ÿ“Š Visual Diagrams

    • System architecture
    • Data flow diagrams
    • Component hierarchy
    • File organization
  • GETTING_STARTED.md ๐Ÿ› ๏ธ Setup Guide

    • Environment setup
    • Installation steps
    • Initial code templates
    • Troubleshooting

๐Ÿ“– Documentation Guide by Role

For Developers (Start Here):

  1. START_HERE.md (15 min)
  2. TECH_SPEC.md (45 min)
  3. GETTING_STARTED.md (2-3 hours)
  4. Start building!

For Project Managers:

  1. START_HERE.md (15 min)
  2. PROJECT_PLAN.md (30 min)
  3. GAP_ANALYSIS.md (60 min)
  4. PREFLIGHT_CHECKLIST.md (40 min)

For Stakeholders/Investors:

  1. START_HERE.md (15 min)
  2. GAP_ANALYSIS.md - Business section (20 min)
  3. FEATURES.md - Skim highlights (15 min)

For Learners/Users:

  1. README.md (this file)
  2. Try the live demo (when available)
  3. Explore visualizations

๐Ÿ” Quick Navigation

I want to... Go to...
Understand the project START_HERE.md
See what could go wrong GAP_ANALYSIS.md
Check if ready to build PREFLIGHT_CHECKLIST.md
See the timeline PROJECT_PLAN.md
Browse all features FEATURES.md
Understand architecture TECH_SPEC.md
See visual diagrams ARCHITECTURE_DIAGRAM.md
Set up my environment GETTING_STARTED.md
Start coding Follow GETTING_STARTED.md, then PROJECT_PLAN.md Phase 1

๐Ÿ—๏ธ Project Structure

encryption-visualizer/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/          # React components
โ”‚   โ”‚   โ”œโ”€โ”€ ui/             # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ visualizations/ # Algorithm visualizations
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ AES/        # AES-specific components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ RSA/        # RSA-specific components
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Hashing/    # Hashing visualizations
โ”‚   โ”‚   โ”œโ”€โ”€ controls/       # Playback controls
โ”‚   โ”‚   โ”œโ”€โ”€ education/      # Educational content
โ”‚   โ”‚   โ””โ”€โ”€ layout/         # Layout components
โ”‚   โ”œโ”€โ”€ lib/                # Core libraries
โ”‚   โ”‚   โ”œโ”€โ”€ crypto/         # Crypto implementations
โ”‚   โ”‚   โ”œโ”€โ”€ utils/          # Helper functions
โ”‚   โ”‚   โ””โ”€โ”€ types/          # TypeScript types
โ”‚   โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”‚   โ”œโ”€โ”€ store/              # State management
โ”‚   โ”œโ”€โ”€ pages/              # Application pages
โ”‚   โ””โ”€โ”€ styles/             # Global styles
โ”œโ”€โ”€ public/                 # Static assets
โ”œโ”€โ”€ tests/                  # Test files
โ””โ”€โ”€ docs/                   # Documentation

๐ŸŽฏ Development Roadmap

Phase 1: Foundation (Week 1) โœ…

  • Project setup
  • Core infrastructure
  • AES visualization Part 1

Phase 2: Core Features (Week 2)

  • Complete AES visualization
  • RSA visualization
  • Hashing visualization
  • Testing & polish

Phase 3: Educational Content (Days 8-10)

  • Guided tours
  • Quiz system
  • Glossary
  • Best practices guide

Phase 4: Enhancement (Days 11-14)

  • Comparison tools
  • Theme toggle
  • Share functionality
  • Performance optimization

Phase 5: Advanced Features (Weeks 3-4)

  • Elliptic Curve Cryptography
  • Diffie-Hellman key exchange
  • TLS handshake simulation
  • Digital signature demos

Phases 6-13: Next-Gen Platform (Weeks 5-16) ๐Ÿš€

See FEATURES.md for complete details on all 75+ features

  • ๐ŸŽฎ Gamification (achievements, challenges, XP system)
  • ๐Ÿค– AI-powered learning assistant
  • ๐ŸŽจ 3D visualizations (React Three Fiber)
  • ๐Ÿ“ฑ Progressive Web App (offline-first)
  • ๐ŸŽญ Role-playing scenarios
  • ๐Ÿ”ฎ Post-quantum cryptography
  • ๐ŸŒ Real-time collaboration
  • ๐ŸŒ Multi-language support (8+ languages)
  • ๐Ÿ“Š Learning analytics dashboard
  • ๐ŸŽฅ Export tools (video, GIF, slides)
  • ๐Ÿ” Security best practices checker
  • โ™ฟ Enhanced accessibility (WCAG 2.2/3.0)
  • ๐Ÿฅฝ WebXR (AR/VR) integration
  • ๐ŸŽ–๏ธ Blockchain-verified certificates
  • ๐ŸŽฏ CTF (Capture the Flag) platform

๐Ÿงช Testing

We maintain high code quality through comprehensive testing:

Unit Tests

pnpm test
  • Cryptographic algorithm accuracy
  • State management logic
  • Component rendering
  • Utility functions

Integration Tests

pnpm test:e2e
  • Complete algorithm flows
  • User interactions
  • State transitions
  • Cross-browser compatibility

Code Coverage

Target: >80% code coverage

๐Ÿ” Security

This is an educational platform designed to teach cryptographic concepts. Important notes:

โš ๏ธ NOT FOR PRODUCTION USE: The step-by-step implementations are designed for learning, not security.

โœ… For Production: Always use:

  • Web Crypto API (SubtleCrypto)
  • Battle-tested libraries (libsodium, OpenSSL)
  • Security audited code

Security Features in This App

  • Input sanitization
  • XSS protection
  • Content Security Policy
  • No data collection
  • Local-only processing

๐Ÿค Contributing

Contributions are welcome! This project is perfect for:

  • First-time open source contributors
  • Students learning React/TypeScript
  • Cryptography enthusiasts
  • Educators creating learning materials

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (pnpm test)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Contribution Ideas

  • Add new algorithms (ChaCha20, ECC)
  • Improve visualizations
  • Add more educational content
  • Translate to other languages
  • Improve accessibility
  • Write more tests
  • Fix bugs

๐Ÿ“– Learning Resources

Cryptography

Development

Inspiration

๐ŸŽ“ Educational Value

Skills You'll Learn Building This

Frontend Development:

  • Advanced React patterns (hooks, context, composition)
  • TypeScript type system mastery
  • Complex state management
  • Performance optimization
  • Animation techniques
  • Responsive design

Cryptography:

  • Symmetric encryption (AES)
  • Asymmetric encryption (RSA, ECC)
  • Hash functions and their properties
  • Key management principles
  • Digital signatures
  • Cryptographic protocols

Software Engineering:

  • Clean architecture
  • Testing strategies
  • Documentation practices
  • Code review process
  • Version control workflows

๐Ÿ† Project Goals

Technical Goals

  • โœ… Modern, maintainable codebase
  • โœ… >90 Lighthouse score
  • โœ… WCAG 2.1 AA accessibility
  • โœ… >80% test coverage
  • โœ… Comprehensive documentation

Educational Goals

  • โœ… Clear, accurate algorithm explanations
  • โœ… Intuitive, engaging visualizations
  • โœ… Progressive learning paths
  • โœ… Real-world context and examples
  • โœ… Security best practices emphasis

Community Goals

  • โœ… Open source contribution
  • โœ… Educational resource sharing
  • โœ… Cryptography awareness
  • โœ… Developer learning platform

๐Ÿ“Š Performance Targets

  • Initial Load: < 2 seconds
  • Time to Interactive: < 3 seconds
  • Lighthouse Performance: > 90
  • Lighthouse Accessibility: 100
  • Animation Frame Rate: 60fps
  • Bundle Size: < 500KB (gzipped)

๐ŸŒ Browser Support

  • Chrome 90+
  • Firefox 88+
  • Safari 14+
  • Edge 90+

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • NIST for cryptographic standards
  • CrypTool for inspiration
  • React community for excellent tools
  • Open source contributors everywhere

๐Ÿ“ง Contact

๐ŸŒŸ Show Your Support

If you find this project helpful:

  • โญ Star this repository
  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest features
  • ๐Ÿ“ Improve documentation
  • ๐Ÿ”„ Share with others

Built with โค๏ธ for the security education community

Get Started โ€ข Documentation โ€ข Contributing

About

Interactive educational platform for learning cryptographic algorithms through real-time visualizations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages