### Harikavach ( Level 4 ) The Scramble Clock.

New to Harikavach >>  Harikavach Introduction

Level 4 -- HariKavach

New devices for this level are Scramble Clock and it's companion Scramble Box.

### The Scramble Clock

The scramble clock like our regular clock has Hour Hand and Minute Hand. Instead of  "12" we use "0".  The Hour Hand would normally move from 0 to 3 to 6 and so on. Same way the Minute Hand would move from 0 to 3 to 6 and so on.

This clock will give us the Scramble KeyThe key in the scramble clock is formed using the Hour Hand and the Minute Hand. In the diagram above the Hour Hand is at 2 and the Minute hand is at 8.

So the key is   2:40

In level 4 , The Hour hand and the Minute Hand must be in the opposite halves. So if Hour Hand is on the right side, the Minute Hand must be on the left side.

The Scramble Box

Scramble Box ( Capacity 144 characters )

Note we can increase this capacity if we change the resolution of minutes

 0 5 10 15 20 25 30 35 40 45 50 55 0 1 2 3 4 5 6 7 8 9 10 11

This box can store 144 symbols. Each entry in the Box corresponds to time interval on the Scramble Clock. Each hour is represented by a row. Every 5 minutes interval is represented as a cell in the row. By changing the minute interval we can increase the number of cells in every row and hence the symbol storing capacity of the Box.

In the given example we consider the minute interval to be of 5 minutes. Hence the box can store 144 intervals ( Symbols ) .

Text to be Scrambled

I have used simple English message instead of Harikavach encoded message to keep things simple and comprehensible.

Text to be scrambled using Scramble Clock.

Pattern is a solution to a problem in context. It is a unit of expression that captures experience and enables reuse. It is relevant to all topics.

How to Scramble using Scramble Clock and Scramble Box

As the scramble key is   2:40

• The Hour Hand is pointing to 2 in the Scramble Clock . This corresponds to Row 2 of the Scramble Box.
• The Minute Hand is pointing to 8 in the Scramble Clock. This corresponds to Row 8 of the Scramble Box.

The scrambling will follow 4 direction.

• From the default position of Hour Hand move towards 0.Lets call it Flow1.This means moving from Row 2 towards Row 0 in Scramble Box and filling the box from right  to left.
• From the default position of Minute Hand move towards 0.Lets call it Flow2.This means moving from Row 8 towards Row 11 in Scramble Box and filling the box from left  to right.
• From the default position of  Hour Hand move towards 6.Lets call it Flow3.This means moving from Row 2 towards Row 6 in Scramble Box and filling the box from left  to right.
• Form the default position of Minute Hand move towards 6.Lets call it Flow4.This means moving from Row 8 towards Row 6 in Scramble Box and filling the box from right to left.

Scramble Algorithm

2. Write the first alphabet in Flow1
3. Write the second alphabet in Flow2.
4. Continue writing alphabets in Flow1 and Flow2 alternately.
5. If you reach 0 in Flow1 then Flow3 follows Flow1.
6. If you reach 0 in Flow2 then Flow4 follows Flow2.
7. Continue Flow3 until you reach 6.
8. Continue Flow4 until you reach 6.

Scramble the Text Message

Follow the steps of scramble Algorithm to fill up the Box.

Scramble Box ( Capacity 144 characters )

 0 5 10 15 20 25 30 35 40 45 50 55 0 sp I t e n c n sp e b r sp 1 sp t n i u o sp sp i n e t 2 P s a u i sp f e p e s o 3 sp h t c p u e sp x e i n 4 e a d e a l s r u e I sp 5 s r l v n sp o l sp o i s 6 c p t l a sp t t a e e sp 7 i t . s e sp e b n sp n sp 8 a t r sp s a s l t o sp o 9 a p o l m i sp o t x . t 10 i sp sp n t o sp x r s i n 11 t a sp a t r s e p r e c

So the scrambled message is

• Please note that space is being represented as sp.
• In HariKavach it will not be the English message but the encoded HariKavach message that will be placed in the scramble box.

Descrambling

• Once you get the scrambled message fill the message in the scramble box from 0 to 11 rows. Each row must be filled from left to right.

• Now obtain the scramble key. ie 2:40 . How to obtain the scramble key is an open ended question. Normally scramble key would be known in advance. We can also use some out of band signalling. If a messenger is carrying the message. The color of his clothes or the ornaments he wears can determine the scramble key.The minute resolution is 5 minutes in this example , however if kept variable, must be communicated.

• Identity the four flows. Flow1, Flow2, Flow3 and Flow4. Write down the actual message by travelling with the flows as mentioned in the Scramble Algorithm.

Steps for Game Level 4

Encoding and Scrambling.

1. You will be given an English Statement
2. Using the Encode Key you will convert the English Statement in Harikavach symbols.
3. Using the Scramble Key, Scramble Clock and Scramble Box you will scramble the Harikavach message into a scrambled message.

Descrambling and Decoding

1. Descramble the message using Scramble Key, Scramble Clock and Scramble Box.
2. Decode the Harikavach message using Encode Key.

This is good post sir. This algorithm is providing the diffusion mechanism.

But I see quite a few issues in here. I am trying to look at this algorithm from hackers perspective.

1. Algorithm has very limited key space. By using a clock, considering minute interval to 1 minute. my key space will be 12*60 = 720. i.e. I have 720 possible keys maximum using clock.
2. Algorithm is not providing any confusion mechanism. Which was provided by the earlier substitution algorithm. The characters in the output encoded text are same as the input text.

From the attack point of view. I know what all letters are being used and those are preserved in final output. So I need not worry about searching for substitution in final output to generate original text.
Attackers work is to keep on arranging scrambled data until it makes sense to him that too in limited key space.

One suggestion I could make is algorithm can make use of both confusion and diffusion technique to generate something more stronger. That is what exactly done by the latest algorithms like AES. It has sufficient amount of confusion and diffusion and that is repeatedly done to make more of it. Also in large key space.

Also the algorithm you proposed is weak for brute force attack looking at current computational power. Having a huge key space can solve the purpose.

But good thinking sir. Strong substitution table/scrambling logic/huge key space can make the encryption very strong.

Looking forward for the next blog post :)﻿
Rajesh Patkar said…
Thanks for the analysis Gaurav.
As you mentioned that "the characters in the output encoded text are same as input".
I have kept the characters in English to keep the explanation of Algorithm simplified. However,I have mentioned at the end of the blog in the section "Encoding and Scrambling",that the English statement will have to be converted to Harikavach symbols ( using encoding key ) and then the Scramble clock ( scramble key ) has to be used. I believe that is addressing both confusion and diffusion.

Now about the limited key space.

In level 4 I am using a simple clock. and the interval used in Scramble Box is 5 minutes. This interval can be changed as you have rightly concluded to 1 minute interval.

I am proposing different clocks. Clocks with three Hands etc. With Seconds Hand which can increase the key space. However , there is a limit to this expansion as we want this to be a HandCryption. So I have to keep it humanly possible to encode/decode and scramble/Unscramble.

So apart from the Clock I have another device for those who want to play level 5. Well then I will wait for your prompt and detailed input after level 5.

Thanks once again for the inputs and suggestions.