Rail Fence Cipher

Rail fence cipher encryption and decryption, writes plaintext in zigzag and reads row by row.

Configuration

Encrypt

Decrypt

Instructions

Algorithm Principle

Rail fence cipher writes plaintext in a zigzag pattern across the specified number of rows, then reads row by row to produce ciphertext.

Steps

1. Enter the number of rails (rows, at least 2); 2. Enter plaintext, click 'Encrypt' to get ciphertext; 3. Enter ciphertext, click 'Decrypt' to restore plaintext.

Notes

Number of rails must be >= 2; rail fence cipher is a transposition cipher that only changes character order, not the characters themselves; low security, for educational demonstration only.