BSc CSIT (TU) Science Cryptography (BSc CSIT, CSC316) Question Paper 2080 Nepal
This is the official BSc CSIT (TU) (Science stream) Cryptography (BSc CSIT, CSC316) question paper for 2080, as set in the regular annual examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Cryptography (BSc CSIT, CSC316) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Cryptography (BSc CSIT, CSC316) exam or solving previous years' question papers, this 2080 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Explain classical encryption techniques. Describe the Playfair cipher and the Hill cipher with examples of encryption.
Classical Encryption Techniques
Classical encryption operates on plaintext letters using substitution (replacing letters with others) and transposition (rearranging letter positions). They use a shared secret key and are vulnerable to frequency analysis. Two important polyalphabetic/digraph-and-matrix examples are the Playfair and Hill ciphers.
Playfair Cipher
The Playfair cipher is a digraph substitution cipher that encrypts pairs of letters using a key matrix built from a keyword (I and J share a cell).
Key = MONARCHY:
| M | O | N | A | R |
| C | H | Y | B | D |
| E | F | G | I/J | K |
| L | P | Q | S | T |
| U | V | W | X | Z |
Rules for each digraph (insert filler X between identical letters; pad odd length):
- Same row → take the letter to the right (wrap around).
- Same column → take the letter below (wrap around).
- Rectangle → each letter is replaced by the letter in its own row at the other letter's column.
Example: encrypt BALLOON → split as BA LX LO ON.
BA: rectangle →IB→ IBLX: rectangle → SULO: rectangle → PMON: same row → NA
Ciphertext = IBSUPMNA.
Hill Cipher
The Hill cipher is a polygraphic substitution cipher based on linear algebra mod 26. A block of letters (as numbers ) is encrypted by multiplying with an invertible key matrix :
Example (): , plaintext HI = .
So ciphertext = TC. Decryption uses (which exists only if ).
What is a digital signature? Explain the digital signature scheme using RSA and the role of digital signatures in authentication and non-repudiation.
Digital Signature
A digital signature is a cryptographic value, computed from a message and the signer's private key, that lets any verifier confirm the message's authenticity, integrity and origin using the signer's public key. Unlike encryption (which provides confidentiality), a signature provides proof of who created the message and that it was not altered.
Digital Signature Scheme Using RSA
RSA can be used in reverse for signing: the signer encrypts the message digest with the private key, and anyone can verify with the public key.
Setup: key pair public and private where .
Signing (by sender):
- Compute a hash of the message: .
- Sign with the private key: .
- Send .
Verification (by receiver):
- Recover the hash: .
- Independently compute .
- If , the signature is valid; otherwise it is rejected.
Hashing before signing ensures fixed-size input, efficiency, and security.
Role in Authentication and Non-Repudiation
- Authentication: Only the holder of the private key could produce a signature that verifies with the matching public key, so a valid signature authenticates the sender's identity.
- Integrity: Because the signature is over the message hash, any change to makes , exposing tampering.
- Non-repudiation: Since the private key is known only to the signer, the signer cannot later deny having signed the message; the signature is binding evidence accepted by a third party (e.g., in disputes).
Explain the RSA algorithm. Show how encryption and decryption are performed. Choose two primes p=7 and q=11, compute the public and private key pairs and encrypt the message M=8.
RSA Algorithm
RSA is a public-key (asymmetric) cryptosystem whose security rests on the difficulty of factoring the product of two large primes.
Key Generation
- Choose two large primes and .
- Compute (the modulus).
- Compute .
- Choose public exponent with and .
- Compute private exponent .
- Public key , Private key .
Encryption / Decryption
Worked Example:
- .
- .
- Choose ().
- Find with . Since , we get .
- Public key , Private key .
Encryption of :
Compute by repeated squaring: , , .
So .
Verification (decryption): , recovering the original message.
(Note: with instead, and ; any valid coprime to 60 works.)
Section B: Short Answer Questions
Attempt any EIGHT questions.
Explain the families of SHA-2 and their differences from SHA-1.
SHA-2 Family and Differences from SHA-1
SHA-2 is a family of cryptographic hash functions designed by the NSA (2001) using a Merkle–Damgård construction with Davies–Meyer compression. Members differ in digest length and internal word size:
| Variant | Digest size | Word/Block size | Rounds |
|---|---|---|---|
| SHA-224 | 224 bits | 32-bit / 512-bit block | 64 |
| SHA-256 | 256 bits | 32-bit / 512-bit block | 64 |
| SHA-384 | 384 bits | 64-bit / 1024-bit block | 80 |
| SHA-512 | 512 bits | 64-bit / 1024-bit block | 80 |
| SHA-512/224, SHA-512/256 | 224/256 bits | truncated SHA-512 | 80 |
Differences from SHA-1
- Digest length: SHA-1 produces only 160 bits; SHA-2 produces 224–512 bits, giving a much larger output space.
- Security: SHA-1 is broken for collision resistance (practical collisions demonstrated, e.g., SHAtter 2017); SHA-2 has no known practical collision attacks.
- Rounds & complexity: SHA-2 uses more rounds (64/80) and a more complex message schedule and round function.
- Word size: SHA-1 and SHA-256 use 32-bit words; SHA-384/512 use 64-bit words for efficiency on 64-bit hardware.
SHA-2 is therefore recommended over SHA-1 for digital signatures, certificates and integrity checks.
What is Public Key Infrastructure (PKI)? Explain the role of a Certificate Authority and digital certificates.
Public Key Infrastructure (PKI)
PKI is the framework of hardware, software, policies, standards and procedures used to create, manage, distribute, store and revoke digital certificates and public–private key pairs. It binds public keys to verified identities, enabling secure, trusted communication over insecure networks.
Core components: Certificate Authority (CA), Registration Authority (RA), digital certificates, a certificate repository/directory, and a Certificate Revocation List (CRL)/OCSP.
Certificate Authority (CA)
The CA is the trusted third party that:
- Verifies the identity of an applicant (often via an RA).
- Issues digital certificates by digitally signing them with the CA's own private key.
- Revokes compromised or expired certificates and publishes a CRL.
- Acts as the root of trust; clients trust certificates that chain up to a trusted root CA.
Digital Certificates
A digital certificate (typically X.509) is an electronic document that binds a public key to an identity. It contains:
- Subject name (owner) and the subject's public key,
- Issuer (CA) name, serial number, validity period,
- The CA's digital signature over the certificate.
When a party presents its certificate, the receiver verifies the CA's signature using the CA's public key, thereby trusting that the enclosed public key truly belongs to the named subject—providing authentication and enabling secure key exchange (e.g., in TLS/HTTPS).
Explain the basic logic of malicious code: viruses, worms and trojan horses.
Malicious Code: Viruses, Worms and Trojan Horses
Malicious code (malware) is any program intentionally written to damage systems, steal data or disrupt operations.
Virus
A virus is a code fragment that attaches itself to a host program or file and replicates by inserting copies into other programs when the infected host runs. It requires human action (running the infected file) to spread. Phases: dormant → propagation → triggering → execution (payload). Example: file-infector and macro viruses.
Worm
A worm is a standalone, self-replicating program that spreads automatically across networks by exploiting vulnerabilities, without needing a host file or user action. It consumes bandwidth and resources and can carry payloads. Example: Morris worm, Conficker.
Trojan Horse
A Trojan horse is a program that masquerades as legitimate or useful software but secretly performs malicious actions (e.g., installing a backdoor, stealing credentials). It does not self-replicate; it relies on social engineering to trick the user into installing it.
Key distinction: a virus needs a host and user action; a worm self-propagates over networks; a Trojan does not replicate but disguises its malicious intent.
State the Chinese Remainder Theorem and use it to solve a system of congruences.
Chinese Remainder Theorem (CRT)
Statement: If are pairwise coprime positive integers and , then the system
has a unique solution modulo .
The solution is , where and .
Worked Example
Solve:
.
- .
- .
- .
.
Answer: (check: , , ).
Explain the goals of security: confidentiality, integrity and availability. List the different types of security attacks.
Security Goals (CIA Triad) and Types of Attacks
Goals of Security
- Confidentiality: Ensures information is accessible only to authorized parties; prevents unauthorized disclosure (achieved by encryption, access control).
- Integrity: Ensures data is accurate and not altered by unauthorized parties; any modification is detectable (achieved by hashes, MACs, digital signatures).
- Availability: Ensures systems and data are accessible to authorized users whenever needed (protected against DoS, ensured by redundancy/backups).
Types of Security Attacks
Classified (per Stallings) as passive and active:
Passive attacks (eavesdropping; hard to detect, aim is to obtain information):
- Release of message contents
- Traffic analysis
Active attacks (modify data or affect operation):
- Masquerade – pretending to be another entity
- Replay – capturing and retransmitting data
- Modification of messages – altering content/order
- Denial of Service (DoS) – disrupting availability
Alternatively by goal: interception (confidentiality), modification & fabrication (integrity), and interruption (availability).
Differentiate between symmetric and asymmetric key cryptography with examples.
Symmetric vs Asymmetric Key Cryptography
| Feature | Symmetric Key | Asymmetric Key |
|---|---|---|
| Keys | Single shared secret key for both encrypt & decrypt | Key pair: public key + private key |
| Key distribution | Hard — secret key must be shared securely | Easy — public key can be freely distributed |
| Speed | Fast, efficient for bulk data | Slow (heavy math), used for small data |
| Number of keys | keys for users | keys ( pairs) |
| Used for | Bulk encryption | Key exchange, digital signatures |
| Examples | DES, 3DES, AES, RC4, Blowfish | RSA, Diffie–Hellman, ElGamal, ECC |
Symmetric cryptography uses the same key, e.g., AES encrypts and decrypts a file with one shared key. Asymmetric uses mathematically related but different keys: data encrypted with the public key can only be decrypted with the matching private key (e.g., RSA); this solves the key-distribution problem and enables digital signatures.
In practice, hybrid systems combine both: asymmetric crypto exchanges a session key, then fast symmetric crypto encrypts the actual data.
Explain the Caesar cipher and the mono-alphabetic substitution cipher with examples of their cryptanalysis.
Caesar Cipher and Mono-alphabetic Substitution
Caesar Cipher
A Caesar cipher shifts each plaintext letter by a fixed key :
Example (): HELLO → KHOOR.
Cryptanalysis: there are only 25 possible keys, so a brute-force (exhaustive key search) attack tries all shifts and inspects which produces readable plaintext — trivially broken.
Mono-alphabetic Substitution Cipher
Each plaintext letter is mapped to a fixed but arbitrary ciphertext letter using a permutation of the alphabet, giving a key space of , far too large for brute force.
Cryptanalysis: it is broken by frequency analysis, because the substitution preserves the statistical structure of the language. The analyst:
- Counts letter frequencies in the ciphertext.
- Maps the most frequent ciphertext letters to common English letters (
E,T,A,O...). - Uses common digrams (
TH,HE) and trigrams (THE,ING) to refine the mapping until plaintext emerges.
Thus, despite a huge key space, the mono-alphabetic cipher is insecure because it leaks language statistics.
Explain modular arithmetic and Euler's totient function. Compute phi(35) and phi(24).
Modular Arithmetic and Euler's Totient Function
Modular Arithmetic
Modular arithmetic deals with integers that wrap around upon reaching a modulus . We write if , i.e., and leave the same remainder when divided by . It satisfies addition, subtraction and multiplication congruences and is the foundation of RSA, Diffie–Hellman, etc. Example: .
Euler's Totient Function
counts the positive integers that are coprime to (i.e., ).
- For a prime : .
- If , then .
- Multiplicative: when .
Computations
: (both prime), so
: , so
Explain the ElGamal cryptographic system for encryption and decryption.
ElGamal Cryptosystem
ElGamal is a public-key encryption scheme whose security relies on the difficulty of the discrete logarithm problem in a cyclic group. It is probabilistic (randomized).
Key Generation
- Choose a large prime and a primitive root (generator) of .
- Choose a private key with .
- Compute .
- Public key , Private key .
Encryption (of message , )
- Pick a random ephemeral key , .
- Compute and .
- Ciphertext .
Decryption
Using private key :
since , the masking factor cancels.
Example
Let , , private , so . Encrypt with :
- .
- .
- Ciphertext .
Decrypt: ; inverse of is ; . ✓
Frequently asked questions
- Where can I find the BSc CSIT (TU) Cryptography (BSc CSIT, CSC316) question paper 2080?
- The full BSc CSIT (TU) Cryptography (BSc CSIT, CSC316) 2080 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
- Does the Cryptography (BSc CSIT, CSC316) 2080 paper come with solutions?
- Yes. Every question on this Cryptography (BSc CSIT, CSC316) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BSc CSIT (TU) Cryptography (BSc CSIT, CSC316) 2080 paper?
- The BSc CSIT (TU) Cryptography (BSc CSIT, CSC316) 2080 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
- Is practising this Cryptography (BSc CSIT, CSC316) past paper free?
- Yes — reading and attempting this Cryptography (BSc CSIT, CSC316) past paper on Kekkei is completely free.