csci321 final year project · csci321 final year project krypto for android zainolabidin bin esa...

50
CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN SUANDY UOW ID: 5841707 LEE LOONG WEI NOEL UOW ID: 5988536 DECLARATION: We certify that this is entirely our own work, except where we have given fully-documented references to the work of others, and that the material contained in this report has not previously been submitted for assessment in any formal course of study. We understand the definition and consequences of plagiarism.

Upload: others

Post on 11-Oct-2020

9 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

CSCI321 FINAL YEAR PROJECT

KRYPTO FOR ANDROID

ZAINOLABIDIN BIN ESA

UOW ID: 5988652

MUHAMMAD ZAHID BIN ADBUL GAFFAR

UOW ID: 6097984

MOHAMMAD HANIF BIN SUANDY

UOW ID: 5841707

LEE LOONG WEI NOEL

UOW ID: 5988536

DECLARATION: We certify that this is entirely our own work, except where we have

given fully-documented references to the work of others, and that the material

contained in this report has not previously been submitted for assessment in any

formal course of study. We understand the definition and consequences of plagiarism.

Page 2: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

TABLE OF CONTENTS

SECTION 1 USE CASE IDENTIFICATION ....................... 1

Use Case 1.1: Decrypt Ciphertext ................................................... 1

Use Case 1.1.1: Run IoC Module .................................................... 2

Use Case 1.1.2: Run Frequency Analysis ......................................... 3

Use Case 1.1.3: View Histogram..................................................... 4

Use Case 1.1.4: Input Ciphertext ................................................... 5

Use Case 1.1.5: View Ciphertext .................................................... 6

Use Case 1.1.6: Calculate Occurrence ............................................. 7

Use Case 1.1.7: Calculate Character ............................................... 8

Use Case 1.1.8: Calculate Bigram ................................................... 9

Use Case 1.1.9: Calculate N-gram ................................................ 10

Use Case 1.2.1: Run Decrypt Module ............................................ 11

Use Case 2.1: Determine Plaintext................................................ 12

Use Case 2.1.1: Read Ciphertext .................................................. 13

Use Case 2.2.1: Determine Probable Cipher................................... 14

Use Case 2.2.2: Run Cryptanalysis Module .................................... 15

Use Case 3.1: Enter User Guide ................................................... 16

Use Case 3.1.1: Input Ciphertext ................................................. 17

Use Case 3.2.1: View User-Assisted Steps ..................................... 18

Use Case 4.1: Determine Period ................................................... 19

Use Case 4.1.1: Read Ciphertext .................................................. 20

Use Case 4.2.1: Calculate Period .................................................. 21

Use Case 5.1: Generate Report .................................................... 22

Use Case 5.1.1: Retrieve Cryptanalysis Results .............................. 23

Use Case 5.1.2: Retrieve IoC Module Results ................................. 24

Use Case 5.1.3: Retrieve Decrypt Module Results ........................... 25

Use Case 6.1: Share Results ........................................................ 26

Page 3: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

SECTION 2 USE CASE DIAGRAMS ............................... 27

Use Case 1 ................................................................................. 28

Use Case 2 ................................................................................. 29

Use Case 3 ................................................................................. 30

Use Case 4 ................................................................................. 31

Use Case 5 ................................................................................. 32

Use Case 6 ................................................................................. 33

Combined Use Case .................................................................... 34

SECTION 3 ACTIVITY DIAGRAMS ............................... 35

Process 1 ................................................................................... 35

Process 2 ................................................................................... 36

Process 3 ................................................................................... 37

Process 4 ................................................................................... 38

Process 5 ................................................................................... 39

Process 6 ................................................................................... 40

SECTION 4 SEQUENCE DIAGRAM................................ 41

Sequence 1 (Cryptanalysis Module) .............................................. 41

Sequence 2 (Decrypt Module) ...................................................... 43

Sequence 3 (Education Module) ................................................... 44

Sequence 4 (IoC Module)............................................................. 45

Sequence 5 (Report Module) ........................................................ 46

Sequence 6 (Sharing Module) ...................................................... 47

Page 4: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

1 of 50

SECTION 1 USE CASE IDENTIFICATION

The next few pages will highlight the operations and “workflows” of the user and the application.

USE CASE 1.1: DECRYPT CIPHERTEXT

UC-ID 1.1

Name

Decrypt Ciphertext

Description

Decrypt Ciphertext is an important process because it calls other functions in the application. Before accessing most of the other functions, the user must

call the Decrypt Ciphertext method.

Actor(s)

- User

Main Scenario

Step 1) User will choose Decrypt Ciphertext. Step 2a) User will be prompted to Input Ciphertext.

Step 2b) (Optional) User has the option to View Ciphertext.

Page 5: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

2 of 50

USE CASE 1.1.1: RUN IOC MODULE

UC-ID 1.1.1

Name

Run IoC Module

Description

This use case describes the scenario when User chooses Run IoC Module.

Actor(s)

- User

- Krypto App (Run Frequency Analysis)

Main Scenario

Step 1) User chooses Run Frequency Analysis. Step 2) User chooses Run IoC Module.

Step 3) The Determine Period function will read in

the Ciphertext. Step 4) After reading in the Ciphertext, the

Determine Period function will calculate the period.

Page 6: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

3 of 50

USE CASE 1.1.2: RUN FREQUENCY ANALYSIS

UC-ID 1.1.2

Name

Run Frequency Analysis

Description

This use case describes the function which will be run after the user inputs the Ciphertext.

Actor(s)

- User

Main Scenario

Step 1) User will choose Run Frequency Analysis.

Step 2) User will choose from the below;

(a) Run IoC Module,

(b) Run Decrypt Module, (c) View Histogram or, (d) Calculate Occurrence.

Page 7: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

4 of 50

USE CASE 1.1.3: VIEW HISTOGRAM

UC-ID 1.1.3

Name

View Histogram

Description

This use case describes the scenario when the user chooses to View Histogram.

Actor(s)

- User

- Krypto App (Run Frequency Analysis)

Main Scenario

Step 1) User will choose View Histogram. Step 2) The application will display the histogram for

the frequency of characters in the ciphertext.

Page 8: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

5 of 50

USE CASE 1.1.4: INPUT CIPHERTEXT

UC-ID 1.1.4

Name

Input Ciphertext

Description

This use case describes the scenario when the user first launches the application.

Actor(s)

- User

Main Scenario

Step 1) User launches the Krypto Application.

Step 2) Krypto App will prompt user to input the ciphertext.

Step 3) User will input the ciphertext.

Page 9: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

6 of 50

USE CASE 1.1.5: VIEW CIPHERTEXT

UC-ID 1.1.5

Name

View Ciphertext

Description

This use case describes the scenario if the user chooses to view the ciphertext entered.

Actor(s)

- User

Main Scenario

Step 1) User selects View Ciphertext in the

application. Step 2) Krypto App display the ciphertext previously

entered by the user.

Page 10: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

7 of 50

USE CASE 1.1.6: CALCULATE OCCURRENCE

UC-ID 1.1.6

Name

Calculate Occurrence

Description

This use case describes the scenario when the user chooses to calculate occurrence of characters.

Actor(s)

- User

- Krypto App (Run Frequency Analysis)

Main Scenario

Step 1) User selects Calculate Occurrence from the Krypto Application.

Step 2) The Krypto App calls the Cryptanalysis Module.

Step 3) The app prompts the users whether they want to;

(a) Calculate Character,

(b) Calculate Bigram or, (c) Calculate N-gram.

Page 11: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

8 of 50

USE CASE 1.1.7: CALCULATE CHARACTER

UC-ID 1.1.7

Name

Calculate Character

Description

This use case describes the scenario when the user chooses to Calculate Character.

Actor(s)

- User

- Krypto App (Calculate Occurrence)

Main Scenario

Step 1) The user selects Calculate Character from the app.

Step 2) The app calls the calculate character class.

Page 12: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

9 of 50

USE CASE 1.1.8: CALCULATE BIGRAM

UC-ID 1.1.8

Name

Calculate Bigram

Description

This use case describes the scenario when the user chooses to Calculate Bigram.

Actor(s)

- User

- Krypto App (Calculate Occurrence)

Main Scenario

Step 1) Step 1) The user selects Calculate Bigram from the app.

Step 2) The app calls the calculate bigram class.

Page 13: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

10 of 50

USE CASE 1.1.9: CALCULATE N-GRAM

UC-ID 1.1.10

Name

Calculate N-gram

Description

This use case describes the scenario when the user chooses to Calculate N-gram.

Actor(s)

- User

- Krypto App (Calculate Occurrence)

Main Scenario

Step 1) The user selects Calculate N-gram from the app.

Step 2) The app prompts the user for the value of N. Step 3) The app calls the calculate bigram class.

Page 14: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

11 of 50

USE CASE 1.2.1: RUN DECRYPT MODULE

UC-ID 1.2.1

Name

Run Decrypt Module

Description

This use case describes the scenario when the user has chosen to decrypt the ciphertext.

Actor(s)

- User

- Krypto App (Decrypt Ciphertext)

Main Scenario

Step 1) User chooses to decrypt ciphertext. Step 2) The Decrypt Module will be called once the

user chooses to decrypt ciphertext.

Page 15: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

12 of 50

USE CASE 2.1: DETERMINE PLAINTEXT

UC-ID 2.1

Name

Determine Plaintext

Description

This use case describes more in-depth into the scenario in the Decrypt Ciphertext module.

Actor(s)

- User

- Krypto Application (Decrypt Ciphertext)

Main Scenario

Step 1) User chooses Decrypt Ciphertext in the app. Step 2) The Determine Plaintext function will be

called. Step 3) The function will proceed to read in the

ciphertext previously entered by the user. Step 4) The frequency analysis will run and the most

probable analysis will be determined.

Page 16: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

13 of 50

USE CASE 2.1.1: READ CIPHERTEXT

UC-ID 2.1.1

Name

Read Ciphertext

Description

This use case describes the function which will be used multiple times in the app for reading in the

ciphertext that has been entered by the user.

Actor(s)

- User

Main Scenario

Step 1) Whenever a function which requires the ciphertext is called, this function will be used.

Page 17: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

14 of 50

USE CASE 2.2.1: DETERMINE PROBABLE CIPHER

UC-ID 2.2.1

Name

Determine Probable Cipher

Description

This use case describes the scenario when the user wants to determine the probable cipher of the

ciphertext.

Actor(s)

- User

Main Scenario

Step 1) User chooses to decrypt ciphertext. Step 2) The cryptanalysis module will run.

Step 3) The cryptanalysis module will initiate the Determine Probable Cipher function.

Page 18: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

15 of 50

USE CASE 2.2.2: RUN CRYPTANALYSIS MODULE

UC-ID 2.2.2

Name

Run Cryptanalysis Module

Description

This use case describes the scenario when users choose to use the user-assisted guide.

Actor(s)

- User

- Krypto Application (User-Assisted Steps)

Main Scenario

Step 1) Users choose to enter the user guide. Step 2) The app will instruct the user to input the

ciphertext. Step 3) The user will choose to view user-assisted

steps. Step 4) The user-assisted steps function will run the

cryptanalysis module.

Page 19: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

16 of 50

USE CASE 3.1: ENTER USER GUIDE

UC-ID 3.1

Name

Enter User Guide

Description

This use case describes the scenario when users choose to enter the user guide.

Actor(s)

- User

Main Scenario

Step 1) App prompts the user if they want to go to

the user guide if it’s the first time the app is being run. Alternatively, if it’s not the first run, the user can choose to run the user guide from the menu.

Step 2) User chooses to enter the user guide.

Page 20: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

17 of 50

USE CASE 3.1.1: INPUT CIPHERTEXT

UC-ID 3.1.1

Name

Input Ciphertext

Description

This use case describes the scenario when the user first chooses to start decrypting and is prompted for

the ciphertext.

Actor(s)

- User

Main Scenario

Step 1) App prompts the user to enter the ciphertext. Step 2) User inputs the ciphertext.

Page 21: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

18 of 50

USE CASE 3.2.1: VIEW USER-ASSISTED STEPS

UC-ID 3.2.1

Name

View User-Assisted Steps

Description

This use case describes the scenario when the user chooses to have a step-by-step guide for using the

app.

Actor(s)

- User

Main Scenario

Step 1) User chooses to view user-assisted steps. Step 2) The app animates what the user is supposed

to do or tap. Step 3) User follows the animated instructions.

Page 22: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

19 of 50

USE CASE 4.1: DETERMINE PERIOD

UC-ID 4.1

Name

Determine Period

Description

This use case describes the scenario when the IoC module is run.

Actor(s)

- User

- Krypto Application (Run IoC Module)

Main Scenario

Step 1) User chooses to run the IoC module. Step 2) The Determine Period function will be called.

Page 23: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

20 of 50

USE CASE 4.1.1: READ CIPHERTEXT

UC-ID 4.1.1

Name

Read Ciphertext

Description

This use case describes the scenario whenever the app requires the ciphertext previously entered by the

user.

Actor(s)

- User - Krypto Application (Determine Plaintext) - Krypto Application (Determine Period)

Main Scenario

Step 1) User chooses any tasks in the app which

requires the reading in of ciphertext. Step 2) The specific function in the app which

requires the ciphertext will read in the ciphertext.

Page 24: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

21 of 50

USE CASE 4.2.1: CALCULATE PERIOD

UC-ID 4.2.1

Name

Calculate Period

Description

This use case describes the scenario when determine period function is used.

Actor(s)

- User

- Krypto Application (Run IoC Module)

Main Scenario

Step 1) User chooses to run IoC module. Step 2) The app will call the Determine Period

function. Step 3) The determine Period function will calculate

the period.

Page 25: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

22 of 50

USE CASE 5.1: GENERATE REPORT

UC-ID 5.1

Name

Generate Report

Description

This use case describes the scenario when the user chooses to generate a report of the cryptanalysis.

Actor(s)

- User

Main Scenario

Step 1) User chooses to generate report in the app.

Step 2) The report generation function will retrieve the cryptanalysis results.

Step 3) The report generation function will retrieve the decryption results.

Page 26: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

23 of 50

USE CASE 5.1.1: RETRIEVE CRYPTANALYSIS RESULTS

UC-ID 5.1.1

Name

Retrieve Cryptanalysis Results

Description

This use case describes the scenario when the user chooses to generate a report of the cryptanalysis

which in turn, retrieves the cryptanalysis results.

Actor(s)

- User - Krypto Application (Generate Report)

Main Scenario

Step 1) When the report generation is called, the cryptanalysis results will be retrieved.

Page 27: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

24 of 50

USE CASE 5.1.2: RETRIEVE IOC MODULE RESULTS

UC-ID 5.1.2

Name

Retrieve IoC Module Results

Description

This use case describes the scenario when the user chooses to generate a report of the cryptanalysis

which in turn, retrieves the IoC Module results.

Actor(s)

- User - Krypto Application (Retrieve Cryptanalysis

Results)

Main Scenario

Step 1) When the report generation is called, the IoC

Module results will be retrieved.

Page 28: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

25 of 50

USE CASE 5.1.3: RETRIEVE DECRYPT MODULE RESULTS

UC-ID 5.1.3

Name

Retrieve Decrypt Module Results

Description

This use case describes the scenario when the user chooses to generate a report of the cryptanalysis

which in turn, retrieves the Decrypt Module results.

Actor(s)

- User - Krypto Application (Retrieve Cryptanalysis

Results)

- Main Scenario

Step 1) When the report generation is called, the

Decrypt Module results will be retrieved.

Page 29: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

26 of 50

USE CASE 6.1: SHARE RESULTS

UC-ID 6.1

Name

Share Results

Description

This use case describes the scenario when the user chooses to share the results.

Actor(s)

- User

Main Scenario

Step 1) User chooses the share function in the app.

Step 2) The share function will retrieve the cryptanalysis results.

Step 3) The OS-specific share function will be called.

Step 4) The user will choose the platform or messaging application they wish to share to.

Page 30: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

27 of 50

SECTION 2 USE CASE DIAGRAMS

The next few pages will show the use case diagrams according to the insights from the previous use case

identification and analysis. The diagrams are best viewed in the landscape format.

Page 31: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

28 of 50

USE CASE 1

1.1

1.1.1

1.1.2

1.1.3

1.1.4

1.1.6

1.1.7 1.1.8 1.1.9

1.1.5

1.2.1

Page 32: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

29 of 50

USE CASE 2

2.1

2.1.1

2.2.1 2.2.2

1.1.2

Page 33: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

30 of 50

USE CASE 3

3.1 3.1.1

3.2.1 2.2.2

Page 34: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

31 of 50

USE CASE 4

4.1

4.1.1

4.2.1

Page 35: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

32 of 50

USE CASE 5

5.1 5.1.1

5.1.2 5.1.3

Page 36: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

33 of 50

USE CASE 6

6.1 5.1.1

5.1.2 5.1.3

Page 37: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

34 of 50

COMBINED USE CASE

Page 38: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

35 of 50

SECTION 3

ACTIVITY DIAGRAMS

PROCESS 1

The User will choose between two options:

1) Decrypt Ciphertext;

2) Calculate Occurrence.

Option 1 will trigger the Application to run the Decrypt Module.

Option 2 will trigger the Application to run the IoC Module.

Refer to Process 2 and Process 4 for the Decrypt Module and IoC Module

processes respectively.

Page 39: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

36 of 50

PROCESS 2

Prior to this process, the User will have chosen to run this Decrypt Module.

This module’s objective is to decrypt and determine the plaintext. The User

will then choose to:

1) Run Frequency Analysis or,

2) Read Ciphertext.

Option 1 will trigger the Application to invoke the Determine Probable

Cipher function and then run the Cryptanalysis Module.

Option 2 will trigger the Application to read the ciphertext.

Refer to Process 1 for the Cryptanalysis Module.

Page 40: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

37 of 50

PROCESS 3

Upon running this module, the User will choose to:

1) Input Ciphertext or,

2) View User-Assisted Steps.

Option 1 will prompt the User to input the ciphertext.

Option 2 will trigger the Application to assist the User with a guide on using

the application leading up to running the core module (Cryptanalysis

Module).

Refer to Process 1 for the Cryptanalysis Module.

Page 41: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

38 of 50

PROCESS 4

Prior to this process, the User will have chosen to run this IoC Module.

This module’s objective is to determine the period.

The User will choose to:

1) Read Ciphertext or,

2) Calculate Period.

Option 1 will trigger the Application to read the ciphertext.

Option 2 will trigger the Application to calculate the period.

Page 42: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

39 of 50

PROCESS 5

Prior to this process, the User will have chosen to run this Report Module.

This module’s objective is to generate a report based on the results. The

Application will prompt the User to:

1) Retrieve IoC Results or,

2) Retrieve Decrypt Module Results.

Option 1 will trigger the Application to generate a report of the IoC results.

Option 2 will trigger the Application to generate a report of the Decrypt

Module results.

Page 43: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

40 of 50

PROCESS 6

Prior to this process, the User will have chosen to run this Sharing Module.

This module’s objective is to share the results. The Application will prompt

the User to:

1) Retrieve IoC Results or,

2) Retrieve Decrypt Module Results.

Option 1 will trigger the Application to generate a report of the IoC results.

Option 2 will trigger the Application to generate a report of the Decrypt

Module results.

Page 44: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

41 of 50

SECTION 4

SEQUENCE DIAGRAM

SEQUENCE 1 (CRYPTANALYSIS MODULE)

Page 45: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

42 of 50

In this Sequence Diagram, the User is required to input the Ciphertext for

analysis. The User may choose to view the Ciphertext. This is shown as an

optional case above.

After the Ciphertext has been entered, the User will select Run Frequency

Analysis. This is shown as a RFA case above. This will allow the User to:

1) Run IoC Module

2) View Histogram

3) Run Decrypt Module

4) Calculate Occurrence

Case 1 will invoke the Run IoC Module process. Refer to Sequence 4 for the

IOC Module.

Case 2 will display the Ciphertext into a Histogram. A histogram is a

graphical display of data using bars of different heights. In a histogram, each

bar groups numbers into ranges. Each bar will represent an alphabet and the

frequency of each alphabets.

Case 3 will invoke the Run Decrypt Module process. Refer to Sequence 2 for

the Decrypt Module. The User will input characters for substitution as part of

the decryption process. For example, if the ciphertext will substitute all

character N for character X.

Case 4 will invoke the Calculate Occurrence process. This process allows the

user to calculate the frequency of n letters (unigram, bigram, trigram, etc.)

and will display the results.

After Run Frequency Analysis has been executed, the User will run Decrypt

Ciphertext. This will invoke the function to decrypt the ciphertext and return

the decrypted ciphertext (plaintext).

Page 46: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

43 of 50

SEQUENCE 2 (DECRYPT MODULE)

In this Sequence Diagram, the User chooses Decrypt Ciphertext. The

Application will invoke the function Determine Plaintext. This function

invokes another function called Read Ciphertext which will proceed to read in

the ciphertext previously entered by the user.

The Application will then retrieve the information gathered from Run

Frequency Analysis in order to invoke the function Determine Probable

Cipher. Once this is done, the information is passed on to Run Cryptanalysis

Module which will return the decrypted ciphertext to the User.

Page 47: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

44 of 50

SEQUENCE 3 (EDUCATION MODULE)

In this Sequence Diagram, the User chooses Enter User Guide. The

application prompts the user if they want to go through the User Guide if it’s

the first time the application is being run. Alternatively, if it’s not the first

run, the User can choose to run the user guide from the menu.

The application will prompt the User to input the Ciphertext. Once the

ciphertext has been entered, the User selects View User-Assisted Steps. This

will provide an animated series of instructions that the User is supposed to

do or tap when executing the function Run Cryptanalysis Module.

Page 48: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

45 of 50

SEQUENCE 4 (IOC MODULE)

In this Sequence Diagram, the User chooses Determine Period. This will

invoke the function Read Ciphertext which will proceed to read in the

ciphertext previously entered by the user.

The application will calculate the period of the ciphertext which is also known

as the Index of Coincidence. It is an estimate of the probability that two

randomly chosen elements of X are identical. It is also a measure of

roughness of the histogram, that is, it indicates how uneven the histogram

is.

If the Index of coincidence is high (close to 0.070), i.e. similar to plain text,

then the message has probably been crypted using a transposition cipher

(letters were shuffled) or a monoalphabetic substitution (a letter can be

replaced by only one other).

If the Index of coincidence is low (close to 0.0385), i.e. similar to a random

text, then the message has probably been crypted using a polyalphabetic

cipher (a letter can be replaced by multiple other ones).

The more the coincidence count is low, the more alphabets have been used.

Page 49: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

46 of 50

SEQUENCE 5 (REPORT MODULE)

In this Sequence Diagram, the User chooses Generate Report. This will

invoke the functions Retrieve Cryptanalysis, IoC Module and Decrypt Module

results which will be generated into a report. This report will provide all the

information of the ciphertext and the type of cipher that was used.

Page 50: CSCI321 FINAL YEAR PROJECT · CSCI321 FINAL YEAR PROJECT KRYPTO FOR ANDROID ZAINOLABIDIN BIN ESA UOW ID: 5988652 MUHAMMAD ZAHID BIN ADBUL GAFFAR UOW ID: 6097984 MOHAMMAD HANIF BIN

47 of 50

SEQUENCE 6 (SHARING MODULE)

In this Sequence Diagram, the User chooses Share Results. This will invoke

the functions Retrieve Cryptanalysis, IoC Module and Decrypt Module results

which will be generated into a report. This report will provide all the

information of the ciphertext and the type of cipher that was used. This

function will allow the results to be shared via the platform or messaging

application the User wishes to share to.