Thursday, 11 July 2019

Shift Cipher AND HILL CIPHER

Modular Math and the Shift Cipher

 Shift Ciphers work by using the modulo operator to encrypt and decrypt messages. The Shift Cipher has a key K, which is an integer from 0 to 25. We will only share this key with people that we want to see our message.

How to Encrypt:

For every letter in the message M :
1. Convert the letter into the number that matches its order in the alphabet starting from 0, and call this number X.
( A=0, B=1, C=2, ...,Y=24, Z=25)
2. Calculate: Y = (X + K) mod 26
3. Convert the number Y into a letter that matches its order in the alphabet starting from 0.
(A=0, B=1, C=2, ...,Y=24, Z=25)
For Example: We agree with our friend to use the Shift Cipher with key K=19for our message.
We encrypt the message "KHAN", as follows:​
So, after applying the Shift Cipher with key K=19 our message text "KHAN" gave us cipher text "DATG".
We give the message "DATG" to our friend.

How to decrypt:

For every letter in the cipher text C :
1. Convert the letter into the number that matches its order in the alphabet starting from 0, and call this number Y.
(A=0, B=1, C=2, ..., Y=24, Z=25)
2. Calculate: X= (Y - K) mod 26
3. Convert the number X into a letter that matches its order in the alphabet starting from 0.
(A=0, B=1, C=2, ..., Y=24, Z=25)
Our friend now decodes the message using our agreed upon key K=19. As follows:
So, after decrypting the Shift Cipher with key K=19 our friend deciphers the cipher text "DATG" into the message text "KHAN".

Why is the Shift Cipher insecure?

A cipher should prevent an attacker, who has a copy of the cipher text but does not know the key, from discovering the contents of the message. Since we only have 26 choices for the key, someone can easily try all of the 26 keys, one by one, until they recover the message. This type of attack is called a brute force attack.
HILL CIPHER

step1: Treat every letter in plain text as a number so that A=0,B=1,...Z=25.
step2:Now our plain text matrix is multiplied by a matrix of randomly chosen keys.The key matrix consists of nxn,where n is the number of rows in our plain-text matrix.
step3: Now multiply two matrices.
step4: Now compute a mod 26 value of resultant matrix.
step 5:Translate the numbers to alphabets. For eg 5=F,8=I etc.

Monday, 8 July 2019

CNS Class Test

Class Test

     Chapter 1    [CO1]
                                                                     [25 marks]

  1. Define virus. [2]
  2. Define intruder. [2]
  3. Who is masquerader? [2]
  4. List out four steps carried out in attack. [2]
  5. Explain principle of confidentiality. [2]
  6. List out four categories in which active attack is categorized.Explain any one out of it.[4]
  7. Define sniffing.[2]
  8. Explain phising attack.[4]
  9. Draw diagram of DDOS attack. [3]
  10. Define TCP/IP hacking. [2]
 Chapter 2   [CO2]

                                                                     [15 marks]
Questions for odd enrollment numbers

  1. Explain characteristics of good password. [6]
  2. List various methods of bio metrics. Explain any two in brief. [6]
  3. Define piggybacking. [3]
Questions for even enrollment numbers

  1. Explain dumpsterdiving. [6]
  2. Write a short note on password selection strategy. [6]
  3. Define bio metrics [3] 
Chapter 3 [CO4]
                                                                    [10 marks]

  1.    Explain key escrow. [3]

  2.  Give steps for obtaining digital signature.[3]

  3.     Explain centralized and decentralized infrastructure.[3]

  4.         Define hashing function.[1]

Monday, 1 July 2019

CNS UNIT -II-Organizational Security

Dear Students,
Please find attached notes for following topics:

  1. Piggybacking
  2. Shoulder surfing
  3. Dumpster Diving
  4. Installing Unauthorized Software / Hardware
  5. Physical access by Non-Employees