mirror of
https://github.com/billbuchanan/appliedcrypto.git
synced 2026-02-21 11:18:02 +00:00
Update mock_01.md
This commit is contained in:
@@ -1,15 +1,70 @@
|
||||

|
||||
|
||||
# Assessments
|
||||
The module has two core learning outcomes:
|
||||
The test will have short answer/essay questions. Here is a tutorial for the test and to test your knowledge an MCQ test is [here]. Make sure you can complete the following test examples. Any questions, ask Bill?
|
||||
Q1. Diffie-Hellman
|
||||
|
||||
* LO1: Explain and demonstrate a critical understanding of specific cryptographic algorithms and cryptosystems.
|
||||
* LO2: Implement, critically analyse and evaluate fundamental areas related to state-of-the-art cryptography related area, including current literature, practical implementation and evaluation.
|
||||
1. G=2351, N=5683, x=7, y=14. What is the shared key?
|
||||
|
||||
The first test accounts for 40% of the overall grant, and the coursework accounts for 60%. The assessments are:
|
||||
Q2. Key Entropy
|
||||
|
||||
* Test 1 [here](https://github.com/billbuchanan/appliedcrypto/tree/master/z_assessments/test01).
|
||||
* C/W [here](https://github.com/billbuchanan/appliedcrypto/tree/master/z_assessments/coursework).
|
||||
2. If we have a 16-bit key, but only use 200 phrases. What is the key entropy?
|
||||
|
||||
<!-- The lecture from Week 6 on the coursework is [here](https://www.youtube.com/watch?v=ltqJfNxF3ew&feature=youtu.be). -->
|
||||
Q3. Key Cracking
|
||||
|
||||
3. If it takes 10ns to test an encryption key. How long will it take to crack a 20-bit key?
|
||||
|
||||
Q4. Public key
|
||||
|
||||
4. Outline how Bob proves his identity to Alice using public key.
|
||||
|
||||
Q5. Public key generation
|
||||
|
||||
5. With RSA, Bob selects two prime numbers of: p=3, q=5. What are the encryption and decryption keys? For a message of 4, prove that the decrypted value is the same of the message.
|
||||
|
||||
Q6. Encoding
|
||||
|
||||
6. What is the Base-64 encoding for "test"?
|
||||
|
||||
Q7. Salting
|
||||
|
||||
7. On a Linux system, using APR1, how is the salt defined in the password file?
|
||||
|
||||
Answers
|
||||
Q1.
|
||||
|
||||
A=(2351^7) mod 5683 = 4612
|
||||
B=(2351^14) mod 5683 = 4758
|
||||
Key = 4758^7 mod 5683 = 4614
|
||||
|
||||
Q2.
|
||||
|
||||
Key entropy = log (phases) / log (2)
|
||||
Key entropy = log (200) / log (2) = 7.6 bits
|
||||
|
||||
Q.3.
|
||||
|
||||
Max time to crack = 10e-9 x 2^20
|
||||
Max time to crack = 0.01 seconds
|
||||
|
||||
Q.5.
|
||||
|
||||
N=p x q = 3 x 5 = 15
|
||||
PHI = (p-1)(q-1) = 8
|
||||
Pick e for no factors of PHI (1, 2, 4). So let's pick 3.
|
||||
(3 x d) mod 8 = 1
|
||||
d = 3
|
||||
|
||||
encryption key [15,3]
|
||||
Decryption key [15,3]
|
||||
|
||||
Message = 4
|
||||
Encrypt: 4^3 mod 15 = 4
|
||||
Decrypt: 4^3 mod 15 = 4
|
||||
|
||||
Q6.
|
||||
|
||||
test -> 01110100 01100101 01110011 01110100
|
||||
test -> 011101 000110 010101 110011 011101 00
|
||||
test -> d G V z d A ==
|
||||
|
||||
|
||||
Reference in New Issue
Block a user