0% found this document useful (0 votes)
269 views2 pages

Final Exam No2 2021

This document is a final exam for an Introduction to Cryptography course. It consists of 4 exercises testing knowledge of cryptographic algorithms and concepts. Exercise 1 involves implementing steps of the A5/1 stream cipher algorithm. Exercise 2 draws the block diagram of a hash function built from a block cipher. Exercise 3 describes RSA key generation, encryption and decryption, and performs an example using given parameters. Exercise 4 considers the Elgamal signature scheme, calculating signatures, verifying signatures, and generating certificates with a Certification Authority.

Uploaded by

Võ Minh Kiệt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
269 views2 pages

Final Exam No2 2021

This document is a final exam for an Introduction to Cryptography course. It consists of 4 exercises testing knowledge of cryptographic algorithms and concepts. Exercise 1 involves implementing steps of the A5/1 stream cipher algorithm. Exercise 2 draws the block diagram of a hash function built from a block cipher. Exercise 3 describes RSA key generation, encryption and decryption, and performs an example using given parameters. Exercise 4 considers the Elgamal signature scheme, calculating signatures, verifying signatures, and generating certificates with a Certification Authority.

Uploaded by

Võ Minh Kiệt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

University of Science and Technology of Hanoi Intake: BI10+BI11 Academic year: 2021-2022

*** Date: 26/02/2022 Time: 75 minutes


Final Examination Important instructions:
Subject: Introduction to Cryptography - One-sided A4 page handwriting note
Exam code: 10 are allowed
Number of pages: 02 - Laptop is allowed

Exercise 1 (6/20)
Implement the A5/1 algorithm. Suppose that, after a particular step, the values in
registers are
X = (x0 , x1 , ..., x18 ) = (0110011001100110011)
Y = (y0 , y1 , ..., y21 ) = (1101110111011101110111)
Z = (z0 , z1 , ..., z22 ) = (11010001101000110100011)
The first keystream bit is computed with the initial values of the registers. List the
next 3 keystream bits (including the first keystream bit, left first. Give the contents of
X, Y, and Z after these 3 bits have been generated.

Exercise 2 (4/20)
Following hash function is built from block cipher with the encryption e(). Draw its block
diagram:
Hi = e(xi ⊕ Hi−1 , xi ) ⊕ Hi−1

Exercise 3 (4/20)
In RSA cryptosystem:
1. Describe key generation, encryption and decryption.
2. Let the two primes p = 211 and q = 97 be given as set-up parameters for RSA.
Which of the parameters e1 = 91, e2 = 89 is a valid RSA exponent? Justify your choice.
3. Compute the corresponding key-pair from above parameters. Using this keypair
to encrypt and decrypt plaintext: M = 5022
p, q are prime numbers, modulus N = p∗q, e denotes encryption exponent, M denotes
the plaintext.

Exercise 4 (6/20)
Consider the Elgamal signature scheme:
You are given Bob’s private key Kpr = (d) = (127) and the corresponding public key
Kpub = (p, α, β) = (509, 2, β).
1. Calculate the Elgamal signature (r,s) for a message from Bob to Alice with the
following messages x and ephemeral keys kE :
x = 8022, kE = 215
2. Two messages x1 , x2 are received with their corresponding signatures (ri , si ) from
Bob. Verify whether the messages (x1 , r1 , s1 ) = (22, 249, 413) and (x2 , r2 , s2 ) = (82, 249, 342)
both originate from Bob?
3. A given Certification Authority (CA) uses Elgamal signature scheme to generate
Certifications for Alice and Bob. The two IDs for them are correspondingly ID(A)=1 and
ID(B)=2. The CA uses the ephemeral keys kE = 213 and 215 for A’s, and B’s signatures,
respectively. The numbers that are chosen at each user to generate their public keys
(using Diffie-Helman Key Exchange scheme) are:

bA = 2022, bB = 2602
To obtain the certificates, the CA computes xi = 4 ∗ bi + ID(i) and uses this value as
input for the signature algorithm. Compute and verify two certificates CertA and CertB.

The End - Good Luck!

Page 2

You might also like