ZygaZyfa Encryption Methods

© Ray Crowther 2022

ZygaZyfa is a flexible message encryption/decryption technique.

Three components are required to encrypt/decrypt a message.

1) Character Set
You can choose a character set from which to create your message. The default is A-Z for simple alphabetic messages. The order of the characters is significant. Each required character should only appear in the set once.
If you use a different character set the recipient will need to know it to be able to decode the message.

For alphanumeric numeric messages you could choose: A-Z followed by 0-9.
For basic numeric messages choose simply: 0-9.
For a comprehensive set of keyboard characters choose the ASCII printable set of:  !'"#$%&'()*+,-./0123456789;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (Note the first character in the list is Space)
You could target your set to just comprise the characters you require for a specific type of message. For example if you wish to encode latitude and longitude coordinates like N51°32'56"E07°48'19" you would choose, say, '"0123456789ENSW°.

2) Key Phrase
A Key Phrase is always required. The characters chosen must be from your defined Character Set. The recipient will need to know your Key Phrase to decode the message.
The Key Phrase could be something agreed is advance. For example, all messages transmitted on a Wednesday could have the phrase TODAYISWEDNESDAY (using the default Character Set).
The Key Phrase is compressed before the encryption takes place to remove repeated characters. The above phrase would reduce to TODAYISWEN.

3) Iterator
 An iterator specifies the number of steps that the encryption technique is executed before the message encoding is started. The default number is the length of the compressed Key Phrase. With the example in 2) the iterator would be 10.

Basic Steps (Standard Alphabetic Character Set Encryption)

Choose an alphabetic key phrase e.g. Today is Wednesday.

Reduce to a sequence of unique letters without spaces i.e. TodayisWen

Write this sequence as the first row of a table (see below) followed by other unused letters in alphabetic order.

Since the length of the reduced phrase is 10 letters, perform the following operation 10 times:

T is followed by O (15th letter of the alphabet) put T in column 15 of row 2.
O is followed by D (4th letter of the alphabet) put O in column 4 of row 2.
D is followed by A (1st letter of the alphabet) put D in column 1 of row 2.
A is followed by Y (25th letter of the alphabet) put A in column 25 of row 2.

X is followed by Z (26th letter of the alphabet) put X in column 26 of row 2.
Z is “followed by (wrapping around)” T (20th letter of the alphabet put Z in column 20 of row 2.

You will end up with row 11.

If the alphabetic message you wish to encode is, say, THE TREASURE IS UNDER THE STONE:

In row 11, T is in the 22nd column so it is encoded as the 22nd character in the set, V. Iterate to give row 12.
In row 12, H is in the 6th column so it is encoded as the 6th character in the set, F. Iterate to give row 13.
In row 13, E is in the 12th column so it is encoded as L. Iterate to give row 14.
Ignore spaces as they are not included in the character set.
In row 14, T is in the 4th column so it is encoded as C. Iterate to give row 15.
etc. to row 36.

The encrypted message will be: VFLCNXCEHEAVLFHETIWMPJVARX

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

1

T

O

D

A

Y

I

S

W

E

N

B

C

F

G

H

J

K

L

M

P

Q

R

U

V

X

Z

2

D

N

B

O

W

C

F

G

Y

H

J

K

L

E

T

M

P

Q

I

Z

R

U

S

V

A

X

3

V N W X L C F Y Q H J K T D B M P Z U E R S O A G I

10

B

K

A

C

R

M

L

P

G

H

I

X

E

W

D

O

Y

U

F

J

Q

N

S

Z

T

V

11

K

V

A

W

X

U

P

G

H

F

B

M

R

Q

D

L

J

C

N

Z

Y

T

E

I

O

S

12

V

F J Q T H P G E L S D B C I U R M O Y X K A W Z N
13 K D B S G V P T C F X E R Z M H J U L Q I N A Y O W

14

N D T K X C S M Q H W U Z I Y V L E B P J G O F A R

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

36

Q U H B K M Z D F Y J V T C I L W O X P R A G E N S

Basic Steps (Numeric Character Set Encryption)

Choose a numeric key phrase e.g. 638672095637.

Reduce to a sequence of unique numbers i.e. 63872095

Write this sequence as the first row of a table (see below) followed by other unused single digits in numerical order.

Since the length of the reduced phrase is 8 numbers, perform the following operation 8 times:

6 is followed by 3, put 6 in column 3 of row 2.
3 is followed by 8, put 3 in column 8 of row 2.
8 is followed by 7, put 8 in column 7 of row 2.
7 is followed by 2, put 7 in column 2 of row 2.

4 is "followed by" 6 (wrap around) put 4 in column 6 of row 2.

You will end up with row 9.

If the numeric message you wish to encode is, say, 12345678901234567890:

In row 9, 1 is in the 5th column so it is encoded as 5. Iterate to give row 10.
In row 10, 2 is in the 4th column so it is encoded as 4. Iterate to give row 11.
In row 11, 3 is in the 1st column so it is encoded as 1. Iterate to give row 12.
In row 12, 4 is in the 9th column so it is encoded as 9. Iterate to give row 13.
etc. to row 28.

The encrypted numbers will be: 54194102690185391418

  0 1 2 3 4 5 6 7 8 9
1 6 3 8 7 2 0 9 5 1 4
2 2 5 7 6 1 9 4 8 3 9
3 3 6 0 8 9 2 7 5 4 1
4 6 4 9 1 5 7 3 2 0 8
. . . . . . . . . . .
9 9 7 0 8 5 1 3 2 4 6
10 7 5 3 1 2 8 4 9 0 6
11 9 3 1 5 8 7 0 6 2 4
12 7 3 6 9 2 1 0 8 5 4
. . . . . . . . . . .
28 9 8 3 4 7 2 5 1 0 6

Additional examples and software tools will be published later.

Ray Crowther
April 18, 2022