ST Mary Security Answer
ST Mary Security Answer
ST Mary Security Answer
Mary’s University
School of Graduate Studies
MSc program in Computer Science
Final Exam Answer
Question No.2
A) Discuss how messages are digitally signed at the sender side and verified
at the receiver side using Hash function.
Digital signatures are created by encrypting a hash of the data with sender
private key, we gat the sender signature, this signature/hash can decrypt only
by sender public key.
E.g., let A is sender and B is receiver A crate a message and A encrypt a
message by hash function he uses his privet key to encrypt the message and
signed on his message then the message was gone to B must use to decrypt A
Public key.
B) Perform encryption and decryption using the RSA algorithm for: P=3,
q=11, e=7, m=5
the two parties will ask public key from certification authorities A and B
if they both received there public key from CA they will exchange there public
key after that
After exchanging PU a will send message that contains A ID identifier and
nonce N as transaction identifier in order to secure that he will use B public
key so B will responds back using A PU and new N transaction identifier
So after this they will now they be sure communicating each other
After this A will select secret session key and encrypt with his own private key
send to B so that B will authenticate he is communicating with A so B will
decrypt message using his own private key and after that with A public key .
Question No.4
A) Discuss Diffie-Hellman Algorithm for generating a shared secret session key.
(This is an application of IPSec/ SSL/PGP/S/MIME…)
Given: Users A and B use the Diffie-Hellman key exchange technique with a
common prime q = 71 and a primitive root a = 7.
a. If user A has private keyXA = 5, what is A's public key YA?
b. If user B has private keyXB = 12, what is B's public key YB?
A, Ya=75 mode 71
= 16807 mod 71
=51
B, YB=712mod 71
= 13841287201 mod 71
=4
KAB=YBXA mod 71
=45 mode 71
= 1024 mod 71
= 30
KAB=YAXB mod 71
=5112 mode 71
= mod 71
= 30
Question No.5
B. Present Direct Key Exchange (DKE) protocol for the exchange of secret
session key using RSA algorithm.
If A and B are sure about each other’s identity, and can be certain that a third
party will not masquerade, The key exchange protocols are more complex for
security that provides a higher level of either one-sided or mutual
authentication between two communicating parties. These protocols usually
involve Certificate Authorities.
Question No.6
A) In IPsec configuration, what is the difference between transport and tunnel
modes?
The key difference between transport and tunnel mode are tunnel mode
the original packet is encapsulated in another IP header. The addresses in the
other header can be different. In transport mode the IP addresses in the outer
header are used to determine the IPsec policy that will be applied to the packet
processed by AH/ESP and appropriate headers are added in front of the
transport header, IP header is then added in front of that by IP. In tunnel
mode, two IP headers are sent new and org Ip . The inner IP packet determines
the IPsec policy that protects its contents.
In general, transport mode IPsec only encapsulates the inner content
excluding the original IP header, while tunnel mode encapsulates the entire
inner content, including the IP header. In each case, the content needs to
traverse a network, therefore the outer IP header has to come from
somewhere.
B) What are the three main security services that VPN with IPSec provides?
types of VPN
WAN VPN: Branch offices
Access VPN: Roaming Users
Extranet VPNs: Suppliers and Customers