0% found this document useful (0 votes)
7 views

CS File (1)

The document outlines a project on creating a Random Password Generator using Python, aimed at automating the generation of secure passwords. It includes sections on acknowledgments, libraries used, building instructions, applications, advantages and disadvantages, future scope, and a conclusion highlighting its importance in enhancing digital security. The project emphasizes the need for strong passwords and suggests potential improvements for greater complexity and integration with password management systems.

Uploaded by

Aditya Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

CS File (1)

The document outlines a project on creating a Random Password Generator using Python, aimed at automating the generation of secure passwords. It includes sections on acknowledgments, libraries used, building instructions, applications, advantages and disadvantages, future scope, and a conclusion highlighting its importance in enhancing digital security. The project emphasizes the need for strong passwords and suggests potential improvements for greater complexity and integration with password management systems.

Uploaded by

Aditya Tiwari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

KV OF KATNI

RANDOM PASSWORD
GENERATOR

COMPUTER SCIENCE
INVSTEGATORY PROJECT

SUBMITTED TO- SUBMITTED BY-


Mr. Satish Mishra Sir Aditya Tiwari
PGT CS XII A
TABLE OF CONTENT

Acknowledgement
Certificate
Introduction
Libraries Used
How to Build
Applications
Advantages & Dissdvantages
Future Scope
Conclusion
ACKNOWLEDGEMENT

I would like to express my sincere


gratitude to my Computer Science
teacher, Mr. Satish Mishra, PGT (CS),
for his able guidance, encouragement,
and vital support throughout the
completion of this project. His valuable
insights and constructive feedback
have been instrumental in the
successful execution of my work.
I am also deeply grateful to our
Principal, Mrs. Akansha Samuel, for
providing me with all the necessary
facilities and resources required for this
project.
Lastly, I extend my heartfelt thanks to
my family and friends for their
unwavering support and encouragement
during this endeavor.
CERTIFICATE

This is to certify that Mr. Aditya


Tiwari of Class 12th-A has
successfully completed his Physics
Project File for the academic
session 2024-25. He has
demonstrated utmost sincerity,
dedication, and attention to detail
in the completion of his project.
All the work related to the project
has been carried out independently
by the candidate himself. His
approach to the subject has been
both sincere and scientific, and the
project meets the prescribed
guidelines issued by CBSE [2024-
25].
I certify that his project has met
my expectations and reflects
commendable effort.
INTRODUCTION

In today's digital world, secure


authentication is crucial to protect
sensitive data and personal
information. Passwords are the
most common method used for this
purpose. However, creating strong
and secure passwords manually
can be difficult. This project
focuses on the development of a
Random Password Generator that
automates the process of
generating secure passwords with a
specified length. The program
generates passwords using random
characters, including lowercase
letters, numbers, and uppercase
letters, ensuring unpredictability
and security.
LIBRARIES USED

The project primarily utilizes the


random library in Python for generating
random values. The library provides
functions for generating random
numbers, selecting random elements
from a sequence, and shuffling
sequences.
random.randrange(start, stop):
Generates a random number in the
specified range.
random.choice(sequence): Returns a
random element from the given
sequence (not used in the current
code but could be useful for future
improvements).
This library is essential for creating
unpredictability in the password
generation process, which is critical for
security.
HOW TO BUILD
Define Functions:
generatePassword(pwlength): This function generates a password
for each specified length. It iterates through a list of password
lengths and generates random lowercase letters for each
password.
replaceWithNumber(pword): Randomly replaces one or two letters
in the password with a number between 0 and 9. This increases
the complexity and security of the password.
replaceWithUppercaseLetter(pword): Randomly changes one or
two letters in the password to uppercase letters.

Main Function:
The main() function prompts the user for the
number of passwords to generate, as well as the
desired lengths for each password. It then calls
generatePassword() to create the passwords.

Password Validation:
If a user inputs a password length shorter than 3
characters, the program adjusts it to 3 characters as
the minimum length to ensure basic security.
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
CODE
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
CODE

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()
EXECUTION
APPLICATIONS
The Random Password Generator can be
used in a variety of real-world applications:

Secure Account Creation: Useful for


generating random and secure passwords
for online accounts, ensuring strong
security.

Password Management Systems: Helps


create random passwords for various
services, stored securely in password
managers.

IT Security: Ensures that employees or


users are provided with strong passwords
for secure access to corporate systems.

Cybersecurity Research: Can be used by


researchers to test the security of different
password-cracking algorithms.
ADVANTAGES

01 Security:
PARTS OF
The passwords generated are highly random,

TESLA’S COIL
making them difficult to guess or crack. They
include a mix of lowercase letters, numbers, and
uppercase letters for increased complexity.

02 Automation:
The program automates the password generation
process, saving time and ensuring consistency in
generating strong passwords.

03 Customizable Length:
Users can specify the length of the password,
allowing them to tailor the strength of the password
to their needs.
DISADVANTAGES

01 Predictability:
PARTS OF
Although the program generates random

TESLA’S COIL
passwords, it could be improved further by adding
additional layers of randomness, such as including
special characters.

02 Limited Complexity:
The password generation relies on a simple
structure (lowercase letters, numbers, and
uppercase letters), which could potentially be weak
if not supplemented with special characters or a
larger character set.

03 Error in Functions:
The functions replaceWithNumber() and
replaceWithUppercaseLetter() return after the first
replacement, making the replacement process
incomplete for certain password lengths.
FUTURE SCOPE

Enhanced Complexity: The password generator


can be enhanced by including special
characters (e.g., !, @, #) to make the passwords
even more secure.

Integration with Password Managers: This


generator can be integrated with password
management software for automatic password
creation and secure storage.

Multi-Language Support: Future versions can


allow the generation of passwords with
characters from multiple languages or Unicode
characters.

User Authentication: The program could be


extended to allow users to authenticate
themselves via a system that verifies the
strength of the generated passwords.

GUI Interface: A graphical user interface (GUI)


could be added for easier interaction and a
better user experience.
CONCLUSION

This project presents a Random


Password Generator that
leverages Python’s random library
to produce secure, random
passwords of varying lengths. It
offers an effective solution for
ensuring secure authentication in
online platforms and systems.
With potential future
enhancements, this tool can
become an even more powerful
tool for generating highly secure
passwords, contributing to
stronger security measures in the
digital world.
THANK
YOU

You might also like