Question: Please identify the password verification function that is NOT vulnerable to timing attacks. Question 1 0 options: def string _ compare _ 2 ( s

Please identify the password verification function that is NOT vulnerable to timing attacks.
Question 10 options:
def string_compare_2(s1,s2): if len(s1)!= len(s2): return False flag = True for i in range(len(s1)): if s1[i]!= s2[i]: flag = False return flag def check_password_2(password): hardcoded_password = "xyzabchijk" if string_compare_2(password, hardcoded_password): return True else: return False
def string_compare_1(s1,s2): if len(s1)!= len(s2): return False for i in range(len(s1)): if s1[i]!= s2[i]: return False return True def check_password_1(password): hardcoded_password = "xyzabchijk" if string_compare_1(password, hardcoded_password): return True else: return False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!