Sie sind auf Seite 1von 18

CHAPTER 1

INTRODUCTION

Python is an interpreted, high-level, general-purpose programming language.


Python's design philosophy emphasizes code readability with its notable use
of significant whitespace. Its language constructs and object-oriented approach aim to
help programmers write clear, logical code for small and large-scale projects.[27]

Python is often described as a "batteries included" language due to its


comprehensive standard library.

1.1 HISTORY OF PYTHON

Python was conceived in the late 1980s[33] by Guido van


Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands as a successor to
the ABC language (itself inspired by SETL), capable of exception handling and
interfacing with the Amoeba operating system.[8] Its implementation began in December
1989. Van Rossum continued as Python's lead developer until July 12, 2018, when he
announced his "permanent vacation" from his responsibilities as Python's Benevolent
Dictator For Life, a title the Python community bestowed upon him to reflect his long-term
commitment as the project's chief decision-maker. In January, 2019, active Python core
developers elected Brett Cannon, Nick Coghlan, Barry Warsaw, Carol Willing and Van
Rossum to a five-member "Steering Council" to lead the project.[37]Python 2.0 was
released on 16 October 2000 with many major new features, including a cycle-
detecting garbage collector and support for Unicode.[38]Python 3.0 was released on 3
December 2008. It was a major revision of the language that is not completely backward-
compatible.[39] Many of its major features were backported to Python 2.6.x[40] and 2.7.x
version series. Releases of Python 3 include the 2to3 utility, which automates (at least
partially) the translation of Python 2 code to Python 3.

1
1.2 FEATURES OF PYTHON

Python is a multiprogram paradigm language. Object-oriented


programming and structured programming are fully supported, and many of its features
support functional programming and aspect-oriented programming (including
by metaprogramming[45] and metaobjects (magic methods)).[46] Many other paradigms
are supported via extensions, including design by contract[47][48] and logic
programming.[49]

Python uses dynamic typing, and a combination of reference counting and a cycle-
detecting garbage collector for memory management. It also features dynamic name
resolution (late binding), which binds method and variable names during program
execution.

Python's design offers some support for functional programming in


the Lisp tradition. It has filter, map, and reduce functions;

list comprehensions, dictionaries, sets and generator expressions.[50]

The standard library has two modules (itertools and functools) that implement
functional tools borrowed from Haskell and Standard ML.[51]

Van Rossum's vision of a small core language with a large standard library and
easily extensible interpreter stemmed from his frustrations with ABC, which espoused the
opposite approach.[33]

Python strives for a simpler, less-cluttered syntax and grammar while giving
developers a choice in their coding methodology. In contrast to Perl's "there is more than
one way to do it" motto, Python embraces a "there should be one—and preferably only
one—obvious way to do it" design philosophy.[52] Alex Martelli, a Fellow at the Python
Software Foundation and Python book author, writes that "To describe something as
'clever' is not considered a compliment in the Python culture."

2
1.2.1 MAIN FEATURES

Python's large standard library, commonly cited as one of its greatest


strengths,[97] provides tools suited to many tasks. For Internet-facing applications, many
standard formats and protocols such as MIME and HTTP are supported. It includes
modules for creating graphical user interfaces, connecting to relational
databases, generating pseudorandom numbers, arithmetic with arbitrary precision
decimals,[98]manipulating regular expressions, and unit testing.

Some parts of the standard library are covered by specifications (for example,
the Web Server Gateway Interface (WSGI) implementation wsgiref follows PEP 333[99]),
but most modules are not. They are specified by their code, internal documentation, and
test suites (if supplied). However, because most of the standard library is cross-platform
Python code, only a few modules need altering or rewriting for variant implementations.

As of March 2018, the Python Package Index (PyPI), the official repository for
third-party Python software, contains over 130,000[100] packages with a wide range of
functionality, including:

 Graphical user interfaces


 Web frameworks
 Multimedia
 Databases
 Networking
 Test frameworks
 Automation
 Web scraping[101]
 Documentation
 System administration
 Scientific computing
 Text processing
 Image processing

3
 Web scraping is a computer software technique of extracting information from
websites. This technique mostly focuses on the transformation of unstructured
data (HTML format) on the web into structured data (database or spreadsheet).
 You can perform web scraping in various ways, including use of Google Docs to
almost every programming language. I would resort to Python because of its ease
and rich ecosystem. It has a library known as ‘BeautifulSoup’ which assists this
task. In this article, I’ll show you the easiest way to learn web scraping using python
programming.
 For those of you, who need a non-programming way to extract information out of
web pages, you can also look at import.io . It provides a GUI driven interface to
perform all basic web scraping operations. The hackers can continue to read this
article.

1.2.2 ADVANTAGES
1) Easy to code
2) Contains rich libraries and are easy and direct to implement
3) Easily compatible on any os
4) Reduces the size of code

1.3 OUTLINE OF PROJECT


The main goal of the project is to encrypt the data and send to reciver securedly
and at the reciver side the data will be decoded to make reciver to view original data

1.4 LITERATURE REVIEW


As the project determines the message or data which we have entered will be
encrypted and original message will be display by decoding. A cipher is a type of secret
code, where you swap the letters around so that no-one can read your message. One of the
oldest and most famous ciphers, the Caesar cipher, which is named after Julius Caesar.

 Hiding a word is called encryption. Let’s start by encrypting the letter ‘a’. To do this,
we can draw the alphabet in a circle, like this:

4
 To make a secret encrypted letter from a normal one, we need to have a secret key.
Let’s use the number 3 as the key (but you can use any number you like).

To encrypt the letter ‘a’, we just move 3 letters clockwise, which will give the letter
‘d’:

 We can use what we have learnt to encrypt an entire word. For example, ‘hello’
encrypted is ‘khoor’.
 h+3=k
 e+3=h
 l+3=o
 l+3=o
 o+3=r
 Getting text back to normal is called decryption. To decrypt a word, just subtract the
key instead of adding it:
 k-3=h

5
 h-3=e
 o-3=l
 o-3=l
 r-3=o

6
CHAPTER 2
AIM AND SCOPE

2.1 AIM

The aim of the project is to convert the the given message into a secret code and decode
it when the given input is correct.

Hiding a word is called encryption. Encryption and decryption are the two essential
functionalities of cryptography. A message sent over the network is transformed into an
unrecognizable encrypted message known as data encryption. At the receiving end, the
received message is converted to its original form known as decryption.

2.2 SCOPE
The companies which are like whatsapp,facebook,instagram etc.., will be follow
this type of encryption in their application ,like they will provide end to end encryption
when at the sender sends the message the message will be encrypted and some different
code or unknown message to protect the message from the cyber thefts,. By this the data
or message can be transfered in a secured manner to the receiver.

7
CHAPTER 3
RECUIREMENT SPECIFICATION

3.1 INTRODUCTION
To be used efficiently, all computer software needs certain hardware
components or other software resources to be present on a computer. These
prerequisites are known as computer system requirements and are often used as a
guideline as opposed to an absolute rule. Most software defines two sets of system
requirements: Minimum and Recommended. With increasing demand for higher
processing power and resources in newer versions of software, system requirements
tend to increase over time. Industry analysts suggest that this trend plays a bigger
part in driving upgrades to existing computer systems than technological
advancements.

3.2 SOFTWARE REQUIREMENTS


The software requirements are:

Software Requirements deal with defining software resource requirements and


prerequisites that need to be installed on a computer to provide optimal functioning of
an application. These requirements or pre-requisites are generally not included in the
software installation package and need to be installed separately before the software is
installed.

SOFTWARE REQUIREMENTS FOR PRESENT

PROJECT: OPERATING SYSTEM: - Windows 7/

XP/8/10

LANGUAGE :- PYTHON

8
3.3 HARWARE REQUIREMENTS
The most common set of requirements defined by any operating system or
software application is the physical computer resources, also known as hardware. A
hardware requirements list is often accompanied by a hardware compatibility list
(HCL), especially in the case of operating systems. An HCL list tested, compatibility
and sometimes incompatible hardware devices for a particular operating system or
application. The following subsections discuss the various aspects of hardware
requirements.

HARDWARE REQUIREMENTS FOR PRESENT PROJECT:

PROCESSOR: - Intel dual Core

i3/i5/i7 RAM: - 1 GB HARD

DISK: - 80 GB

9
CHAPTER 4
RESULTS AND DISCUSSION

4.1 RESULTS

4.1.1 SCREENSHOTS

Fig 4.1 Output executed

The above figure depicts the output genererated when the code is executed and it will
ask for a message to enter .By entering the message it will go to next step.

10
Fig 4.2 message was coverted

This the output generated when the message is entered .after entering the message it
will ask for a key value by that given key value the message will be changed as present
index value of the alphabet plus given key value forms a new message.

11
Fig4.3 the message decoded

This will be generated after the Fig4.2 ,here the message has converted and by entering
1 it will be decoded to the original message.

12
Fig 4.4

Here the original message didn’t generated because the number which we entered is
not matching to the correct number which was displayed.

13
CHAPTER 5
CONCLUSION AND FUTURE WORK

5.1 CONCLUSION
Hence the above project can be implemented in any companies ,where
the data transferring is takes place or message passing should done encryptedly from
sender to reciver. This project is useful for anywhere with slight modifications. Project
is flexible i.e. any change/modification in python and Implementation may be
performed easily.

5.2 FUTURE WORK


The project can be extended based on the companies requirements in different
domains.This project can be extended with other encrypted technologies.

14
REFERENCES

[1]. Mark Summerfield, Programming In Python 3: A Complete Introduction to the


Python Language.

[2]. 10 Reasons Python Rocks for Research (And a Few Reasons it Doesn't) — Hoyt
Koepke. www.stat.washington.edu. Retrieved 3 February 2019.

[3].www.analyticsvidhya.com/blog/2015/10/beginner-guide-web-scraping-beautiful-
soup-python/ ,last accessed on 24-june-19.

[4].The Python Language Reference, section 3.3. New-style and classic classes, for
release 2.7. Retrieved 12 January 2011.

[5] Type hinting for Python LWN.net. 24 December 2014. Retrieved 5 May 2015.

[6] mypy - Optional Static Typing for Python". Retrieved 28 January 2017.

[7] Zadka, Moshe; van Rossum, Guido (11 March 2001).

[8] PEP 237 – Unifying Long Integers and Integers". Python Enhancement Proposals.
Python Software Foundation. Retrieved 24 September2011.

15
APPENDIX

A. SOURCE CODE

#!/bin/python3

alphabet = 'abcdefghijklmnopqrstuvwxyz'

newMessage = ''

message = input('Please enter a message to convert it into secret message: ')

key = input('Enter a key (1-26): ')

key = int(key)

if key % 26 == 0:

key = key +2

for character in message:

if character in alphabet:

position = alphabet.find(character)

newPosition = (position + key) % 26

newCharacter = alphabet[newPosition]

newMessage += newCharacter

else:

newMessage += character

16
print('Your new message is: ', newMessage)

# Decode

decodedMsg = ''

for character in newMessage:

if character in alphabet:

position = alphabet.find(character)

newPosition = (position - key) % 26

newCharacter = alphabet[newPosition]

decodedMsg += newCharacter

else:

decodedMsg += character

print("Press 1 for getting Original msg")

newRes = input()

newRes = int(newRes)

if(newRes == 1):

print(decodedMsg)

17
18