VIBGYOR - Cipher

Numbers
Violet
Indigo
Blue
Green
Yellow
Orange
Red
1
A       

B
C
D
E
F
G

2
H

I               

J
K
L
M

N
3
O

P
Q

R
S

T
U
4
V

W
X
Y

Z













This is the base code table which we use as key for reaching our main reference table. A sequence of letters will be given along with 2 numbers of which first is less than 7 and the other is less than 4. The first number indicates the column replacement and the second number indicates row replacement on the base key table to reach the main reference table.

Let’s try an example….



Here we can see that the given code is
G1,Y1,V1,O3,V2  and the replacement numbers are 4,4.
So, on replacement the reference table looks like….

Old Numbers
New Numbers
Green  
Yellow
Orange
Red
Violet
Indigo
Blue
4
1
V
W
X
Y
Z


1
2
A
B
C
D
E
F
G
2
3
H
I
J
K
L
M
N
3
4
O
P
Q
R
S
T
U

As the column replacement number is 4, the fourth column of the base table replaces the first column and further replacement goes in cyclic order. Similarly as the row replacement number is 4, the fourth row of the base table is replaced with the first row and the order is cyclic.
Comparing reference to base
 G ---> R
Y ---> V
V ---> G
O ---> I
The row comparison gives the new placement as   4 1 2 3.
Hence G1 Y1 V1 O3 V2  changes as R2 V2 G2 I4 G3 which clearly indicates the word “DEATH” from reference table.