Showing posts with label columnar cipher. Show all posts
Showing posts with label columnar cipher. Show all posts

Tuesday, 16 June 2015

cryptography basics part iv


COMPOSITION OF CIPHERS
In previous articles of cryptography we learnt how to encrypt a text using block substituted ciphers and transposition ciphers.these are good ciphers to a noob but these ciphers are cakewalk for a man having appreciable knowledge of cryptography.so let us make our ciphers even harder to crack using composition of ciphers.
so what really is composition of ciphers?? it is nothing but making a harder cipher using ciphers we already know.Double columnar cipher which we learnt in previous section is an example of this approach.
First let us apply this for block substituted ciphers.we learnt monosubstituted cipher and polysubstituted cipher.let us try to combine both the ciphers.
let us take the example "WELCOME TO FREE LEARN HACKING"
  1. write the text in the blocks of length 5 "WELCO METOF REELE ARNHA CKING "
  2. first applying key for polysubstituted cipher take key as replace first alphabet by its first successor,second alphabet by its second successor,third alphabet by its third successor,fourth alphabet by its fourth successor,fifth alphabet by its fifth successor
    our encrypted text will become "XGOGT NGWSK SGHPJ BTQLE DMLRL"
  3. Now apply monosubstituted cipher ,deciding our key as replace each alphabet with their second successor like A from C
    now our text will become "YHPHU OHYTL JHIQK CURMF ENMSM"
This our new secret code and believe on me it is better than previous one.

Now let us experiment for route ciphers and columnar transposition cipher.we will be first performing route cipher and then columnar transposition
  1. let us take the example "WELCOME TO FREE LEARN HACKING"
  2. write the text in the blocks of length 5 "WELCO METOF REELE ARNHA CKING "
  3. now we will apply route cipher therefore write in form according to the figure given below
  4. now the encrypted text becomes WMRAC KINGA EFOCL EEERN HLOTE
  5. now applying transposition cipher we get "WMRAC EEERN KINGA HLOTE EFOCL"
  6. our new crypted text.
hey isnt it great forming powerful ciphers from existing ciphers we already know. we can also make composition of transposition cipher and substituted cipher, any permutation in your mind could result in a new cipher.

Saturday, 13 June 2015

Fuzzy sets Operation

                   FUZZY  SET  OPERATIONS :
1. FUZZY  UNION :-
         A = {( x , 0.5) , (y , 0.7) , (z ,0)}  

          B={( x , 0.8) , (y , 0.2) , (z ,1)}
A U B = A UNION B
         = maximum of membership       

     degree among the sets
A U B = ( x , 0.8) , (y , 0.7) , (z ,1)}
 NOTICE -
          0.8 > 0.5
           0.7 > 0.2
            1 > 0


2. FUZZY  INTERSECTION :-
 A = {( x , 0.5) , (y , 0.7) , (z ,0)}        
B={( x , 0.8) , (y , 0.2) , (z ,1)}
 A INTERSECTION B  = minimum of

membership degree among the sets
= ( x , 0.5) , (y , 0.2) , (z ,0)}


 NOTICE - 

          0.8 < 0.5
           0.7 < 0.2
            1 < 0


3.  A ' = COMPLEMENT OF A
A = {( x , 0.5) , (y , 0.7) , (z ,0)}        
B={( x , 0.8) , (y , 0.2) , (z ,1)}
A ' = 1 - MEMBERSHIP DEGREE
A ' = {(x , 0.5), (y ,0.3) , (z,1)}
B ' ={(x , 0.2) , (y,0.8) , (z,0)}


4.  A - B = ? 
A = {( x , 0.5) , (y , 0.7) , (z ,0)}        
B={( x , 0.8) , (y , 0.2) , (z ,1)}
A - B = A INTERSECTION B'
         = minimum of membership       

     degree among the sets
A- B = {(x , 0.2) , (y , 0.7) , (z ,0)}


5. POWER OF  FUZZY SET = ? 
   IF "A " IS A FUZZY SET THEN
     POWER SET (A)  =  (membership

degree of set )^ $
       P(A) = (M. DEGREE)^$
NOTE -
        IF $ = 1/2 THEN IT IS CALLED

"DILATION"
       IF $ = 2 THEN IT IS CALLED

"CONCENTRATION "

EXAMPLE - 
A = {( x , 0.5) , (y , 0.7) , (z ,0)} 
$ = 2
A = {( x , 0.25) , (y , 0.49) , (z ,0)}
 

Monday, 8 June 2015

cryptography basics part iii


CRYPTOGRAPHIC BASICS PART III


In previous article we learnt about classification of cipher codes and then detailed analysis of two types of block ciphers maonosubstituted block cipher and polysubstituted block cipher.
The one not following my cryptography posts reading for first time must took a glance at older posts by the link given below
cryptographic-basics-part-i
cryptography basics part ii
today we will look to another type of block cipher known as transposition cipher,
Transposition cipher:It follows method of encryption by which position of simple text are shifted according to a regular pattern to form cipher text.
We will discuss three types of transposition ciphers here
  • route cipher:let us take the example "WELCOME TO FREE LEARN HACKING"
    1. write the text in the blocks of length 5 "WELCO METOF REELE ARNHA CKING "
    2. now write in form according to the figure given below
    3. now the encrypted text becomes WMRAC KINGA EFOCL EEERN HLOTE
  • columnar transposition:
we will use the same text "WELCOME TO FREE LEARN HACKING"
  1. write the text in the blocks of length 5 "WELCO METOF REELE ARNHA CKING "
  2. now write in form given below
    1 3 5 2 4
    W M R A C
    E E E R K
    L T E N I
    C O L H N
    O F E A G
  3. now we have to chose a key suppose we chose our key as "CRYPT" then we will mark it in ascending order C-1 P-2 R-3 T-4 Y-5 whichever occurs first in alphabets
  4. now the encrypted text becomes WMRAC COLHN EEERK OFEAG LTENI


  • double columnar transposition:
  • here we will repeat the same task two times we will use the same text "WELCOME TO FREE LEARN HACKING"
    1. write the text in the blocks of length 5 "WELCO METOF REELE ARNHA CKING "
    2. now write in form given below
      1 3 5 2 4
      W M R A C
      E E E R K
      L T E N I
      C O L H N
      O F E A G
    3. now we have to chose a key suppose we chose our key as "CRYPT" then we will mark it in ascending order C-1 P-2 R-3 T-4 Y-5 whichever occurs first in alphabets
    4. now the new text becomes
      1 3 5 2 4
      W M R A C
      C O L H N
      E E E R K
      O F E A G
      L T E N I
    5. Now we will again apply the key crypt in the same manner
    6. our encrypted text become WCEOL AHRAN MOEFT CNKGI RLEEE

    There are hundreds of types of transposition cipher available.you can also make your own transposition cipher but it should be logically correct.
    Transposition ciphers prove to be better cipher than substitution cipher
    In next article we will be getting knowledge of more different powerful techniques.