Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Information Security:Review the description and the python code for this password generator program and address the following: How does the application currently address Confidentiality, Authentication,

Information Security: Review the description and the python code for this password generator program and address the following:

How does the application currently address Confidentiality, Authentication, Availability, Integrity and Accountability (logging/auditing) ?

Its possible the application doesn't address one of the security core concepts already. You are merely doing an assessment of what is in place already.

Code:

import random

def generatePassword(pwlength):

alphabet = "abcdefghijklmnopqrstuvwxyz"

passwords = []

for i in pwlength:

password = ""
for j in range(i):
next_letter_index = random.randrange(len(alphabet))
password = password + alphabet[next_letter_index]

password = replaceWithNumber(password)
password = replaceWithUppercaseLetter(password)

passwords.append(password)

return passwords


def replaceWithNumber(pword):
for i in range(random.randrange(1,3)):
replace_index = random.randrange(len(pword)//2)
pword = pword[0:replace_index] + str(random.randrange(10)) + pword[replace_index+1:]
return pword


def replaceWithUppercaseLetter(pword):
for i in range(random.randrange(1,3)):
replace_index = random.randrange(len(pword)//2,len(pword))
pword = pword[0:replace_index] + pword[replace_index].upper() + pword[replace_index+1:]
return pword

def main():

numPasswords = int(input("How many passwords do you want to generate? "))

print("Generating " +str(numPasswords)+" passwords")

passwordLengths = []

print("Minimum length of password should be 3")

for i in range(numPasswords):
length = int(input("Enter the length of Password #" + str(i+1) + " "))
if length<3:
length = 3
passwordLengths.append(length)


Password = generatePassword(passwordLengths)

for i in range(numPasswords):
print ("Password #"+str(i+1)+" = " + Password[i])

main()

Description: Password Generator

The most difficult part of managing multiple accounts is generating a different strong password for each. A strong password is a mix of alphabets, numbers, and alphanumeric characters. Therefore, the best use of Python could be building a project where you could generate random passwords for any of your accounts.

In order to create a strong password, users can use this password generator to generate a random and customized password.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Assessment of Security Core Concepts 1 Confidentiality The application generates passwords using a m... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Information Security

Authors: Michael E. Whitman, Herbert J. Mattord

7th Edition

035750643X, 978-0357506431

More Books

Students also viewed these Programming questions

Question

How would you describe the Benton culture?

Answered: 1 week ago

Question

What are the role of supervisors ?

Answered: 1 week ago