Ragbaby Cipher

T
πŸ—
⇄
β†’

The Ragbaby Cipher is a monoalphabetic substitution cipher that uses a keyword to scramble the alphabet while preserving the case of letters. It preserves spaces and faithfully encodes/decode letters according to the keyword mapping.

Ragbaby Cipher: Encoding

To encode using the Ragbaby Cipher with a keyword:

Plaintext: hello WORLD
Key:       keyword

Step 1: Normalize plaintext (case is preserved)
hello WORLD β†’ hello WORLD

Step 2: Apply keyword-based monoalphabetic substitution
Each letter is replaced according to the scrambled alphabet derived from the keyword. Case is preserved.

Example mapping:
h β†’ r
e β†’ i
l β†’ j
o β†’ l
w β†’ Y
r β†’ W
d β†’ K

Step 3: Construct ciphertext
Ciphertext: rijlp YRWRK

Ragbaby Cipher: Decoding

To decode, reverse the substitution using the same keyword and mapping:

Ciphertext: rijlp YRWRK
Key:        keyword

Step 1: Map each ciphertext letter back to plaintext using keyword mapping
r β†’ h
i β†’ e
j β†’ l
l β†’ o
p β†’  
Y β†’ w
R β†’ o
W β†’ r
K β†’ d

Step 2: Reconstruct plaintext
hello WORLD

Ragbaby Cipher: Notes

  • Type: Substitution cipher (monoalphabetic, keyword-based)
  • Key: Scrambles the alphabet to create a unique letter mapping
  • Preserves letter case and spaces
  • Strengths: Simple, visually obfuscates plaintext
  • Weaknesses: Vulnerable to frequency analysis on longer messages