-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram Design
More file actions
74 lines (67 loc) · 2.98 KB
/
Program Design
File metadata and controls
74 lines (67 loc) · 2.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Program Design ->
I. Person Class ->
A. Object Variables
1. Friend list
2. Private key
3. Public key
3. Secured symmetric keys / iv for all friends (list)
4. List of received messages
5. List of sent messages
6. Initialize person in global MESSAGES
B. Object Methods
1. Send message
2. Check message
a. Involves sending key and receiving key
b. Initialize personal messages list in global MESSAGES
c. Initialize person in sent and received messages
4. Send key
5. Receive key
6. Delete Friend
C. Static Variables
1. Public key list
II.User Functions ->
A. Add Person
1. Generate Private Key and Public Key
2. Initializing friend list
3. Adding Public Key to Person Class
4. Add a new log in the terminal
B. Secure Channel
1. Generate a new session key
2. Use asymmetric encryption to share and receive key
3. Add secure symmetric key to each persons list (Secure key/iv list)
4. Add each other to respective friend lists
C. Send Message
1. Send message
2. Add to respective sent and received messages
3. Print appropriate messages on both terminal logs
4. Add Message to global MESSAGES as receiver -> sender -> messages[]
5. Send Hashed Message for verification
D. Check messages
1. Return recent messages
2. Checks if hash of decrypted message matches the hash sent
3. Clear old messages
III. Crypt Class ->
1. Contains all Functionality of the symmetric encryptor
decryptor encapsulated
2. Contains all implementation of padding
3. Contains Asymmetric encryption functionality for key sharing
4. Secure Channel
a. Sends key from sender to receiver
b. receives key from sender and decrypts and verifies
IV. String Class ->
1. Add spaces and remove spaces methods
V. Help menu (Explains commands) ->
1. Add new person using 'add <name>' command
2. To Enter into a specific user use 'select <name>' command
3. Go to help menu using 'help' command
4. List all users using 'list' command
5. Exit the application using 'exit' command
Enter any key to exit this menu
VI. Help menu (Explains user commands) ->
1. Add Friend using 'friend <name>' command
2. Add multiple friends using 'friend <name1> <name2> <name3> ... <nameN>' command
3. Check messages using 'check' command
4. To send a message to a friend use 'send <name> <message>' command
5. To delete a friend use 'delete <friend>' command
6. To go back to main menu using 'main_menu' command
7. Go to help menu using 'help' command