Note Encryption in Python

  1. Project rationale

In this section I would discuss about the rationale of the project i.e. a set of reason for a project this application. This project mainly focuses on process of encryption of text as a note and saving encrypted note as a record for any user. As the project mainly focus on privacy on saving note of user, the well-known algorithm DES has been implemented for encrypting and decrypting the text. A user can save thousands of notes within the application and all the text on the note will be encrypted. With the choice of user the notes also can be decrypted. Following is the features provided by the application:

Figure 2: Rationale of the project

In the figure we can different features of the project is listed out. The project mainly focuses on those listed features of the application. The importance of this application features is to create platforms for saving user notes, viewing notes, encrypting notes, decrypting notes and make a note that can be accessible from everywhere and anytime that’s benefits of web application.

  1. Methodology

There are different approach of system life cycle development, among them prototyping model has been used for the development of the solutions.

According to Margaret Rouse, “The Prototyping Model is a systems development method (SDM) in which a prototype is built, tested, and then reworked as necessary until an acceptable prototype is finally achieved from which the complete system or product can now be developed.” (Rouse, Prototyping Model, 2014) In a simple word Prototyping model refers to the process of creating prototypes of software application, for an example, incomplete versions of the software being developed. Prototyping model is can be used to visualize some component of the software to limit the gap of misunderstanding the customer requirements by the development team. This model can be used to allow the users evaluate developer proposals and try them out before implementation which is mainly called evolutionary prototyping. Prototyping model has some types and they are explained below:

  • Throwaway prototyping: It is a prototype which is discard eventually rather than becoming a part of the finally delivered software.
  • Evolutionary prototyping: Evolutionary prototyping is the prototypes that evolve into the final system through an iterative incorporation of user feedback.
  • Incremental prototype: Initially the project is started by building separated prototypes and at the end entire prototype related with products is merged in an overall design.
  • Extreme prototyping: This prototyping is mainly used in web applications. It breaks down a web development process into three phases, the first phase consists of HTML pages and it is also called static prototype. In the second phase the web screen are programmed and in the third phase the services are implemented.

 

  1. Project Design

The methodology of the project chooses the process of designing the system. Project design is next phase after requirement gathering in the software development process. The project development sections include the algorithm, flowchart, use case diagram and other components that illustrated the flow of the solution.

    1. Algorithm

An algorithm can be defined as the process or formula for solving any problem. Any computer program can be extracted as an algorithm (clart, 2014). In my own word algorithm is defined as a set of rules that further can be implement in code and creates a function to perform any task. The algorithm of this solution is given below:

Step 1: Start

Step 2: View added encrypted note

Step 3: Add notes for encryptions

Step 4: DES encryption

Step 5: Save encrypted text to database

Step 6: Retrieve encrypted text from database

Step 7: Decrypts text

Step 8: DES for decryption 

Step 10: Stop

    1. Algorithm of DES encryption method

Step 1: start

Step 2: The initial permutation of the DES algorithm changes the order of the plaintext.

Step 3: The E function is now used to expand the 32-bit input to a round’s F function into a 48- bit block.

Step 4: The output from E function is equate using round function with the 48 bit round.

Step 5: The P function takes a thirty-two bit block as input and outputs a thirty-two bit block.

Step 6: The final permutation occurs after 16 rounds of DES.

Step 7: Shift operations takes place

Step 8: Data is encrypted

Step 9: Stop

    1. Flowchart

A flowchart can be defined as diagram of the separate steps of a process in sequential order. The diagram represents a process using different symbols containing information about steps or a sequence of event. Those symbols are linked with arrows to illustrate the flow direction of the process (jakline, 2011). The flowchart of this system is illustrated below:

Figure 3: Flowchart of the application

Above figure is the flowchart of the application which clearly explains the flow of the application. The user will first view some of the encrypted note in the home page of the web application. If he/she want to add another encrypted note to the web application then he/she has to click on add new note button which redirect them to adding note page where they have to enter secret key for encryption. Using the secret key and 3DES encryption method the text will be encrypted. And for the decryption of the note user has to input the same key they have inputted at the beginning of the encryption process.

    1. Use case diagram

Use case diagrams are usually referred to as behavior diagrams used to describe a set of actions (use cases) that some system or subject should or can perform in collaboration with one or more external users of the system. Each use case should provide some observable and valuable result to the users or other stakeholders of the system. In a simple word use case diagram is defined as a diagram that can summarize the details of your system. The main purpose of use case diagram is to demonstrate the different ways that a user might interact with a system. Here is the use case diagram of the project:

Figure 4: Use case diagram

Above presented figure is the use-case diagram where user action with system behavior is explained. The user can add new notes, save note in the web application, encrypt notes, decrypt notes and access those note from anywhere at any time as the note is saved in web server instead of local drive.

    1.  System UI design

In this section, I will be presenting design of the solution the system has three pages one is the home page where user can see or view their encrypted note, second is note adding page where user can add note and encrypt and save it and the third is full note page where user can view their full notes they have saved and they can also encrypt the note with the help of secret key.

Main page:

 

  1. Project rationale

In this section I would discuss about the rationale of the project i.e. a set of reason for a project this application. This project mainly focuses on process of encryption of text as a note and saving encrypted note as a record for any user. As the project mainly focus on privacy on saving note of user, the well-known algorithm DES has been implemented for encrypting and decrypting the text. A user can save thousands of notes within the application and all the text on the note will be encrypted. With the choice of user the notes also can be decrypted. Following is the features provided by the application:

Figure 2: Rationale of the project

In the figure we can different features of the project is listed out. The project mainly focuses on those listed features of the application. The importance of this application features is to create platforms for saving user notes, viewing notes, encrypting notes, decrypting notes and make a note that can be accessible from everywhere and anytime that’s benefits of web application.

  1. Methodology

There are different approach of system life cycle development, among them prototyping model has been used for the development of the solutions.

According to Margaret Rouse, “The Prototyping Model is a systems development method (SDM) in which a prototype is built, tested, and then reworked as necessary until an acceptable prototype is finally achieved from which the complete system or product can now be developed.” (Rouse, Prototyping Model, 2014) In a simple word Prototyping model refers to the process of creating prototypes of software application, for an example, incomplete versions of the software being developed. Prototyping model is can be used to visualize some component of the software to limit the gap of misunderstanding the customer requirements by the development team. This model can be used to allow the users evaluate developer proposals and try them out before implementation which is mainly called evolutionary prototyping. Prototyping model has some types and they are explained below:

  • Throwaway prototyping: It is a prototype which is discard eventually rather than becoming a part of the finally delivered software.
  • Evolutionary prototyping: Evolutionary prototyping is the prototypes that evolve into the final system through an iterative incorporation of user feedback.
  • Incremental prototype: Initially the project is started by building separated prototypes and at the end entire prototype related with products is merged in an overall design.
  • Extreme prototyping: This prototyping is mainly used in web applications. It breaks down a web development process into three phases, the first phase consists of HTML pages and it is also called static prototype. In the second phase the web screen are programmed and in the third phase the services are implemented.

 

  1. Project Design

The methodology of the project chooses the process of designing the system. Project design is next phase after requirement gathering in the software development process. The project development sections include the algorithm, flowchart, use case diagram and other components that illustrated the flow of the solution.

    1. Algorithm

An algorithm can be defined as the process or formula for solving any problem. Any computer program can be extracted as an algorithm (clart, 2014). In my own word algorithm is defined as a set of rules that further can be implement in code and creates a function to perform any task. The algorithm of this solution is given below:

Step 1: Start

Step 2: View added encrypted note

Step 3: Add notes for encryptions

Step 4: DES encryption

Step 5: Save encrypted text to database

Step 6: Retrieve encrypted text from database

Step 7: Decrypts text

Step 8: DES for decryption 

Step 10: Stop

    1. Algorithm of DES encryption method

Step 1: start

Step 2: The initial permutation of the DES algorithm changes the order of the plaintext.

Step 3: The E function is now used to expand the 32-bit input to a round’s F function into a 48- bit block.

Step 4: The output from E function is equate using round function with the 48 bit round.

Step 5: The P function takes a thirty-two bit block as input and outputs a thirty-two bit block.

Step 6: The final permutation occurs after 16 rounds of DES.

Step 7: Shift operations takes place

Step 8: Data is encrypted

Step 9: Stop

    1. Flowchart

A flowchart can be defined as diagram of the separate steps of a process in sequential order. The diagram represents a process using different symbols containing information about steps or a sequence of event. Those symbols are linked with arrows to illustrate the flow direction of the process (jakline, 2011). The flowchart of this system is illustrated below:

Figure 3: Flowchart of the application

Above figure is the flowchart of the application which clearly explains the flow of the application. The user will first view some of the encrypted note in the home page of the web application. If he/she want to add another encrypted note to the web application then he/she has to click on add new note button which redirect them to adding note page where they have to enter secret key for encryption. Using the secret key and 3DES encryption method the text will be encrypted. And for the decryption of the note user has to input the same key they have inputted at the beginning of the encryption process.

    1. Use case diagram

Use case diagrams are usually referred to as behavior diagrams used to describe a set of actions (use cases) that some system or subject should or can perform in collaboration with one or more external users of the system. Each use case should provide some observable and valuable result to the users or other stakeholders of the system. In a simple word use case diagram is defined as a diagram that can summarize the details of your system. The main purpose of use case diagram is to demonstrate the different ways that a user might interact with a system. Here is the use case diagram of the project:

Figure 4: Use case diagram

Above presented figure is the use-case diagram where user action with system behavior is explained. The user can add new notes, save note in the web application, encrypt notes, decrypt notes and access those note from anywhere at any time as the note is saved in web server instead of local drive.

    1.  System UI design

In this section, I will be presenting design of the solution the system has three pages one is the home page where user can see or view their encrypted note, second is note adding page where user can add note and encrypt and save it and the third is full note page where user can view their full notes they have saved and they can also encrypt the note with the help of secret key.

Main page: