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

Python

This project report describes a random password generator created by a group of students for their Programming in Python course. The report includes sections on the theoretical background of random password generators, the objectives of the project, the Python code used to generate random passwords, examples of passwords generated, an analysis of the generator, limitations, and conclusions. Certificates are provided acknowledging the completion of the project by each group member under the guidance of their project guide.

Uploaded by

Shivam Jawarkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Python

This project report describes a random password generator created by a group of students for their Programming in Python course. The report includes sections on the theoretical background of random password generators, the objectives of the project, the Python code used to generate random passwords, examples of passwords generated, an analysis of the generator, limitations, and conclusions. Certificates are provided acknowledging the completion of the project by each group member under the guidance of their project guide.

Uploaded by

Shivam Jawarkar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Project Report On

RANDOM PASSWORD GENERATOR


For The Subject

PROGRAMMING IN PYTHON
Academic Year
2023 - 2024
Affiliated to
MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION

Submitted in partial fulfilment of the requirement of the diploma of Computer

GROUP MEMBERS

SR NO. Enrollment No. Name

1. 2111440047 Siddhesh Joshi

2. 2111440052 Samarth Gawde

3. 2111440054 Anil Gurjal

4. 2111440067 Mayuresh Sonar

GUIDED BY
MISS.SHWETA NAIK
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION, MUMBAI

CERTIFICATE

This is to certify that Mr. Siddhesh Sujit Joshi

Enrollment No. 2111440047 of Sixth Semester of Diploma in COMPUTER


ENGINEERING at GV ACHARYA POLYTECHNIC, SHELU has completed the
MicroProject satisfactorily in Subject Programming in Python in the academic year 2023-
2024 as per the MSBTE prescribed curriculum of I Scheme.

Place:- Shelu Enrollment No.: - 2111440047

Date:- / / 2023 Exam Seat No.: -

Project Guide Head of the Department Principal


Miss. Shweta Mrs. Madhura Mr. Umesh
Naik Mahindrakar Kantute
MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION, MUMBAI

CERTIFICATE

This is to certify that Mr. Samarth Mahesh Gawde

Enrollment No. 2111440052 of Sixth Semester of Diploma in COMPUTER


ENGINEERING at GV ACHARYA POLYTECHNIC, SHELU has completed the
MicroProject satisfactorily in Subject Programming in Python in the academic year 2023-
2024 as per the MSBTE prescribed curriculum of I Scheme.

Place:- Shelu Enrollment No.: - 2111440052

Date:- / / 2023 Exam Seat No.: -

Project Guide Head of the Department Principal


Miss. Shweta Mrs. Madhura Mr. Umesh
Naik Mahindrakar Kantute
MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION, MUMBAI

CERTIFICATE

This is to certify that Mr. Anil Shankar Gurjal

Enrollment No. 2111440054 of Sixth Semester of Diploma in COMPUTER


ENGINEERING at GV ACHARYA POLYTECHNIC, SHELU has completed the
MicroProject satisfactorily in Subject Programming in Python in the academic year 2023-
2024 as per the MSBTE prescribed curriculum of I Scheme.

Place:- Shelu Enrollment No.: - 2111440054

Date:- / / 2023 Exam Seat No.: -

Project Guide Head of the Department Principal


Miss. Shweta Mrs. Madhura Mr. Umesh
Naik Mahindrakar Kantute
MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION, MUMBAI

CERTIFICATE

This is to certify that Mr. Mayuresh Vasudeo Sonar

Enrollment No. 2111440067 of Sixth Semester of Diploma in COMPUTER


ENGINEERING at GV ACHARYA POLYTECHNIC, SHELU has completed the
MicroProject satisfactorily in Subject Programming in Python in the academic year 2023-
2024 as per the MSBTE prescribed curriculum of I Scheme.

Place:- Shelu Enrollment No.: - 2111440067

Date:- / / 2023 Exam Seat No.: -

Project Guide Head of the Department Principal


Mrs. Shweta Mrs. Madhura Mr. Umesh
Naik Mahindrakar Kantute
MAHARASHTRA STATE BOARD OF TECHNICAL

EDUCATION, MUMBAI

CERTIFICATE

This is to certify that Mr. Siddhesh Sujit Joshi, Samarth Mahesh Gawde , Anil Shankar
Gurjal , Mayuresh Vasudeo Sonar

Sixth Semester of Diploma in COMPUTER ENGINEERING at GV ACHARYA


POLYTECHNIC, SHELU has completed the MicroProject satisfactorily in Subject
Programming in Python in the academic year 2023-2024 as per the MSBTE prescribed
curriculum of I Scheme.
Place :- Shelu Enrollment No:- 2111440047
2111440052
2111440054
2111440067

Date:- / / 2023 Exam Seat No.: -

Project Guide Head of the Department Principal


Mrs. Shweta Mrs. Madhura Mr. Umesh
Naik Mahindrakar Kantute
CANDIDATES DECLARATION

This is to certify that the project titled “Random Password Generator” is a bonafied
work carried out by student of Diploma in Computer Engineering as a part of curriculum as
prescribed by MSBTE. I hereby declare that the project work has not formed the basis for the
award previously of any Diploma, Associate ship, Fellowship or any other similar title
according to my knowledge.

Signature of Student
1.
2.
3.
4.
AIM

The aim of a random password generator in Python is to create strong, secure, and
unpredictable passwords automatically. Here are some specific goals and purposes of a random
password generator:

1. Security: The primary aim is to generate passwords that are difficult for attackers to guess
or crack through brute-force or dictionary-based attacks. By using a combination of different
character types (lowercase letters, uppercase letters, digits, and special characters) and ensuring
randomness in the selection process, the generated passwords are more secure.
2. Unpredictability: Randomness ensures that the passwords generated are unpredictable.
Each time the generator is used, it produces a different password, making it challenging for
attackers to anticipate or guess the next password.
3. Customization: Random password generators often allow users to specify parameters such
as the length of the password, the inclusion of specific character types, and avoidance of
ambiguous characters. This customization enables users to generate passwords that meet the
requirements of various security policies or personal preferences.
4. Ease of Use: Password generators aim to simplify the process of creating complex
passwords, especially for users who struggle to come up with strong passwords themselves. By
automating the password generation process, users can quickly obtain secure passwords
without needing to think of one themselves.
5. Versatility: Random password generators can be used in various contexts, including web
applications, account registration forms, password managers, security scripts, and more. They
provide a versatile solution for generating passwords wherever strong security is required.
6. Promoting Good Security Practices: By encouraging the use of strong, randomly generated
passwords, password generators contribute to improved cybersecurity practices. They help
mitigate the risks associated with weak or reused passwords, which are common vulnerabilities
exploited by attackers.
ACKNOWLEDGEMENT

We extend our special thanks to all teaching and non-teaching staff. Success is nourished under
the combination of perfect guidance, care and blessing. Acknowledgement is the best way to
convey Last few years spend in estimated institution has moulded us into confident and aspiring
engineers. We express our sense of gratitude towards our project guide Miss.Shweta Naik. It
is because of her valuable guidance, analytical approach encouragement that we could learn,
work and complete the project. We will always cherish great experience work under the
enthusiastic guidance.

We are also grateful to our principal and our vice principal who not only supported us in our
project but also encouraged for every creative activity. We also sincerely give thanks to our
head of department Mrs.Madhura Mahindrakar of computer and its sector, friends and well-
wishers to directly or indirectly contribute for the success of our maiden mission.
INDEX

SR.NO. TITLE PAGE NO

1. INTRODUCTION 1

2. THEORETICAL BACKGROUND 2

3. OBJECTIVE 3

4. CODE 4

5. OUTPUT 6

6. ANALYSIS 7

7. LIMITATION 8

8. CONCLUSION 9

9. REFERENCE 10
INTRODUCTION

An introduction to the theory behind a random password generator in Python:

1. Randomness: A random password generator relies on randomness to create unique and


unpredictable passwords. In Python, the random module provides functions to generate random
numbers, which we can use to select characters for the password.
2. Character Sets: Passwords typically consist of a combination of different character types,
such as lowercase letters, uppercase letters, digits, and special characters. These character sets
provide a wider range of possible combinations, making the password stronger and more secure
against brute-force attacks.
3. String Module: The string module in Python provides constants that represent various
character sets. For example, string.ascii_lowercase contains all lowercase letters,
string.ascii_uppercase contains all uppercase letters, string.digits contains all digits, and
string.punctuation contains all punctuation characters.
4. Combining Character Sets: To generate a random password, we combine the desired
character sets into one large set from which characters will be randomly chosen.
5. Password Length: The length of the password is an important factor in its strength. A longer
password generally provides better security. Most password generators allow users to specify
the length of the password they want to generate.
6. Random Selection: Once the character sets are combined, we use the random.choice()
function to randomly select characters from the combined set. We repeat this process for the
desired length of the password to create a random sequence of characters.
7. Output: The generated random sequence of characters forms the password, which can then
be returned or used as needed.

1
THEORETICAL BACKGROUND

The theoretical background of a random password generator in Python draws from principles
of cryptography, randomness, and information theory. Here's an overview:

1. Cryptography: Cryptography is the study of techniques for secure communication in the


presence of third parties. A random password generator utilizes cryptographic principles to
create passwords that are resistant to various attacks. For instance, it ensures that the generated
passwords are unpredictable and not susceptible to brute-force attacks.
2. Randomness: Randomness is crucial in password generation to ensure that the passwords
are not easily guessable. True randomness is hard to achieve with deterministic algorithms, so
pseudo-random number generators (PRNGs) are commonly used. PRNGs generate sequences
of numbers that appear random but are actually deterministic and repeat after a certain period.
Python's random module provides functions for generating pseudo-random numbers.
3. Entropy: Entropy is a measure of randomness or uncertainty in a system. In the context of
password generation, entropy refers to the strength of a password in resisting brute-force
attacks. Higher entropy implies higher randomness and thus stronger passwords. Password
generators aim to maximize entropy by selecting characters from a sufficiently large and
diverse character set (including uppercase letters, lowercase letters, digits, and special
characters) and by generating passwords of adequate length.
4. Information Theory: Information theory provides a framework for quantifying information
content and entropy. Shannon entropy, named after Claude Shannon, is a measure of the
average information content or uncertainty of a random variable. In the context of password
generation, Shannon entropy is used to estimate the strength of a password. Password
generators aim to maximize entropy to create passwords that are difficult to guess.
5. Security Considerations: A secure password generator should address various security
considerations, such as preventing biases in random number generation, avoiding patterns or
correlations in generated passwords, protecting against timing attacks, and ensuring that
passwords are not inadvertently leaked or exposed during generation or transmission.
By integrating these theoretical principles, a random password generator in Python can produce
strong, unpredictable passwords that enhance the security of systems and accounts.

2
OBJECTIVE

The objective of a random password generator in Python is to create strong, unpredictable


passwords that can enhance the security of systems and accounts. Here are the key objectives
of a random password generator:

1. Security: The primary objective is to create passwords that are difficult to guess or crack
through brute force or dictionary attacks. Randomness ensures that the generated passwords
are not predictable and therefore more secure.
2. Uniqueness: Each generated password should be unique to avoid reuse across multiple
accounts. Reusing passwords increases the risk of compromise since a breach in one system
could lead to unauthorized access to others.
3. Customizability: Providing options to customize the generated passwords such as length,
character set (including special characters, uppercase and lowercase letters, digits, etc.), and
whether to allow ambiguous characters (such as I, l, 1, 0, O, etc.) can accommodate different
requirements of systems and users.
4. Ease of Use: The generator should be easy to use and integrate into various applications and
systems. Ideally, it should be accessible through a simple function call or a user-friendly
interface.
5. Robustness: The generator should be able to handle various edge cases and exceptions
gracefully, ensuring that the generated passwords meet the desired security criteria under
different scenarios.
6. Scalability: It should be able to generate passwords efficiently even when dealing with large-
scale requirements, such as generating multiple passwords in bulk or generating passwords for
multiple users simultaneously.
By meeting these objectives, a random password generator helps improve overall security
posture by ensuring that strong, unique passwords are used to protect sensitive information and
accounts

3
CODE

import string
import random

# Getting password length


length = int(input("Enter password length: "))

print('''Choose character set for password from these :


1. Digits
2. Letters
3. Special characters
4. Exit''')

characterList = ""

# Getting character set for password


while (True):
choice = int(input("Pick a number "))
if (choice == 1):

# Adding letters to possible characters


characterList += string.ascii_letters
elif (choice == 2):

# Adding digits to possible characters


characterList += string.digits
elif (choice == 3):

# Adding special characters to possible

4
# characters
characterList += string.punctuation
elif (choice == 4):
break
else:
print("Please pick a valid option!")

password = []

for i in range(length):
# Picking a random character from our
# character list
randomchar = random.choice(characterList)

# appending a random character to password


password.append(randomchar)

# printing password as a string


print("The random password is " + "".join(password))

5
OUTPUT

6
ANALYSIS

An analysis of a random password generator in Python involves evaluating various aspects


such as security, randomness, efficiency, usability, and maintainability. Here's a breakdown:

Security:
Entropy: Assess the entropy of generated passwords to ensure they have sufficient randomness.
Higher entropy implies stronger passwords.
Avoidance of Guessable Patterns: Check if the generator avoids predictable patterns or biases
in password generation, as these can compromise security.
Cryptographic Strength: Evaluate whether cryptographic best practices are followed, especially
in the generation of random numbers.
Randomness:
Statistical Tests: Perform statistical tests (e.g., chi-square test, frequency analysis) to verify the
randomness of generated passwords.
Seed Management: Examine how seeds for random number generation are managed to prevent
predictability.
Efficiency:
Time Complexity: Evaluate the time complexity of the password generation algorithm,
ensuring it's efficient even for large-scale generation.
Space Complexity: Assess the space complexity, especially if large amounts of memory are
required for generating passwords.
Usability:
Customization: Check if the generator allows customization of password parameters such as
length, character set, and inclusion/exclusion of certain characters.
Ease of Integration: Assess how easily the generator can be integrated into different
applications or systems.
Error Handling:
Evaluate the robustness of error handling mechanisms to ensure graceful handling of
exceptions.

7
LIMITATIONS

While random password generators in Python offer significant benefits in terms of security and
convenience, they also have several limitations that users and developers should be aware of:

Predictability: Despite efforts to generate random passwords, pseudo-random number


generators (PRNGs) used in Python are deterministic and can potentially be predicted. If the
seed or algorithm used by the PRNG is compromised, it may lead to predictable password
generation.

Entropy Issues: Ensuring high entropy in generated passwords is essential for security.
However, some random password generators may not adequately maximize entropy, leading to
weaker passwords than expected, especially if the character set or password length is limited.

Lack of User Input: While random password generators create strong passwords, they may
not always consider user preferences or constraints. Users may have specific requirements or
restrictions for passwords based on system limitations or personal preferences that the
generator does not account for.

Dependency on Libraries: Many random password generators rely on external libraries or


modules, such as Python's random module. Depending on these libraries introduces potential
vulnerabilities, and if they are compromised, it may affect the security of generated passwords.

Storage and Transmission: Once generated, passwords need to be securely stored and
transmitted. Random password generators typically do not handle the storage or transmission
of passwords, leaving this responsibility to the application or system using the generated
passwords.

Human Factors: Complex randomly generated passwords may be difficult for users to
remember, leading to increased likelihood of them being written down or stored insecurely.
This can undermine the overall security of the system.

Limited Customization: While some random password generators allow customization of


parameters such as length and character set, others may have limited options. Users with
specific requirements may find these generators inadequate for their needs.

8
CONCLUSION

In conclusion, the random password generator in Python serves as a fundamental tool for
bolstering cybersecurity by creating strong, unpredictable passwords. By leveraging
cryptographic principles and pseudo-random number generation, these generators produce
passwords that are resistant to brute-force attacks and other forms of password guessing.
Despite their effectiveness, it's crucial to acknowledge the potential limitations, such as
predictability due to deterministic algorithms and the need for proper entropy management to
ensure high-quality password strength. Additionally, user considerations such as usability and
memorability should be taken into account to encourage adoption and adherence to secure
password practices. Overall, when implemented and used appropriately, random password
generators in Python significantly contribute to enhancing the security posture of systems and
protecting sensitive information from unauthorized access. Continuous monitoring, updates,
and adherence to security best practices are essential to maintain the efficacy and reliability of
these generators over time.

9
REFERENCE

• How to generate random password in python - Stack Overflow


• Random Password Generator using Python - Python Geeks
• password-generator-python · GitHub Topics · GitHub

10

You might also like