Probability Engine · CSC316

Cryptography (BSc CSIT, CSC316): the questions likely to come

33 analyzed questions from 8 past papers (2074-2082), grouped by syllabus unit — each with its probability, how often it's been asked, and where to study the answer.

8
Papers analyzed
2074-2082
33
Analyzed questions
across 5 syllabus units
5
Very likely units
high-probability topics
4
Units = 80% of marks
study these first
Model answers for this subject are being written. Every question links to its original paper so you can study from the source meanwhile.
Pick a unit
U3 · Q1/10 · 208110 marks
Number Theory and Asymmetric Ciphers

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.

38%
Possible to appearAppeared in 3 of the last 3 board papers
Seen in
How well do you know this?rating moves you on
MODEL ANSWERU3 · 10 marks

RSA Algorithm

RSA is a public-key (asymmetric) cryptosystem whose security rests on the difficulty of factoring large integers.

Key Generation

  1. Choose two large primes pp and qq.
  2. Compute n=p×qn = p \times q.
  3. Compute Euler's totient ϕ(n)=(p1)(q1)\phi(n) = (p-1)(q-1).
  4. Choose public exponent ee with 1<e<ϕ(n)1 < e < \phi(n) and gcd(e,ϕ(n))=1\gcd(e, \phi(n)) = 1.
  5. Compute private exponent de1(modϕ(n))d \equiv e^{-1} \pmod{\phi(n)}.
  • Public key: (e,n)(e, n) Private key: (d,n)(d, n).

Encryption / Decryption

  • Encryption: C=MemodnC = M^{e} \bmod n.
  • Decryption: M=CdmodnM = C^{d} \bmod n.

Worked Example: p=7p = 7, q=11q = 11, M=8M = 8

Step 1 — n: n=7×11=77n = 7 \times 11 = 77.

Step 2 — totient: ϕ(n)=(71)(111)=6×10=60\phi(n) = (7-1)(11-1) = 6 \times 10 = 60.

Step 3 — choose e: pick e=13e = 13 (since gcd(13,60)=1\gcd(13, 60) = 1).

Step 4 — compute d: find dd with 13d1(mod60)13d \equiv 1 \pmod{60}. 13×37=481=8×60+11(mod60)13 \times 37 = 481 = 8 \times 60 + 1 \equiv 1 \pmod{60}, so d=37d = 37.

  • Public key: (e,n)=(13,77)(e, n) = (13, 77)
  • Private key: (d,n)=(37,77)(d, n) = (37, 77)

Step 5 — encrypt M = 8:

C=Memodn=813mod77.C = M^{e} \bmod n = 8^{13} \bmod 77.

Using successive squaring mod 77:

  • 82=648^{2} = 64
  • 84=642=409615(mod77)8^{4} = 64^{2} = 4096 \equiv 15 \pmod{77}
  • 88=152=22571(mod77)8^{8} = 15^{2} = 225 \equiv 71 \pmod{77}
  • 813=888481=71×15×88^{13} = 8^{8} \cdot 8^{4} \cdot 8^{1} = 71 \times 15 \times 8.
  • 71×15=106564(mod77)71 \times 15 = 1065 \equiv 64 \pmod{77}; 64×8=51250(mod77)64 \times 8 = 512 \equiv 50 \pmod{77}.
C=50.\boxed{C = 50}.

(Check: decryption 5037mod77=850^{37} \bmod 77 = 8 recovers the message.)

AI-generated answer · unverifiedView in 2081 paper →
U3 · Question 1 of 10
Question Priority · U3ranked by appearance likelihood — study top-down

Number Theory and Asymmetric Ciphers

Analyzed next51%
1
★ TOP PICK

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.

10 marksSEEN IN
38%
2

Explain the Diffie-Hellman key exchange algorithm with an example. Show how an eavesdropper can perform a man-in-the-middle attack on this protocol.

10 marksSEEN IN
30%
3

State the Chinese Remainder Theorem and use it to solve a system of congruences.

5 marksSEEN IN
51%
4

Explain the ElGamal cryptographic system for encryption and decryption.

5 marksSEEN IN
50%
5

Illustrate the man in middle attack in Diffie – Hellman key exchange protocol. Assume the prime number be 19 and 10 as its primitive root. Select 5 as private key and 4 as random integer. Find the cipher text of M = 2 using Elgamal crypto system.

10 marksSEEN IN
25%
6

State and explain Fermat's little theorem and Euler's theorem with examples.

5 marksSEEN IN
44%
7

Explain modular arithmetic and Euler's totient function. Compute phi(35) and phi(24).

5 marksSEEN IN
43%
8

Is a man-in-the-middle attack possible in the Diffie-Hellman algorithm? Justify your answer.

5 marksSEEN IN
40%
9

State Fermat's theorem with example. What is the implication of discrete logarithm?

5 marksSEEN IN
25%
10

Differentiate between symmetric and asymmetric key cryptography with examples.

5 marksSEEN IN
15%
03The mock

Sit a probable paper

A full mock exam built from the most likely questions, mirroring the real paper's structure. Every slot is a real past question.

Most Probable Paper

Mirrors the real structure · 60 marks · based on 8 past papers

Section A: Long Answer QuestionsAttempt any TWO questions.
  1. 1.

    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.

    [10 marks]
    Number Theory and Asymmetric CiphersVery likelyfrom 2081 paper →

    This question has recurred in 3 of 8 years; so far only in internal assessments, not the board; and its topic (Number Theory and Asymmetric Ciphers) appears in 100% of years.

  2. 2.

    Explain the Diffie-Hellman key exchange algorithm with an example. Show how an eavesdropper can perform a man-in-the-middle attack on this protocol.

    [10 marks]
    Number Theory and Asymmetric CiphersVery likelyfrom 2078 paper →

    This question has recurred in 3 of 8 years; so far only in internal assessments, not the board; and its topic (Number Theory and Asymmetric Ciphers) appears in 100% of years.

  3. 3.

    Explain classical encryption techniques. Describe the Playfair cipher and the Hill cipher with examples of encryption.

    [10 marks]
    Symmetric CiphersVery likelyfrom 2080 paper →

    This question has recurred in 3 of 8 years; so far only in internal assessments, not the board; and its topic (Symmetric Ciphers) appears in 100% of years.

Section B: Short Answer QuestionsAttempt any EIGHT questions.
  1. 1.

    Explain the basic logic of malicious code: viruses, worms and trojan horses.

    [5 marks]
    IntroductionVery likelyfrom 2082 paper →

    This question has recurred in 6 of 8 years; so far only in internal assessments, not the board; and its topic (Introduction) appears in 88% of years.

  2. 2.

    Explain the ElGamal cryptographic system for encryption and decryption.

    [5 marks]
    Number Theory and Asymmetric CiphersVery likelyfrom 2081 paper →

    This question has recurred in 5 of 8 years; so far only in internal assessments, not the board; and its topic (Number Theory and Asymmetric Ciphers) appears in 100% of years.

  3. 3.

    State and explain Fermat's little theorem and Euler's theorem with examples.

    [5 marks]
    Number Theory and Asymmetric CiphersVery likelyfrom 2079 paper →

    This question has recurred in 5 of 8 years; so far only in internal assessments, not the board; and its topic (Number Theory and Asymmetric Ciphers) appears in 100% of years.

  4. 4.

    Explain the Caesar cipher and the mono-alphabetic substitution cipher with examples of their cryptanalysis.

    [5 marks]
    Symmetric CiphersVery likelyfrom 2081 paper →

    This question has recurred in 5 of 8 years; so far only in internal assessments, not the board; and its topic (Symmetric Ciphers) appears in 100% of years.

  5. 5.

    Explain the families of SHA-2 and their differences from SHA-1.

    [5 marks]
    Cryptographic Data Integrity AlgorithmsVery likelyfrom 2080 paper →

    This question has recurred in 5 of 8 years; so far only in internal assessments, not the board; and its topic (Cryptographic Data Integrity Algorithms) appears in 100% of years.

  6. 6.

    What is a Message Authentication Code (MAC)? Explain how HMAC works.

    [5 marks]
    Cryptographic Data Integrity AlgorithmsVery likelyfrom 2081 paper →

    This question has recurred in 5 of 8 years; so far only in internal assessments, not the board; and its topic (Cryptographic Data Integrity Algorithms) appears in 100% of years.

  7. 7.

    Explain the goals of security: confidentiality, integrity and availability. List the different types of security attacks.

    [5 marks]
    IntroductionVery likelyfrom 2081 paper →

    This question has recurred in 5 of 8 years; so far only in internal assessments, not the board; and its topic (Introduction) appears in 88% of years.

  8. 8.

    State the Chinese Remainder Theorem and use it to solve a system of congruences.

    [5 marks]
    Number Theory and Asymmetric CiphersVery likelyfrom 2081 paper →

    This question has recurred in 4 of 8 years; so far only in internal assessments, not the board; and its topic (Number Theory and Asymmetric Ciphers) appears in 100% of years.

  9. 9.

    Explain modular arithmetic and Euler's totient function. Compute phi(35) and phi(24).

    [5 marks]
    Number Theory and Asymmetric CiphersVery likelyfrom 2081 paper →

    This question has recurred in 4 of 8 years; so far only in internal assessments, not the board; and its topic (Number Theory and Asymmetric Ciphers) appears in 100% of years.

04The receipts

Behind the numbers

The raw evidence the predictions are computed from: marks per unit per year, syllabus weights, trends, and coverage.

Show the heatmap, topic table and coverage analysis

The receipt: marks per unit, per year

Each row is a syllabus unit, each column an exam year, each cell the marks that unit earned that year. Click any cell to see the actual questions behind it.

Marks:nonefew → many
2074
2075
2077
2078
2079
2080
2081
2082
Total
U3Number Theory and Asymmetric Ciphers
190
U2Symmetric Ciphers
160
U4Cryptographic Data Integrity Algorithms
125
U1Introduction
75
U5Mutual Trust
50
#Syllabus unitProbabilityAppearedAvg marksSyllabus weightExam vs syllabusTrendQuestions
1U3Number Theory and Asymmetric CiphersVery likely100%23.831%14 lecture hrsBalancedexam 32% · syllabus 31%Fading7 recurring10 total
2U2Symmetric CiphersVery likely100%2027%12 lecture hrsBalancedexam 27% · syllabus 27%Fading5 recurring9 total
3U4Cryptographic Data Integrity AlgorithmsVery likely100%15.618%8 lecture hrsBalancedexam 21% · syllabus 18%Rising4 recurring6 total
4U1IntroductionVery likely88%10.711%5 lecture hrsBalancedexam 12% · syllabus 11%Rising3 recurring4 total
5U5Mutual TrustVery likely88%7.113%6 lecture hrsBalancedexam 8% · syllabus 13%Steady2 recurring4 total

Study smart, not hard

Drag the slider: studying the top 4 units in priority order covers ~92% of all observed marks.

  1. ~80% line

Lecture time vs exam marks

Where the exam pays more than the curriculum spends: ● lectures vs ● exam marks, as a share of the whole course. A long teal-leading bar = high-yield unit.

U3Number Theory and Asymmetric Ciphers
31% of lectures → 32% of marks
U2Symmetric Ciphers
27% of lectures → 27% of marks
U4Cryptographic Data Integrity Algorithms
18% of lectures → 21% of marks
U1Introduction
11% of lectures → 12% of marks
U5Mutual Trust
13% of lectures → 8% of marks

Topics are the official CSC316 syllabus units. Predictions are data-driven probabilities computed from 8 past papers (2074-2082) by mapping each real question to its syllabus unit. They indicate what has historically been likely, not guaranteed questions. Always study the full syllabus.