cryptography rework and beginning of tcp-chat-protocol

This commit is contained in:
2025-10-31 23:19:08 +05:00
parent 42702ffbe7
commit a0bcd2560a
24 changed files with 682 additions and 283 deletions

View File

@@ -30,7 +30,7 @@ Result(void) server_run(cstr server_endpoint_str){
static void* handle_connection(void* _args){
Deferral(64);
ConnectionHandlerArgs* args = (ConnectionHandlerArgs*)_args;
//ConnectionHandlerArgs* args = (ConnectionHandlerArgs*)_args;
// TODO: receive handshake and session key
//ClientConnection conn;

View File

@@ -1,12 +1,14 @@
#pragma once
#include "cryptography/cryptography.h"
#include "network/EncryptedSocket.h"
#include "cryptography/AES.h"
#include "cryptography/RSA.h"
#include "network/encrypted_sockets.h"
Result(void) server_run(cstr server_endpoint_str);
typedef struct ClientConnection {
u64 session_id;
EndpointIPv4 client_end;
Array(u8) session_key;
EncryptedSocket system_socket;
EncryptedSocket content_socket;
EncryptedSocketTCP system_socket;
EncryptedSocketTCP content_socket;
} ClientConnection;