Question: MUST BE DONE IN JAVA In this assignment you will implement a password salt verification system and brute force attack. You will be given a
MUST BE DONE IN JAVA

In this assignment you will implement a password salt verification system and brute force attack. You will be given a UID and Hash text files which include 101 user ids with corresponding hash values. The hash values are computed by concatenating the password value, which ranges from [0000, 1000), with the salt value, which range from (000, 100), using MD5 hashing. b. 1. Your first task is to verify the following user id, salt value, password value, and hash value: User id = 001, password = 0599, salt value = 054, and hash value = 4a1d6f102cd95fac33853e4d72fe1dc5. Create a function that can take a password value and a salt value and compute the MD5 value. NOTE: while concatenating 0599054, DO NOT omit the leading 0 otherwise the hash value will be different. a. When performing the MD5 hash use the encode format"utf-8" as shown below: def computeMD5hash(my_string): m = hashlib.md5() m.update(my_string.encode('utf-8')) return m. hexdigest() 2. Your second task is to determine all the user id's salt and password value that correspond to the hash value by means of a brute force method. The result should be displayed in a formatted manner as such but for all the users [ UID Hashed Password Password Salt] ['001', '4a1d6f102cd95fac33853e4d72fe1dc5', '0599', '054'] 3. Your final task is to prompt user to enter a user id and password and determine if it valid or not like so: Please enter Username: 001 Please enter Password: asd 001 asd The input password and salt does not match the hash value in the database Please enter Username: 001 Please enter Password: 0599 001 0599 The input password and salt matches the hash value in the database In this assignment you will implement a password salt verification system and brute force attack. You will be given a UID and Hash text files which include 101 user ids with corresponding hash values. The hash values are computed by concatenating the password value, which ranges from [0000, 1000), with the salt value, which range from (000, 100), using MD5 hashing. b. 1. Your first task is to verify the following user id, salt value, password value, and hash value: User id = 001, password = 0599, salt value = 054, and hash value = 4a1d6f102cd95fac33853e4d72fe1dc5. Create a function that can take a password value and a salt value and compute the MD5 value. NOTE: while concatenating 0599054, DO NOT omit the leading 0 otherwise the hash value will be different. a. When performing the MD5 hash use the encode format"utf-8" as shown below: def computeMD5hash(my_string): m = hashlib.md5() m.update(my_string.encode('utf-8')) return m. hexdigest() 2. Your second task is to determine all the user id's salt and password value that correspond to the hash value by means of a brute force method. The result should be displayed in a formatted manner as such but for all the users [ UID Hashed Password Password Salt] ['001', '4a1d6f102cd95fac33853e4d72fe1dc5', '0599', '054'] 3. Your final task is to prompt user to enter a user id and password and determine if it valid or not like so: Please enter Username: 001 Please enter Password: asd 001 asd The input password and salt does not match the hash value in the database Please enter Username: 001 Please enter Password: 0599 001 0599 The input password and salt matches the hash value in the database
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
