Search This Blog

Showing posts with label Cryptography & Network Security. Show all posts
Showing posts with label Cryptography & Network Security. Show all posts
Wednesday, 7 October 2026

Multiple Choice Questions on CNS & IS (Part 2)

0 comments

MCQs on CNS & IS


1.  The _______________ attack is related to confidentiality.
  • fabrication
  • interception
  • interruption
  • modification


2.  If the recipient of the message has to be satisfied with the identity of the sender, the principle of ________________ comes into picture.
  • authentication
  • confidentiality
  • integrity
  • access control


3.  The ______________ attack is related to availability. 
  • fabrication
  • interception
  • interruption
  • modification


4.  If we want to ensure the principle of __________________, the content of a message must not be modified while in transit.
  • authentication
  • access control
  • confidentiality
  • integrity


5.  Interruption attacks are also called as ______________ attack. 
  • alteration
  • Denial of Service (DoS)
  • masquerade
  • replay attacks


6.  An example of poly-alphabetic substitution is
  • Ceasar cipher
  • Rail Fence transposition cipher
  • Columnar transposition cipher
  • Vigenere cipher


Explanation:

  • Using more than one alphabet and switching between them systematically to encrypt data is called a polyalphabetic substitution cipher. 
  • The Vigenere cipher is a method of encrypting alphabetic text by using a series of interwoven Caesar ciphers based on the letters of a keyword. 
  • It is a form of polyalphabetic substitution. 



7.  A Substitution Box provides ____________________. 
  • diffusion only
  • confusion only
  • both diffusion and confusion
  • neither diffusion nor confusion


8.  The number of rounds in 56-bit DES and 128-bit DES are respectively: 
  • 12 and 12
  • 12 and 16
  • 16 and 16
  • 16 and 20


9.  A public key encryption system
  • allows anyone to decode the transmissions
  • allows only the correct sender to decode the data
  • allows only the correct receiver to decode the data
  • doesn't decode the data before transmitting it


10.  A MAC provides ___________________________.
  • message integrity
  • message authentication
  • message confidentiality
  • message integrity and authentication


11. A MAC may be implemented using DES in ________ mode. 
  • Electronic Code Book (ECB)
  • Cipher Block Chaining (CBC)
  • Cipher FeedBack (CFB)
  • Counter (CTR)


12.  The principal advantage of Public Key cryptography over Secret Key cryptography is ______________________.
  • simplified key management
  • lower chip area
  • improved speed
  • higher security


13.  Which of the following is/are synonymous with "hash of a message"?
  • Digital signature over a message
  • Message Digest
  • Message Authentication Code (MAC)
  • Message Fingerprint


14.  The digital signature provides which of the following service(s)?
  • Message confidentiality
  • Message integrity
  • Message authentication
  • Non-repudiation


15.  To verify a digital signature, which of the following components are required?
  • The signer's private key
  • The signer's public key
  • The hash algorithm used
  • The verifier's public key

Continue reading →
Thursday, 1 October 2026

Block Chain Technology

0 comments

Introduction to Block-Chain Technology


Block-chain is a shared, immutable digital ledger, enabling the recording of transactions and the tracking of assets within a business network and providing a single source of truth. 

  • In block-chain technology, each transaction is stored in a block structure, which is  linked with other blocks, forming a secure and transparent chain. 
  • This structure guarantees data integrity and provides a tamper-proof record, making block-chain ideal for applications like cryptocurrencies and supply chain management.

Decentralised Database Storage
  • Block-chain technology is an advanced database mechanism that allows transparent information sharing within a business network. 
  • Block chain operates as a decentralised distributed database, with data stored across multiple computers, making it resistant to tampering.
  • A block-chain database stores data in blocks that are linked together in a chain. 
  • Transactions on block-chain are validated through a consensus mechanism, ensuring agreement across the network.

Advantages of using Block Chain
  • The key benefit of block chain lies in its ability to provide security, transparency and trust without relying on traditional intermediaries, such as banks or other third parties. 
  • Its design reduces the risk of fraud and errors, making it especially valuable in industries where secure transactions are critical, including finance and healthcare. 

Key Components of Block-chain Technology

Block-chain architecture has the following main components:

A distributed ledger:
  • A distributed ledger is the shared database in the block-chain network that stores the transactions, such as a shared file that everyone in the team can edit. 
  • In most shared text editors, anyone with editing rights can delete the entire file. 
  • However, distributed ledger technologies have strict rules about who can edit and how to edit. 
  • Users cannot delete entries once they have been recorded.

Smart contracts:
  • Companies use smart contracts to self-manage business contracts without the need for an assisting third party. 
  • They are programs stored on the block-chain system that run automatically when predetermined conditions are met. 
  • They run if-then checks so that transactions can be completed confidently. 
    • For example, a logistics company can have a smart contract that automatically makes payment once goods have arrived at the port.

Public key cryptography
  • Public key cryptography is a security feature to uniquely identify participants in the block-chain network. 
  • This mechanism generates two sets of keys for network members. 
  • One key is a public key that is common to everyone in the network and the other is the private key that is unique to every member. 
  • The private and public keys work together to unlock the data in the ledger. 
    • For example, John and Jill are two members of the network. John records a transaction that is encrypted with his private key. 
    • Jill can decrypt it with her public key. This way, Jill is confident that John made the transaction. 
    • Jill's public key wouldn't have worked if John's private key had been tampered with.
Continue reading →
Wednesday, 16 September 2026

Hash Functions and Digital Signatures

0 comments

Introduction to Hash Functions

A hash function H is a mathematical algorithm that accepts a variable-length block of data or message as input and produces a fixed-size output known as checksum,  hash value, hash code, or message digest (h =H(M)).
  • The primary objective of a hash function is to verify data integrity, as any alteration to even a single bit in the input message will, with high probability, produce a different hash code. 


Applications of Hash Functions:

  • The purpose of a hash function is to produce a "fingerprint" of a file, message, or a block of data.
  • Hash functions are widely used across various domains due to their efficiency and versatility:
    • Hash Tables: The most common use of hash functions in DSA is in hash tables, which provide an efficient way to store and retrieve data.
    • Message Authentication: Message authentication is a mechanism or service used to verify the integrity of a message. When a hash function is used to provide message authentication, the hash value generated by the hash function is often referred to as message digest.
    • Digital Signatures: In digital signatures, the hash value of the message is encrypted with the user's private key.  Anyone who knows the sender's public key can verify the integrity of the message that is associated with the digital signature.


Hash Function Requirements:

To be useful for message authentication, a hash function H must have the following properties.

  1. Variable Input Size: A has function can be applied to a data block or message of any arbitrary size. i.e., H can be applied to a block of data of any size.
  2. Fixed Output Size: The output of a hash function should have a fixed size, regardless of the size of the input, i.e., the function H produces a fixed-length output regardless of how large or small the input message is.
  3. Efficiency: The hash function should be able to process the input quickly.  H(x) is relatively easy and fast to compute for any given input x, making both software and hardware implementations practical.
  4. Pre-image Resistance: It should be computationally infeasible to reverse the hash function.
    • For any given hash value h, it is computationally infeasible to find x (input message) such that H(x) = h.  
    • This property is also known as one-way property.
  5. Collision Resistance: It should be difficult to find two different inputs that produce the same hash value.  
    • For any given message x, it is computationally infeasible to find a different message y ≠ × such that H(y) = H(x). 
    • This property prevents an attacker from forging an alternative message that yields the same hash code as that of the original message.
    • This property is sometimes referred to as weak collision resistance.
  6. Avalanche Effect: A small change in the input should produce a significantly different hash value.
    • It is computationally infeasible to find any pair (x,y) such that H(x) = H(y).
    • This property is sometimes referred to as strong collision resistance.
  • The first three properties are requirements for the practical applications of a hash function to message authentication.
  • A hash function that satisfies only the first five properties of hash functions is referred to as a weak hash function. 
  • If all the six properties of hash functions are inherited by a hash function, then it is referred to as a strong hash function.


A Simple Hash Function:
  • All hash functions operate using the following general principles:
    • The input (message, file, etc.) is viewed as a sequence of n-bit blocks.
    • The input is processed one block at a time in an iterative fashion to produce a set of n-bit hash values (say 128 bits in length).

  • One of the simplest hash functions is the bit-by-bit exclusive-OR (XOR) or every block.  This can be expressed as follows:

  • This hash function produces a simple parity for each bit position and is known as a longitudinal redundancy check.  
  • It is reasonably effective for random data as a data integrity check.
  • A simple approach to improve the simple hash function is to perform a one-bit circular shift, or rotation, on the hash value after each block is processed.
  • The procedure can be summarised as follows:
    • Initially set the n-bit hash value to zero.
    • Process each successive n-bit block of data as follows:
      • Rotate the current hash value to the left by one bit.
      • XOR the block into the hash value.


Cryptographic Cash Function

  • A cryptographic hash function is an hash function specifically designed for security applications and Internet protocols.
  • These hash functions are designed for security rather than speed. They are used in applications where data protection is critical.
  • All cryptographic hash functions involve the iterative use of a compression function.
  • The compression function used in secure hash algorithms falls into one of two categories: 
    • a function specifically designed for the hash function 
    • an algorithm based on a symmetric block cipher. SHA and Whirlpool are examples of these two approaches, respectively.
  • For a hash function to be cryptographically secure and effective in practice, it must satisfy the following two properties:
    • The function is one-way, i.e, the function creates the checksum from the information, but the checksum can't be used for creating the information.  This property is known as pre-image resistant.
    • It should not be possible to find two pieces of information that provide the same checksum when run through the function.  This property of the has function is known as collision resistance.
  • Two secure hash functions that are commonly used are MD5, which produces a 128-bit checksum, and SHA, which produces a 160-bit checksum.  
    • Among these two, SHA, which was developed by the government of USA and is believed to be more secure than MD5

Message Authentication:
  • When anyone authenticate oneself to the computer, most likely he/she type in the username and password.  The username is considered public knowledge, so it is the password that authenticates the identity of the user.
  • Message authentication assures that the data received by the recipient are exactly the same as it was sent (with out insertion or deletion of some portion). 
  • In message authentication, the sender computes the hash value (called message digest) of the message by applying a hash function on it and transmits both the message digest and the message. 
  • The receiver performs the same hash calculation on the message and compares the  calculated message digest with that of the message digest received from the sender.
  • If there is a mismatch, the receiver knows that the message (or possibly the message digest) has been altered.


Digital Signatures

  • Digital signature is an encrypted form of a message that can be utilised for enforcing integrity and authentication of the message during transmission from sender to the receiver.
  • It can be used for ensuring the authentication of a message using cryptographic hash function. 
  • President Clinton signed a law to allow digital signatures to be used as a legal signature.  

Use of Cryptography in Digital Signatures:
  • Proper use of cryptography can provide confidentiality, authentication and integrity of information during transmission.
  • Symmetric cryptography uses only one key for both encryption and decryption.  Whereas, asymmetric cryptography (also called public key cryptography) uses a key pair - one key to encrypt the data and another key to decrypt the data
  • In public key encryption , the private key is kept secret by the owner; the public key is published identifying who the owner is;  one key can't be used for creating another.

Steps involved in using Digital Signatures:
      1. The information (message) to be secured is first put through a hash function.  The hash function creates a checksum of the information.
      2. The checksum is then encrypted with the help of sender's private key.  The encrypted checksum is known as the digital signature, because it needs the sender's public key for decrypting the checksum.
      3. The information (message) and the digital signature are sent to the receiver of the information.  If confidentiality of the information is also desired, then the message as well as digital signature can be encrypted using a symmetric key cryptography.
      4. At the receiving side, the receiver gets the information and puts it through the same hash function to derive the checksum of the message being sent.
      5. The encrypted checksum (digital signature) came along the message is decrypted and the two checksums (original and calculated) are compared.
      6. If the received checksum and the calculated checksum do match with each other, it ensures that the information has not been modified during transmission, i.e., integrity of the message is secured.


    The security and usefulness of a digital signature depends upon two critical elements:
    • Protection of the sender's private key
    • A secure hash function that creates a checksum of at least 128 bits.

    Continue reading →
    Wednesday, 9 September 2026

    Question Bank on Cryptography & Network Security

    0 comments

    Frequently Asked Questions (FAQ) on CNS


    UNIT-I

    Topics Covered:

    • Classical Encryption Technique
    • Symmetric Cipher Model
    • Substitution Techniques
    • Rotor Machines and
    • Stegnography


      Descriptive Questions (2 Marks):
      1. Define Cryptography.
      2. What are the two basic functions used in encryption algorithms?
      3. What is steganography? How does it differ from cryptography?
      4. What is masquerade?  Which principle of security is breached because of that?
      5. What are replay attacks?  Give an example of a replay attack.
      6. Write the differences between symmetric and asymmetric ciphers.
      7. What is the main difference between a stream cipher and a block cipher?
      8. Differentiate between substitution and transposition techniques in classical cryptography.


      Descriptive Questions (5 Marks):
      1. Explain the importance of cryptography in the evolution of secure communication with suitable historical examples.
      2. Discuss any one of the passive attacks in detail.
      3. Discuss any two substitution techniques and list their merits and demerits.
      4. Explain the working principle of the Caesar cipher. Encrypt the text "NETWORK" using a key value of 3.
      5. Briefly define the monoalphabetic cipher.  What is the difference between a mono alphabetic cipher and a poly alphabetic cipher?
      6. Explain the Play Fair cipher algorithm? Encrypt the message ‘MY BALLOON’ using the key ‘MONACHRY’
      7. Explain about Hill Cipher. Consider the plaintext "paymoremoney" and use the encryption key: K=.  Find the cipher text.
      8. Convert “MEET ME” using Hill cipher with the key matrix .  Convert the cipher text back to plaintext.
      9. Explain the following ciphers: (a) Playfair cipher and (b) Vernam cipher
      10. Describe the working of a columnar transposition cipher by encrypting the message “CRYPTOGRAPHY IS FUN” using the keyword “NETWORK.” Show column arrangement, transposition steps, and final ciphertext.
      11. Explain the basic principle of rotor machine.
      12. Explain the work of a rotor machine with a simple example. Show how a single plaintext letter is transformed through multiple rotors into ciphertext.



      UNIT-II

      Topics Covered:
      • Stream ciphers and Block ciphers
      • Attacks on Block ciphers
      • Block cipher principles
        • Group, Ring, and Field
      • Polynomial arithmetic
        • The Euclidean algorithm
        • Finite fields of the form GF(2n)


        Descriptive Questions (2 Marks):
        1. Define stream ciphers.
        2. Define Block ciphers
        3. Briefly explain the design principles of block cipher.
        4. List the attacks that can happen on block ciphers.
        5. Define group and ring.
        6. What is the use of Euclidean Algorithm in cryptography?


        Descriptive Questions (5 Marks):
        1. How is GCD calculated with Euclid’s algorithm? Calculate the GCD of (270, 192).
        2. Compare and contrast stream ciphers and block ciphers.
        3. What are the design parameters of Feistel cipher network?
        4. Explain the DES algorithm with neat sketch.
        5. Explain the key expansion round key generation logic used in DES. How do round keys enhance security?
        6. Write the difference between ECB and CBC with neat diagram
        7. Describe common attacks on block ciphers like brute-force, differential, linear cryptanalysis. Explain how block cipher design principles help resist these attacks.
        8. Explain step-by-step multiplication of two polynomials and over GF(2). Show all intermediate steps.


        UNIT-III

        Topics Covered:

        • Stream ciphers
          • RC4
        • The Chinese Remainder theorem
          • RSA Algorithm
        • Diffie-Hellman Key Exchange
        • Elliptic Curve Cryptography (ECC)


          Descriptive Questions (2 Marks):
          1. What is the block size used in the Advanced Encryption Standard (AES)?
          2. What is Substitute Byte transformation in AES?
          3. Write the difference between public key and private key.
          4. State one application of the Chinese Remainder Theorem (CRT) in cryptography.


          Descriptive Questions (5 Marks):
          1. Explain in detail about AES algorithm.
          2. Which four tasks are performed in each round of AES Cipher? Explain.
          3. Explain the structure and working of the Advanced Encryption Standard (AES). Include key sizes, block size, and the role of Sub-Bytes, Shift-Rows, Mix-Columns, and Add-Round-Key operations.
          4. Explain RSA algorithm in detail with an example.
          5. Given p=19, q=23, and e=3 Use RSA algorithm to find n, (n) and d.
          6. Explain about Chinese Remainder theorem.
          7. How do you use Chinese Remainder Theorem to reconstruct integers from their residues modulo functions.
          8. Explain the Chinese Remainder Theorem (CRT) with a numerical example. Solve for x in the system: x ≡ 1 (mod 3), x ≡ 2 (mod 4), x ≡ 3 (mod 5).
          9. Briefly explain Diffie Hellman key exchange with an example.
          10. How man in middle attack can be performed in Diffie Hellman algorithm.



          UNIT-IV

          Topics Covered:

          • Applications of cryptographic hash functions
          • Two simple hash functions
          • Requirements and security
          • Secure Hash Algorithm (SHA)
            • SHA-3


            Descriptive Questions (2 Marks):
            1. Define hash function.
            2. Name any two applications of Cryptographic Hash functions.
            3. What are the requirements of Hash functions?
            4. State any two basic requirements of a secure hash function.
            5. What is the output size of SHA-3 compared to SHA-2?


            Descriptive Questions (5 Marks):
            1. What are the requirements of hash functions? Explain.
            2. Explain in detail Hash Functions.
            3. Explain the basic working of a simple hash function like modular addition hash. Give suitable example.
            4. Explain the applications of cryptographic hash functions.
            5. Explain the Secure Hash Algorithm (SHA) with neat sketch.
            6. Describe SHA-1 algorithm in detail.
            7. Compare SHA-2 and SHA-3 in terms of structure, security, and performance. Why was SHA-3 introduced despite SHA-2 being secure?
            8. Explain the SHA-512 algorithm in detail using its block diagram. Discuss the steps involved in message padding, message scheduling, and compression.
            9. Describe MD5 algorithm in detail.
            10. Derive a birthday attack on a simplified hash function H(x) = (sum of letters mod 10) using two different messages.





            UNIT-V

            Topics Covered:

              • Bitcoin basics
              • Smart contracts
            • Block chain development platforms and APIs
            • Block chain ecosystem
            • Ethereum
            • Distributed consensus
            • Block chain applications



              Descriptive Questions (2 Marks):
              1. What are the challenges of creating a sustainable ecosystem?
              2. What is blockchain? Define it.
              3. Define Smart Contract.
              4. What is a smart contract in blockchain?
              5. What is the importance of Consensus in Block Chain technology?


              Descriptive Questions (5 Marks):
              1. How does decentralisation in block chain provide advantages over traditional centralised systems. Explain.
              2. What are the various Blockchain development Platforms available for creating and managing block chains? 
              3. Deep describe and compare the blockchain development platforms "Ethereum, Hyperledger and Corda".
              4. Describe the Bitcoin protocol in detail.
              5. Discuss the key features of Bitcoin. Explain how transactions are validated and how miners earn rewards.
              6. Explain about Ethereum in detail with an example.
              7. Explain the importance of smart contract in Block Chain technology.
              8. Explain what smart contracts are and how they operate on a block chain network.
              9. Consider supply chain management and explain the role of Blockchain technology in managing the supply chain process.
              10. Analyze the advantages and limitations of blockchain applications in finance, and healthcare sectors.
              11. Explain the concept of distributed consensus in blockchain. Compare proof-of-work (PoW) and proof-of-stake (PoS) mechanisms with examples.
              12. Compare and contrast Proof-of-Work (PoW), Proof-of-Stake (PoS), and Delegated Proof-of-Stake (DPoS).
              Continue reading →
              Friday, 4 September 2026

              Project Titles for Course Project on CNS

              0 comments

              Project Titles on Cryptography and Network Security

               

              S. No. 

               

              Project Title 

               

              Unit # 

               

              Key Concepts 

               

               

              1 

              Secure File Encryption System Using Classical Cryptographic Techniques 

               

               

               

              Unit I 

              Substitution techniques; Transposition techniques; Symmetric cipher model 

               

               

              2 

              Hybrid Encryption System Using Caesar, Playfair and Hill Ciphers 

               

               

              Unit I 

              Substitution techniques; Playfair cipher; Hill cipher; Classical encryption 

               

              3 

              Secure Data Hiding Using Cryptography and Steganography 

               

              Unit I 

              Steganography; Classical encryption techniques 

               

               

              4 

              Cryptanalysis and Attack Analysis of Classical Encryption Algorithms 

               

               

              Unit I 

              Classical encryption; Substitution; Transposition; Cryptanalysis and weaknesses 

               

               

              5 

              Comparative Analysis of Symmetric Encryption Algorithms 

               

               

              Unit II 

              Stream ciphers; Block ciphers; Block cipher principles; Attacks on block ciphers 

               

               

               6 

              DES-Based Secure File Encryption and Decryption System 

               

               

              Unit II

              Data Encryption Standard (DES); Block cipher principles; Encryption and decryption 

               

               7 

              Secure Communication Using RC4 Stream Cipher 

               

              Unit III 

              Stream ciphers; RC4; Symmetric encryption 

               

              8 

              AES-Based Secure Data Storage and Retrieval System 

               

               Unit III 

              Advanced Encryption Standard (AES); Block cipher 

               

              9 

              RSA-Based Secure Message Encryption and Digital Key Management 

               

              Unit III 

              Public key cryptography; RSA algorithm; Key management 

               

              10 

              Secure Key Exchange System Using Diffie–Hellman Algorithm 

               

              Unit III 

              Diffie–Hellman key exchange; Public key cryptography 

               

               

              11 

              Elliptic Curve Cryptography Based Secure Communication System 

               

               

              Unit III 

              Elliptic Curve Cryptography (ECC); Public key cryptography 

               

              12 

              Hybrid RSA–AES Encryption System for Secure File Transfer 

               

              Units II & III 

              AES; RSA; Block ciphers; Public key cryptography; Key management 

               

              13 

              Secure Password Storage Using Cryptographic Hash Functions 

               

              Unit IV 

              Cryptographic hash functions; Security requirements; Password integrity 

               

              14 

              File Integrity Verification System Using SHA-256/SHA-3 

               

              Unit IV 

              Secure Hash Algorithm (SHA); SHA-3; Data integrity 

               

               

              15 

              Secure Digital Document Authentication Using Cryptographic Hashing 

               

               

              Unit IV 

              Cryptographic hash functions; Authentication; Integrity 

               

              16 

              Comparative Security Analysis of SHA-2 and SHA-3 Hash Algorithms 

               

              Unit IV 

              SHA; SHA-3; Hash-function security requirements 

               

              17 

              Blockchain-Based Secure Academic Certificate Verification System 

               

              Unit V 

              Blockchain; Cryptographic hashing; Blockchain applications 

               

              18 

              Blockchain-Based Student Attendance Management System 

               

              Unit V 

              Blockchain; Distributed ledger; Blockchain applications 

               

               

              19 

              Blockchain-Based Secure Voting System Using Distributed Consensus 

               

               

              Unit V 

              Blockchain; Distributed consensus; Blockchain applications 

               

               

              20 

              Ethereum-Based Smart Contract for Secure Digital Transactions 

               

               

              Unit V 

              Ethereum; Smart contracts; Blockchain development platforms and APIs 

               

               

              21 

              Blockchain-Based Secure File Integrity and Data Sharing System 

               

               

              Units IV & V 

              Cryptographic hash functions; Blockchain; Data integrity; Blockchain applications 

              Continue reading →