online_security_project/README.md

77 lines
No EOL
2.1 KiB
Markdown

# Project - TODO:
[x] implement SendMessage at the server
[ ] implement Login
[ ] client
[ ] server
[x] Figure out how to do the messages themselves
[x] Figure out how to pass the signature (i think it must be as a second packet)
[x] implement sending messages properly
[x] implement message acks
## Protocol todo:
[x] Figure out how a message and message ack payload will look
## Misc todo:
[x] Create a Request to String function for easy printing and debugging
## client todo:
[ ] Check for key when turned on
[x] generate key and register if no key is preset, and save it after registration is done
[ ] if key is present, start by establishing connection (which makes sure we are signed in)
[x] use AES to get basic packets from the server
[x] use RSA private key to read normal messages
## Server todo:
[x] Laucnh task for each new connection
[x] use RSA key to get first message and extract AES key
[ ] verify the user using its public RSA key
[x] if it was a register session save the key into the BIG DATA STRUCTURE
[x] Keep lists of incoming messages
(doesnt need to know from who, they are just big blobs of shlomp)
[x] When user asks for incoming messages, make basic packet and append the incoming messages
- last byte is the "how many messages are left" byte
- each byte in the extra data will be the length of the next message, so
if there are 3 messages of length 128, 200, 300 bytes it will be
[128, 200, 300, 0 ...] and the actual position in the payload is easy
to calculate ([128, 200+128=328, 300+328=628, ...])
Register process:
Client Server
Send AES key (sk)
Send Register(pub key)
Get AES
Get Register
Send 6 digit code
Get 6 digit code
(1) Wait for user to input 6 digit code
Send 6 digit code (signed)
Get 6 digit code and verify (code, then sig)
Send OK/NACK
if NACK goto (1)
Login process:
Client Server
Send AES key (sk)
Send Login message (Phone, AES sig)
Get AES key
Verify AES sig with Phone-pub key
if sig is invalid: close connection
else: send stored messages because why not
Usual process get messages:
Client Server
Send GetMessages
Send back messages
Send GotMessages(amount)