Skip to content

Commit

Permalink
Start reimplementing trusted delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
survived committed Apr 4, 2022
1 parent d2eecd8 commit 374037c
Show file tree
Hide file tree
Showing 23 changed files with 647 additions and 150 deletions.
109 changes: 103 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ members = [
"delivery/trusted-delivery/core",
"delivery/trusted-delivery/client",
"delivery/trusted-delivery/server",
"delivery/trusted-delivery/server_old",
"delivery/two-party",
"delivery/utils",
"examples/random-generation-protocol",
Expand Down
34 changes: 21 additions & 13 deletions delivery/trusted-delivery/api/proto/trusted_delivery.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,39 @@ syntax = "proto3";
package trusted_delivery;

service Auth {
rpc GetChallenge(GetChallengeRequest) returns (Challenge);
rpc Auth(AuthRequest) returns (AuthToken);
rpc Auth(stream AuthRequest) returns (stream AuthResponse);
}

service TrustedDelivery {
rpc PublishMessages(stream PublishMessage) returns (PublishResponse);
rpc Subscribe(SubscribeRequest) returns (stream ForwardMessage);
}

// GetChallenge method
// Auth method

message GetChallengeRequest {}
message Challenge {
bytes challenge = 1;
message AuthRequest {
oneof req {
GetChallenge get_challenge = 1;
GetToken get_token = 2;
}
}

// Auth method
message GetChallenge {}
message GetToken {
Identity identity = 1;
RoomId room = 2;
Signature signature = 3;
}

message AuthRequest {
Challenge challenge = 1;
RoomId room_id = 2;
ChallengeResponse response = 3;
message AuthResponse {
oneof resp {
Challenge challenge = 1;
AuthToken token = 2;
}
}
message ChallengeResponse {
bytes signed_challenge = 1;

message Challenge {
bytes challenge = 1;
}
message AuthToken {
bytes token = 1;
Expand Down
Loading

0 comments on commit 374037c

Please sign in to comment.