MelodyCrypt -- Harikavach ( level 5 )


New to Harikavach >> Harikavach Introduction

The Challange

The challange in Harikavach is that it is a HandCryption  technique. This implies that it must be humanly possible to encode/encrypt the message and decode/decrypt the message, without using a computer and in a reasonable time with minimal effort.

Computers can be used to compromise the message. Computers can use Brute force technique to break the code. In Brute force technique the computer can try all the possible keys ( or a highly probable set ) on the message to compromise it. With increasing computing power, it is easy for a computer to try millions of key combinations within a reasonable period of time. This is the problem with level 4 . There are fixed number of keys that can be generated using Scramble Clock.  Let us consider that we place all the possible keys in a Set. Then this set is the Key Set ( Key Space ). The Key Set is finite for Scramble Clock and also finite for Harikavach Encoding.  Without the help of a computer it is not feasible to try all the keys through humane effort. So Harikavach is secure from HandCryption standpoint. However, a human with sufficient computing power can compromise HariKavach.

The Answer - MelodyCrypt.

We need a scheme wherein it becomes unfeasible for a computer to try Brute Force. From computers perspective the scheme must seems to be unpredictable and random.  However, from a human perspective everything must appear structured and predictable. 

I introduce MelodyCrypt. In this crypt we will use the name of a song  as a key. There are millions of songs in the Song Space ( Set of Songs ) . As unlimited numbers of songs can be composed , this Song Space is potentially an infinite set. Music Industry is a well established industry and naming and identification of songs is a reasonable expectation.

Music itself as a domain is highly refined. Every song can be expressed in terms of sequence of Chords
There are several types of chords. For sake of simplicity we will consider simple chords in the ensuing example.

We identify 12 key on the piano ( Octave ). Look at following diagram.




Now lets identify the Keys to be played in C Major chord





There are 12 keys on piano and 12 cells in a row in Scramble Box. Therefore each key on piano corresponds to a cell ( and its symbol ) in the row of a Scramble Box. Later, I will cover the cases where the Scramble Box has a row with more than or less than 12 keys. For now, Scramble Box has 12 cells in a row.

Have a look at the segment of Scramble Box, from the last post



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


Piano Key
Column
C
0
Db
5
D
10
Eb
15
E
20
F
25
F#
30
G
35
Ab
40
A
45
Bb
50
B
55



Let's take up an example song

Hey Jude by Beatles.


          F                            C
Hey Jude dont make it bad
         F    C7   C7sus4           C7           F
Take a   sad    song      and  make   it better.

So the chord sequence is 

F , C , F, C7, C7sus4, C7 and F 


Chord Mapping Table



Chord
Keys
Columns
F
C F A
0, 25, 45
C
C E G
0, 20, 35
F
C F A
0, 25, 45
C7
C E G Bb
0, 20, 35, 50
C7sus4
C F G Bb
0, 25, 35, 50
C7
C E G Bb
0, 20, 35, 50
F
C F A
0, 25, 45


Chord 1
Now the first chord in this song is F Major. As we can see from the Chord Mapping Table the columns affected are 0, 25, 45.  Let's call this Scramble Chord. So the scramble chord is

[0,25,45]

Once we know the Columns affected we have several option. I will select one of the simplest option. I will swap the symbol in the first column of the Scramble Chord with the last column of the Scramble Chord.

So I swap symbol under Column 0 with the symbol under Column 45.

Let me illustrate

Scramble Box before applying Scramble Chord


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

Scramble Box after applying Scramble Chord


0
5
10
15
20
25
30
35
40
45
50
55
0
b
I
t
e
n
c
n
sp
e
sp
r
sp

You can see that I have swapped values under Column 0 and Column 45. 

As I said we can have many other options to manipulate symbols affected by the Scramble Chord , but that I will cover in upcoming posts. 

Chord2 

The second Chord in the table is C Major so from the Chord Mapping table you get the scramble chord 
[ 0 , 20, 35 ] . This implies that according to our current strategy we will have to swap values between Column 0 and Column 35. 

Scramble Box before applying the Scramble Chords. 


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

Please note that the sequence in which scramble chords will be applied will be determined by the song. Also recollect that the name of the song is the key. 

Scramble Box after applying the Scramble Chords


0
5
10
15
20
25
30
35
40
45
50
55
0
b
I
t
e
n
c
n
sp
e
sp
r
sp
1
sp
t
n
i
u
o
sp
sp
i
n
e
t


Chord3, Chord4

[0,25,45]  [0,20,35,50]

Scramble Box before applying the Scramble Chords


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

Scramble Box after applying  4 scramble chords.


0
5
10
15
20
25
30
35
40
45
50
55
0
b
I
t
e
n
c
n
sp
e
sp
r
sp
1
sp
t
n
i
u
o
sp
sp
i
n
e
t
2
e
s
a
u
i
sp
f
e
p
P
s
o
3
i
h
t
c
p
u
e
sp
x
e
sp
n

Note, that here the swapping seems to be always between the Column 0 and some other column. This is because we have taken a simple example. There are several different types of chords and the Scramble chord can start at any column, not necessarily zero. For instance using chord inversions.

The following strategies can make this Melodious Scrambling interesting.

1) Once we identify the columns affected by Scramble Chord we can manipulate the affected columns in different ways. Like multi-swap, that will change positions of all the affected columns. Swapping unaffected columns based on their relation with the affected columns etc.

2) Mixing Chord sequences from two or more songs. ( we will need name and order for all the songs involved )

3) Introducing variables like tempo and key signature. These variable can be used to manipulate the affected and unaffected columns.


If the chord sequence is smaller than the message to be encrypted. The chord sequence can be repeated. If the message is smaller, the chord sequence is applied until relevant.


Unwinding the MelodyCrypt


Once the message is encrypted with MelodyCrypt. Only the person who knows the key  to MelodyCrypt can comprehend the message. The key is the name of song. In the example I took it is Hey Jude. The user is expected to obtain the chord sequence for the song. Using the Chord Mapping table the user has to obtain the Scramble Chord. Using the Scramble Code sequence the user reverse the swapping or any other operation that was performed during encryption. 


After Unwinding the MelodyCrypt. The user has to Unscramble the message using Scramble Clock and lastly he has to decode the message using Harikavach


Harikavach ( level 5 ) 

Encryption  

Phase 1 -- Encoding English Message using Harikavach Symbols and using Encoding Key
Phase 2 -- Scrambling the Encoded Message using Scramble Clock and Scramble Key
Phase 3 -- Encrypt the messsage using MelodyCrypt and MelodyKey ( ie, song name or other relevant info)

Decryption

Phase 1 -- Decrypt message using MelodyCrypt using MelodyKey
Phase 2 -- Unscramble Message using Scramble Clock and Scramble Key
Phase 3 -- Decode the Harikavach Message to English using the Harikavach symbols and Encoding Key. 


Try for Fun...

Text to be Encrypted



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 modern crafts including Software Development


Action packed Software Industry has its own set of problems. Technology is getting sophisticated, problems are growing complex, and software professionals are struggling with deadlines. The rate of change of contextual environment underlying the developmental activities is alarmingly high.Patterns offer a shimmer of hope.


Abstraction has always been an effective tool against complexity. Every engineering discipline offers a set of fundamental building blocks. Engineers use this off-the-self fundamental building blocks to create their products.This set of fundamental building blocks and the principles governing their use, form the context within which the product formation in envisioned. The pace of evolution of Software Engineering is unsettling from the building block's perspective.There always seems to be a need for better abstractions.





Happy MelodyCrypting !!!   ( Use the song you like the most .....)





copyright ©Rajesh Patkar, All rights reserved.

Comments

Gaurav Pawaskar said…
Hi Sir,

It is interesting thought that we are trying to map keys to some realistic entity in the world. Entities like. Key/Address/time of date are some real world entities.

My basic questions is why do we need to have a such a key like a song or some real life entity, where we can just generate a pseudo random number of the length we need and just use it as a key. As simple as that.
Rajesh Patkar said…
Because Random numbers are generated usually by computers. And then applied to message by computers. This is HandCrypting, So one must make is feasible for humans to encrypt and decrypt while still avoiding computers from breaking the code.
Rajesh Patkar said…
I really thank Gaurav for his analysis. I need a critical eye on this game. Although learn with fun is the game's prime intent, the game must be technically sound. I would not like any oversight or silly error creeping in the game. This will reduce the game's long term educational value. I invite suggestions from all the readers.

My primary focus in designing this game has be edutainment. Depending on the audience I would lower or raise the levels of difficulty. I am planning to introduce even more devices like compass etc. This will allow children to explore the devices. For instance I introduced Clock ( lot of educational experiments can be developed around it ) . I have introduced Music , so children can have an introduction to basic concepts of music. I am not limiting the game to any particular domain. I am exploring several other domains, which can be included in the game. This game must act as a mental gym for symbol processing and other activities. I will post more on this latter.

I would love if this game can become useful introduction to encryption/decryption for students beginning their journey in Security.More on this in latter blogs.
Gaurav Pawaskar said…
Thank you very much sir. I am trying to analyse from attackers perspective. I will keep on posting any issues I see with algorithms.

Just another small point I wanted to make, selection of songs as key also might make key space less. Suppose, I select a Marathi song as a key. Some social engineering would make the attack simple. i.e. Attacker will 1st check who is encrypting, what is his social status, likes, dislikes, languages he speak/write/understand(Now a days this information is readily available on social/business networking sites). So out if the songs in whole world, my key selection narrows down.

Again this is very subjective. If person using this cryptography is smart and select some third language song, that is smartness. We would like to make this algorithm strong for less smart people too :)

May be you would like to think of such an entity which is common globally and difficult to guess via social networks. May be some composite key. like song + color + time +
Chaitanya Tank said…
Hello sir,

As I am not computer engineer, I may not sound much technical, but I am looking forward to study this game and search about the terms used.

Thank you for making this EDUCATIONAL topic like fun rather than boring and lengthy definitions in books. Looking forward to learn from your blogs.

Popular posts from this blog

Introduced Java 10 in Java Technology Course.

Potter Metaphor.