Cryptography Homework: Hash Functions and Password Generation

Verified

Added on  2023/04/23

|14
|1658
|349
Homework Assignment
AI Summary
This assignment solution delves into various aspects of cryptography, starting with the implementation of a toy tetragraph hash (tth) function for a given 48-letter message, detailing the steps involved in rounds 1 and 2 using matrix transformations and running totals. It further explores password security by calculating the number of possible passwords under different constraints, including case sensitivity and alphanumeric combinations. The assignment addresses the expected time to discover passwords under specific adversarial conditions and analyzes the probability of guessing passwords generated using a consonant-vowel-number (CVN) segment-based approach. Finally, it examines finer-grained access control mechanisms with role permissions in the context of an online entertainment store, illustrating conditional permissions based on user type, content rating, and release dates.
Document Page
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Contents
Chapter 2, Problem 2.7.c.......................................................................................................................3
1 - Chapter 3, Problem 3.2.....................................................................................................................3
2 - Chapter 3, Problem 3.3.....................................................................................................................4
2. A)......................................................................................................................................................4
2 B)........................................................................................................................................................5
3 - Chapter 3, Problem 3.5.....................................................................................................................5
3a).........................................................................................................................................................5
3b).........................................................................................................................................................6
Chapter 4, Problem 4.12........................................................................................................................6
Document Page
Chapter 2, Problem 2.7.c
The given letter message = I leave thirty million dollars to my friendly cousin John
The letter message contains 48 letter and we have divide that letter for 4 X 4 matrix. So that
40 letter divide by 3 block and each block have 16 letters (4 x 4 matrix)
First 16 letter = I leave thirty mill
Round 1
The text arranged by row wise (4 x 4 matrix) and that text convert into number (a=0, b=1,
c=2, d=3 etc.)
I l e a
v e t h
i r t y
m i l l
8 11 4 0
21 4 19 7
8 17 19 24
12 8 11 11
Add the each column value and mod 26.
8 11 4 0
21 4 19 7
8 17 19 24
12 8 11 11
49 40 53 42
To calculate the module value
Document Page
= 49 mod 26 = 23
= 40 mod 26 = 14
= 53 mod 26 = 1
= 42 mod 26 = 16
The running total is (23,14,1,16)
Round 2
Using round 1 matrix table and rotate the every column value. The first row value start from
second row value, the second row value start from third row value, the third row value start
from fourth row value and reverse the order for final row.
l e a I
t h v e
y i r t
l l i m
11 4 0 8
19 7 21 4
24 8 17 19
11 11 8 12
Again add the each column value.
11 4 0 8
19 7 21 4
24 8 17 19
11 11 8 12
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
65 30 46 43
Calculate the module value.
= 65 mod 26= 13
= 30 mod 26 =4
= 46 mod 26 =20
= 43 mod 26 =17
The running total is (4,13,17,20)
The message is “I leave thirty mill” and hash is “enru”
Second 16 letter = ion dollars to my fr
Round 1
The text arranged by row wise(4 x 4 matrix) and that text convert into
number(a=0,b=1,c=2,d=3 etc.,)
i o n d
o l l a
r s t o
m y f r
8 14 13 3
14 11 11 0
17 18 19 14
12 24 5 17
Add the each column value and mod 26.
Document Page
8 14 13 3
14 11 11 0
17 18 19 14
12 24 5 17
51 67 48 34
To calculate the module value
= 51 mod 26 = 25
= 67 mod 26 = 15
= 48mod 26 = 22
= 34 mod 26 = 8
The running total is (25,15,22,8)
Round 2
Using round 1 matrix table and rotate the every column value. The first row value start from
second row value, The second row value start from third row value, the third row value start
from fourth row value and reverse the order for final row.
o n d i
l a o l
o r s t
Document Page
r f y m
14 13 3 8
11 0 14 11
14 17 18 19
17 5 24 12
Again add the each column value.
14 13 3 8
11 0 14 11
14 17 18 19
17 5 24 12
56 35 59 50
Calculate the module value.
= 56 mod 26 =4
= 354 mod 26 =9
= 59 mod 26 =7
= 50 mod 26 =24
The running total is (4,7,9,24)
The message is “ion dollars to my fr” and hash is “ehjy”
Third 16 letter =iendly cousin John
Round 1
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
The text arranged by row wise(4 x 4 matrix) and that text convert into
number(a=0,b=1,c=2,d=3 etc.,)
i e n d
l y c o
u s i n
j o h n
8 4 13 3
11 24 2 14
20 18 8 13
9 14 7 13
Add the each column value and mod 26.
8 4 13 3
11 24 2 14
20 18 8 13
9 14 7 13
48 60 30 43
To calculate the module value
= 48 mod 26 = 22
= 60 mod 26 = 8
= 30mod 26 = 4
= 43 mod 26 = 17
Document Page
The running total is (22,8,4,17)
Round 2
Using round 1 matrix table and rotate the every column value. The first row value start from
second row value, The second row value start from third row value, the third row value start
from fourth row value and reverse the order for final row.
e n d i
c o l y
n u s i
n h o j
4 13 3 8
2 14 11 24
13 20 18 8
13 7 14 9
Again add the each column value.
4 13 3 8
2 14 11 24
13 20 18 8
13 7 14 9
32 54 46 9
Calculate the module value.
= 32 mod 26 =6
Document Page
= 54 mod 26 =2
= 46 mod 26 =20
= 49 mod 26 =23
The running total is (2,6,20,23)
The message is “iendly cousin John” and hash is “cgux”
The total letter message “I leave thirty million dollars to my friendly cousin John” and hash is
“enruehjycgux”
1 - Chapter 3, Problem 3.2
The password contains uppercase, lowercase or digits.
Total possible passwords = 628 (lowercase, uppercase and digit)
Uppercase letters passwords = 268 (Uppercase = A-Z)
Lowercase letters password = 268 (Lowercase = a-z)
Total alphabet letters password = 528 (Lowercase and uppercase = 26+26 =52)
Digit passwords = 108 (Numbers = 0-9)
= 268+268+108
Uppercase letters passwords
with special characters = 368
Lowercase letters password
with special characters = 368
Total alphabet letters password
with special characters = 528
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
= 368+368+528
We are using inclusion – exclusion principle
= 628 - [368+368+528] + [268+268+108]
= 159655911367680
2 - Chapter 3, Problem 3.3
The alphanumeric password means combination of letters and numerical. The alphabetical
like upper and lower case and digit are zero to more digits. So we have create the so many
passwords like
3463677
A578GVHJGH
Ad567Gjjkg
DGHAJ
Consider the 5 to 10 characters.52 possible letters (upper and lower case 26+26=52)
552+652+752+852+952+1052
Possible alphanumeric passwords
=10,041,837,000,000,000,000,088,928,256,128,832,568,808,656,600,600,440
2. A)
Consider the adversary that incorrect character does not get feedback.
The possibilities = 264
Document Page
= 456976
Half possibilities for correct password = 456976/2
= 228488 attempts
Consider the one day hours = 60 x60 x24
= 86400 seconds
The attempts are equal to seconds.
228488 attempts = 228488 seconds
Calculate the number of days = 228488/86400
= 2.644 days
That days calculte to hours
2.644 days = 24 X 2.644
= 63.456 hrs
63.456 hrs = 63.5 hrs(approximately)
63.5 hrs is the expexted time to discover the correct password.
2 B)
Alphebetic character = 26
Expected tries for each digit = 26/2
= 13
Combination character = 4
Time = 13 X 4
= 52 seconds
52 seconds is the expected time to discover the coorrect password.
chevron_up_icon
1 out of 14
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]