🔐 MLDSC CC6004

Multi-Layer Dynamic Shift Cipher  ·  London Metropolitan University  ·  Network and Cloud Security

⚡ Encrypt
🔓 Decrypt
📊 Step-by-Step
📚 Theory
👥 Team

✏️ Input

Key is hashed via SHA-256 before use — any string is valid.

🔐 Output

Press Encrypt to see the result…

📥 Input

📤 Output

Press Decrypt to see the result…

⚙️ Configure Walkthrough

📐 MLDSC Overview

MLDSC is a symmetric hybrid cipher designed for educational purposes, combining three encryption layers to achieve both confusion and diffusion beyond classical ciphers.
Plaintext
ASCII bytes
Layer 1
Dynamic Shift
Layer 2
Position Transform
Layer 3
XOR
Ciphertext
Hex output
Key Schedule
SHA-256 chain
feeds all three layers ↑

📘 Layer Descriptions

🔑 Key Schedule (SHA-256 Chain)

The secret key is hashed using SHA-256 to produce 32 bytes. The digest is then iteratively re-hashed to generate as many key bytes as needed. This ensures the key schedule is cryptographically unpredictable and non-repeating for reasonable message lengths.

K₀ = SHA256(key)   Kₙ = SHA256(Kₙ₋₁)

⚡ Layer 1 — Dynamic Shift (Polyalphabetic)

Inspired by the Vigenère cipher, each byte is shifted by a value derived from the key schedule. The shift amount varies per character position, defeating frequency analysis.

shiftᵢ = Kᵢ mod 26   b¹ᵢ = (bᵢ + shiftᵢ) mod 256

📍 Layer 2 — Position-Based Transformation

Each byte is additionally shifted by a value derived from its position in the message. Even-indexed bytes are shifted right; odd-indexed bytes are shifted left. This introduces positional diffusion.

posᵢ = i mod 16   b²ᵢ = (b¹ᵢ + posᵢ) mod 256   [if even]   b²ᵢ = (b¹ᵢ − posᵢ) mod 256   [if odd]

⊕ Layer 3 — XOR with Key Byte

The output of Layer 2 is XOR'd with the full key byte. XOR is self-inverse, making decryption straightforward. This layer provides strong confusion — masking the relationship between key and ciphertext.

b³ᵢ = b²ᵢ ⊕ Kᵢ

⚖️ Comparison with Existing Ciphers

CipherTypeKey LengthFrequency Safe?Position-aware?Complexity
CaesarClassical mono1 char✗ No✗ NoVery Low
VigenèreClassical polyAnyPartial✗ NoLow
AES-128Modern block128 bit✓ Yes✓ YesVery High
RSAAsymmetric2048+ bit✓ Yes✓ YesVery High
MLDSCHybrid sym.Any (SHA-256)✓ Yes✓ YesMedium

Strengths & ⚠️ Weaknesses

✅ Strengths

  • Three-layer architecture adds redundant confusion
  • SHA-256 key schedule is cryptographically secure
  • Position-aware — same character encrypts differently per position
  • No fixed-length block constraint
  • Simple to implement; educational clarity
  • Resistant to basic frequency analysis

⚠️ Weaknesses

  • No avalanche effect — changing 1 bit affects only 1 byte
  • No authenticated encryption (no HMAC / MAC)
  • Operates byte-by-byte, not in blocks — no MixColumns equivalent
  • Not suitable for production — not peer-reviewed
  • Key management relies on user's password strength
  • Vulnerable to known-plaintext attack if key reused

👥 Team — Task Allocation

MemberRoleResponsibilitiesTools Used
Dumitru Tanasie Lead Developer & Cipher Architect Designed MLDSC cipher; implemented all Python code; integrated key schedule; testing Python 3 GitHub SHA-256
Muzhgan Research Lead Literature review; analysis of Caesar, Vigenère, AES, RSA; inspired cipher layers Google Scholar IEEE Xplore
Ryan Security Analyst Strength/weakness evaluation; attack analysis; CIA triad application Journals NIST docs
Demi Documentation Lead Report structure, academic writing, Harvard referencing, formatting MS Word Grammarly
Gemechu Implementation Support Assisted coding; debugging; testing edge cases; Python environment setup Python 3 VS Code
Halima Diagram & Design Lead Flowcharts; encryption/decryption diagrams; visual aids; presentation slides Draw.io PowerPoint
Shivas Abdulah Testing Lead Black-box test cases; validation; test table documentation; edge-case testing Python unittest
Sabeeh Evaluation Specialist Performance testing; real-world application suitability; comparison analysis Excel Python
Mariam Academic Skills & Reflection Reflection section; research methodology; library resources; attendance tracking LMU Library RefWorks

📋 Module Information

Module: CC6004 Network and Cloud Security
University: London Metropolitan University
School: School of Computing & Digital Media
Assessment: Group Coursework (50%)
Submission: Tuesday 28 April 2026 — 3:00 PM
Referencing: Harvard Style
Cipher Name: MLDSC (Multi-Layer Dynamic Shift Cipher)
Language: Python 3
Key Length: Any (expanded via SHA-256)
Block Size: Stream (byte-by-byte)
AI Use: Structure & debugging support only
Mark Distribution: Proportional to contribution