generated from security-union/yew-actix-template
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* save * Adding a PacketWrapper protobuf type and key protobuf types * Rebase with new connection model * Add cargo workspace * cargo fmt * cargo fmt * Save close but no cigar * e2ee working poc - but it is laggy * allow non_camel_case_types * Encrypt heartbeats, clippy fix, it's smoother now * clippy fix * cargo fmt * Adding sequence diagram * If key doesn't exist send new pub key message * Rename proto var * Handle peers refreshing keys * fmt * Add feature flag for e2ee * Add missing env var * Same block * cargo clippy --fix * Removing unwraps * Refactor log statements with levels * Logging level * cargo fmt
- Loading branch information
1 parent
1ff8bf3
commit 1b4206e
Showing
40 changed files
with
1,484 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM rust:1.62-slim | ||
FROM rust:1.71-slim | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ARG USER | ||
ARG UID | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
message AesPacket { | ||
bytes key = 1; | ||
bytes iv = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
syntax = "proto3"; | ||
|
||
message PacketWrapper { | ||
enum PacketType { | ||
RSA_PUB_KEY = 0; | ||
AES_KEY = 1; | ||
MEDIA = 2; | ||
} | ||
PacketType packet_type = 1; | ||
string email = 2; | ||
bytes data = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
message RsaPacket { | ||
bytes public_key_der = 1; | ||
string username = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
title videocall-rs e2ee sequence diagram | ||
|
||
participant Alice | ||
participant Bob | ||
participant Server | ||
participant Casey | ||
|
||
|
||
Alice->Server:Alice joins room 1 | ||
Alice->Server:Alice starts sending encrypted heartbeats | ||
Alice->Server:Alice sends RSA pub key message | ||
|
||
Bob->Server:Bob joins room 1 | ||
Bob->Server:Bob starts sending encrypted heartbeats | ||
Bob->Server:Bob sends RSA pub key message | ||
|
||
Server->Alice:Server sends Bob's RSA pub key message to Alice | ||
Alice-->Server:Responding to Bob's RSA pub key msg, Alice encrypts their AES key with Bob's RSA pub key and sends it to the server | ||
Server-->Bob:Bob receives the AES msg from Alice and decrypts it with Bob's RSA private key | ||
|
||
Alice->Server:Alice notices that Bob is a new peer and sends the RSA pub key message again | ||
Server->Bob:Server sends Alice's RSA pub key message to Bob | ||
Bob-->Server:Responding to Alices's RSA pub key msg, Bob encrypts their AES key with Alice's RSA pub key and sends it to the server | ||
Server-->Alice:Alice receives the AES msg from Bob and decrypts it with Alice's RSA private key | ||
|
||
Casey->Server:Casey joins room 1 | ||
Casey->Server:Casey starts sending encrypted heartbeats | ||
Casey->Server:Casey sends RSA pub key message | ||
|
||
Server->Alice:Server sends Casey's RSA pub key message to Alice | ||
Alice-->Server:Responding to Casey's RSA pub key msg, Alice encrypts their AES key with Casey's RSA pub key and sends it to the server | ||
Server-->Casey:Casey receives the AES msg from Alice and decrypts it with Casey's RSA private key | ||
|
||
Server->Bob:Server sends Casey's RSA pub key message to Bob | ||
Bob-->Server:Responding to Casey's RSA pub key msg, Bob encrypts their AES key with Casey's RSA pub key and sends it to the server | ||
Server-->Casey:Casey receives the AES msg from Bob and decrypts it with Casey's RSA private key | ||
|
||
Alice->Server:Alice notices that Casey is a new peer and sends the RSA pub key message again | ||
Server->Casey:Server sends Alice's RSA pub key message to Casey | ||
Casey-->Server:Responding to Alices's RSA pub key msg, Casey encrypts their AES key with Alice's RSA pub key and sends it to the server | ||
Server-->Alice:Alice receives the AES msg from Casey and decrypts it with Alice's RSA private key | ||
|
||
Server->Bob:Server sends Alice's RSA pub key message to Bob | ||
Bob-->Server:Responding to Alices's RSA pub key msg, Bob encrypts their AES key with Alice's RSA pub key and sends it to the server | ||
Server-->Alice:Alice receives the AES msg from Bob and decrypts it with Alice's RSA private key | ||
|
||
Bob->Server:Bob notices that Casey is a new peer and sends the RSA pub key message again | ||
Server->Casey:Server sends Bob's RSA pub key message to Casey | ||
Casey-->Server:Responding to Bob's RSA pub key msg, Casey encrypts their AES key with Bob's RSA pub key and sends it to the server | ||
Server-->Bob:Bob receives the AES msg from Casey and decrypts it with Bob's RSA private key | ||
|
||
Server->Alice:Server sends Bob's RSA pub key message to Alice | ||
Alice-->Server:Responding to Bob's RSA pub key msg, Alice encrypts their AES key with Bob's RSA pub key and sends it to the server | ||
Server-->Bob:Bob receives the AES msg from Alice and decrypts it with Bob's RSA private key | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.