Showing posts with label learn encryption. Show all posts
Showing posts with label learn encryption. Show all posts

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.

    Sunday, 7 June 2015

    cryptography basic part II


    CRYPTOGRAPHIC BASICS PART II

    CRYPTOGRAPHIC BASICS PART II


    In earlier article we learnt about functions .
    today we will be messing our hands in real stuff,encryption with primitive methods
    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
    Basically encrypyion and decyption is done by the use of a key,which is designed by encryptor to encrypt it.
    Basically key is divided in two broader categories
    • Symmetric key
    • Public Key
    In this article we will focus on symmetric keys
    Symmetric keys have been used ancient times so it has a wide history,Ancient greeks ,ancient egyptians used it,But the most recognised incident is the use of symmetric keys by nazis during world war II with the help of Enigma machine,Enigma was considered as an uncrackable machine.Had not been there the great cryptanalyst Alan Turing,British would have suffered a lot.
    Symmetric key:the key used for encryption and decryption is same rhe actual text and ciphered text are easily convertble function. Once a cryptanalyst knew the original key used for encrypting the text he could easily decrypt the ciphered text.therefore the key used should be kept secret and passed through secured channel while the ciphered text could easily passed through unsecured channel.
    Symmetric Keys too are classified in two other broader categories
    • Block ciphers
    • Stream ciphers

    Block ciphers : these ciphers encode the text to a block of fixed length and then precede according to key

    here we will discuss only substituted block ciphers
    there are two kinds of substituted ciphers:
    • monosubstituted cipher
    • polysubstituted cipher

    Monosubstituted cipher:this encode using a single pattern for key,for example:
    let us encode the text according to monosubstituted block cipher
    Our text is "WELCOME TO FREE LEARN HACKING"
    we will follow the steps:
    1. first make block of fixed length for text say 5
      then our text will become WELCO METOF REELE AENHA CKING
    2. now comes the crucial step deciding the key,let us decide the key as replace each alphabet with their second successor like A from C
      now our text we look like YGNEQ OGVQH TGGNG CTPTC EMKPI
    Bravo you have encrypted your first code...

    Polysubstituted ciphers:
    in this we follow different pattern for text for each position at the code block,for example let us encode the same text used above using polysubstituted block cipher
    Our text is "WELCOME TO FREE LEARN HACKING"
    we will follow the steps:
    1. first make block of fixed length for text say 5
      then our text will become WELCO METOF REELE AENHA CKING
    2. now comes the crucial step deciding the key,let us decide the 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
      now our text will look like XGOGT NGWSK SGHPJ BTQLE DMLRL


    Polysubstituted cipher is much hard to crack in compariso to monosubstituted cipher...
    we will learn some more powerful ciphers in next article till then keep on making ur information secretive using these ciphers

    Saturday, 6 June 2015

    cryptography basic


    cryptography basics part 1

    CRYPTOGRAPHY BASICS

    What is cryptography?
    cryptography is art of changing any simpler text to a secret code.so how are hacking and cryptography related?hacking is simply gaining access to any system,while the work of cryptography is to encode a simpler text to secret code to provide confidentiality and information security.having knowledge of cryptography helps to make our system more secure.

    cryptography is study dealing with mathematics and computers both.so to achieve command on it we have to learn some basic mathematics.
    lets catchup some information regarding functions..

    what is functions?
    let us take Y as a function of X
    Domain:the values which is given as input
    Range:the values which came as output
    So elements in X constitutes domain,and elements in Y which are also called as image constitute range
    it is a relation satisfying the below conditions
    1.Each element of X should have one image in Y
    2.No element in X could have two or more corresponding values in Y
    3.Y could have one or more than one values of X
    4.It is not mandatory that each element in Y should have corresponding X.

    Bijective funtions:functions in which each element in X has only one image in Y and no element in Y should be empty

    Inverse function:If Y is made to be codomain then X will automatically become image of Y if the function is bijective function, otherwise inverse of a function is not possible

    Trapdoor one way functions:They are the most important type of functions for cryptography.By definition one way function is that function whose inverse is hard to find unless some very essential information is given which is called trapdoor.so for now only we will keep ourselves reserve with this definition only and will exploit trapdoor functions in our next topic