Deepak Kumar Cryptographic
Algorithm
Overview
This is a simple symmetric key cryptographic algorithm, which uses a simple [0-9] Decimal array
to transfer data from one machine to another. It can withstand attacks by attackers using
Quantum Computers, or any other sophisticated computers.
Goals
The goal of this algorithm is to send a text from Machine A to Machine B, even if intruders
disrupt the communication, with huge computing abilities.
Specifications
This cryptographic algorithm establishes communication between two Machines A and B. This
uses a Decimal array [0-9], to repeatedly transfer data from A to B.
The basic structure of DK Algorithm
This algorithm is symmetric. Machine A and Machine B hold identical cryptographic keys, with
every digit, a unique number from 0 to 9. If Machine B wants to receive data from Machine A,
Machine B sends a random number ( 0 to 9) to Machine A. Machine A performs permutation,
with its initial cryptographic key, using the random number, and obtains Modified key A. Machine
B, performs the same permutation, with its initial cryptographic key using the same random
number and obtains it’s Modified key B. Now, Machine A and Machine B hold the same modified
key. Machine A wants to send a digit 8 to Machine B. It creates a Jumbled Key from Modified Key A, by keeping the digit position of 8 unchanged. It jumbles all other remaining digits.
Machine B receives Jumbled Key from Machine A. Now by comparing Jumbled Key with
Modified Key B, we can get the digit 8 in Machine B. Since, all digits except, position 8 are
jumbled.
Structure of Keys
All keys in this algorithm are an array of 10 digit places. It contains a unique number in each of
its digit places. The numbers that are allowed in the key places are 0 to 9. Valid key contains a
unique digit in each of its places as shown below. Invalid Key contains repeated digits in its
places.
Obtaining Session Key from Public Key
First to begin with we need to obtain a Session Key which is symmetric from the Public Key of
Machine B. Machine A uses nonce ( a one-time Key ) to communicate with Machine B, and
create a Session Key, which uniquely identifies the communicating Machines A and B. Machine
B sends a Session Key to Machine A. Distributing Session Keys between Machine A and
Machine B, is done by means of DK Cryptographic Algorithm. DK Cryptographic Algorithm gives
a secure exchange of Session Key between Machine A and Machine B. Both Machines will have
the same Session key.
Basic DK Cryptographic Algorithm
Let’s first understand the basic DK Cryptographic Algorithm, using a single-digit. This is
explained figuratively in Figure 1. All Values are from 0 to 9. So a number 3, means it is position
4 in the array. It is Zero-Based Array Indexing.
Let’s say we are transferring digit 5 from Machine A to Machine B. The Algorithm starts by
obtaining symmetric keys on both Machine A Key [0] and Machine B Key [0]. Now Machine B
pokes the Machine A, with a Random Number 3. Machine A receives this Random Number 3 and
calculates the Input Value. Input Value is obtained from the position of Random Number 3 in
Machine A Key [0]. Remember it is Zero-Based Array Indexing. Machine A calculates the Input
Value. Input Value is found as 6, which is present in the position of Random Number 3 in
Machine A Key[0].
Similar to Machine A, Machine B also calculates the Machine B Key[1]. Machine A Key[0] and
Machine B Key[0] is the same, also Machine A Key[1] and Machine B Key[1] are the same,
because of the Symmetric Keys used in this algorithm. We can get the Input Value 6 from
Random Number 3. It is the same for both Machine A and Machine B in every iteration. Both
Input Value and Random Number are present in both Machine A and Machine B. The Machine B
Key[1] will be calculated in Machine B, with the same Input Value 6, with Machine B Key[0].
Machine B has this Random Number 3 with it because it is Machine B, which created the
Random Number 3 on its side and sent it to Machine A.
Permutation
Using this Input Value, Machine A performs a Permutation ( Explanation and Calculation of
Permutation will be explained later in the document). Permutation on Machine A Key[0] is done
using the Input Value 6, to obtain the Machine A Key[1]. Similarly, Machine B Key[1] is calculated
using the same Input Value 6, to obtain Machine B Key[1]. Machine A and Machine B have their
own copy of Input Value and both perform Permutation in their own Machines.
Jumbling the Machine Key Array
Now, to send Data 5 from Machine A to Machine B, we need to calculate Jumbled [0]. Jumbled
[0] is calculated on Machine A alone. Jumbled [0] is calculated by altering digits in every
position of Machine A Key[1] except in position 5. Jumbled [0] differs with Machine A Key[1] only
at position 5. This Jumbled [0] is sent from Machine A to Machine B. Upon receiving Jumbled[0]
on Machine B, we need to match Machine B Key[1] and Jumbled[0]. We will find that only at
position 5, Machine B Key[1] and Jumbled[0] differ. This position is the actual Data sent from
Machine A to Machine B, not the digit present inside the array Machine A Key[1] or Machine B
Key[1]. Data 5 is thus sent from Machine A to Machine B.
Permutation Function
The permutation function that has to be performed by both Machine A and Machine B is as
follows. For Machine A, the calculation is as follows:
MacAInter = (MacAInput + j)% 10;
MacAKeys[ i+1 ][ MacAKeys[ i ][ MacAInter ]]= ((MacAInter + MacAInput) % 10);
Where,
j, represents the index for the whole Array from 0 to 9
i, represents the Key Number
MacAInter - Intermediate Value required while performing Permutation.
MacAInput - Input Value ( 6, As per above Example )
MacAKeys[i] - Machine A Key[i]
Machine B also performs the same Permutation, with its MacBKeys[i], using MacBInput and
MacBInter. MacBInput = MacAInput and MacBInter = MacAInter, for every iteration.
Comments
Post a Comment