Skip to main content

Cipher

A modern implementation of the Caesar Cipher with an enhanced rolling key feature for improved security.

Project Overview

This web application implements an enhanced version of the classic Caesar Cipher, featuring a rolling key system that changes the encryption pattern for each letter. It provides a user-friendly interface for encrypting and decrypting messages with customizable security parameters.

Key Technologies

JavaScript (ES6+)
HTML5
CSS3

How It Works

Two-Key System

  • Base Key: Determines initial shift amount (0-25)
  • Increment Key: Determines shift increase per letter (0-25)

Example

With base key = 1 and increment key = 1:

  • First letter moves 1 place
  • Second letter moves 2 places
  • Third letter moves 3 places
  • And so on...

So "hello" becomes "igpmo":

  • h → i (1 place)
  • e → g (2 places)
  • l → p (3 places)
  • l → m (4 places)
  • o → o (5 places)

How to Use

  1. Enter Your Message:
    • Type your message in the textarea
    • Maximum 1000 characters allowed
  2. Set Your Keys:
    • Enter a base key (0-25)
    • Enter an increment key (0-25)
  3. Choose Operation:
    • Select "Encode" to encrypt
    • Select "Decode" to decrypt
  4. View Results:
    • Result appears in output box
    • Use "Copy" to copy result
    • Use "Clear" to reset fields

Technical Details

Implementation

  • Built with vanilla JavaScript
  • No external dependencies
  • Mobile-first responsive design
  • WCAG 2.1 compliant accessibility

Security Notes

  • Enhanced Security with rolling key system
  • Real-time encryption/decryption
  • User-friendly interface
  • Accessibility features
  • Responsive design
  • Light and dark mode support
  • Character counting
  • One-click copy functionality

Project Links