Changeset View
Changeset View
Standalone View
Standalone View
shared/protos/identity_client.proto
Show All 36 Lines | service IdentityClientService { | ||||
// X3DH actions | // X3DH actions | ||||
// Called by clients to get all device keys associated with a user in order | // Called by clients to get all device keys associated with a user in order | ||||
// to open a new channel of communication on any of their devices. | // to open a new channel of communication on any of their devices. | ||||
// Specially, this will return the following per device: | // Specially, this will return the following per device: | ||||
// - Identity keys | // - Identity keys | ||||
// - PreKey (including preKey signature) | // - PreKey (including preKey signature) | ||||
// - One-time PreKey | // - One-time PreKey | ||||
rpc GetReceiverKeysForUser(ReceiverKeysForUserRequest) returns | rpc GetOutboundKeysForUser(OutboundKeysForUserRequest) returns | ||||
(ReceiverKeysForUserResponse) {} | (OutboundKeysForUserResponse) {} | ||||
// Called by receivers of a communication request. The reponse will only | // Called by receivers of a communication request. The reponse will only | ||||
// return identity and prekeys per device, but will not contain one-time keys. | // return identity and prekeys per device, but will not contain one-time keys. | ||||
rpc GetSenderKeysForUser(SenderKeysForUserRequest) returns | rpc GetInboundKeysForUser(InboundKeysForUserRequest) returns | ||||
(SenderKeysForUserResponse) {} | (InboundKeysForUserResponse) {} | ||||
// Called by clients to get required keys for opening a connection | // Called by clients to get required keys for opening a connection | ||||
// to a keyserver | // to a keyserver | ||||
rpc GetKeyserverKeys(KeyserverKeysRequest) returns | rpc GetKeyserverKeys(KeyserverKeysRequest) returns | ||||
(KeyserverKeysResponse) {} | (KeyserverKeysResponse) {} | ||||
// Replenish one-time preKeys | // Replenish one-time preKeys | ||||
rpc UploadOneTimeKeys(UploadOneTimeKeysRequest) returns (Empty) {} | rpc UploadOneTimeKeys(UploadOneTimeKeysRequest) returns (Empty) {} | ||||
// Rotate a devices preKey and preKey signature | // Rotate a devices preKey and preKey signature | ||||
// Rotated for deniability of older messages | // Rotated for deniability of older messages | ||||
▲ Show 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
// GenerateNonce | // GenerateNonce | ||||
message GenerateNonceResponse{ | message GenerateNonceResponse{ | ||||
string nonce = 1; | string nonce = 1; | ||||
} | } | ||||
// GetReceiverKeysForUser | // GetOutboundKeysForUser | ||||
// Information needed when establishing communication to someone else's device | // Information needed when establishing communication to someone else's device | ||||
message ReceiverKeyInfo { | message OutboundKeyInfo { | ||||
IdentityKeyInfo identityInfo = 1; | IdentityKeyInfo identityInfo = 1; | ||||
PreKey identityPrekey = 2; | PreKey identityPrekey = 2; | ||||
PreKey notifPrekey = 3; | PreKey notifPrekey = 3; | ||||
optional string onetimeIdentityPrekey = 4; | optional string onetimeIdentityPrekey = 4; | ||||
optional string onetimeNotifPrekey = 5; | optional string onetimeNotifPrekey = 5; | ||||
} | } | ||||
// Information needed by a device to establish communcation when responding | // Information needed by a device to establish communcation when responding | ||||
// to a request. | // to a request. | ||||
// The device receiving a request only needs the identity and prekeys. | // The device receiving a request only needs the identity and prekeys. | ||||
message ReceiverKeysForUserRequest { | message OutboundKeysForUserRequest { | ||||
oneof identifier { | oneof identifier { | ||||
string username = 1; | string username = 1; | ||||
string walletAddress = 2; | string walletAddress = 2; | ||||
} | } | ||||
} | } | ||||
message ReceiverKeysForUserResponse { | message OutboundKeysForUserResponse { | ||||
// Map is keyed on devices' public ed25519 key used for signing | // Map is keyed on devices' public ed25519 key used for signing | ||||
map<string, ReceiverKeyInfo> devices = 1; | map<string, OutboundKeyInfo> devices = 1; | ||||
} | } | ||||
// GetSenderKeysForUser | // GetInboundKeysForUser | ||||
message SenderKeyInfo { | message InboundKeyInfo { | ||||
IdentityKeyInfo identityInfo = 1; | IdentityKeyInfo identityInfo = 1; | ||||
PreKey identityPrekey = 2; | PreKey identityPrekey = 2; | ||||
PreKey notifPrekey = 3; | PreKey notifPrekey = 3; | ||||
} | } | ||||
message SenderKeysForUserRequest { | message InboundKeysForUserRequest { | ||||
oneof identifier { | oneof identifier { | ||||
string username = 1; | string username = 1; | ||||
string walletAddress = 2; | string walletAddress = 2; | ||||
} | } | ||||
} | } | ||||
message SenderKeysForUserResponse { | message InboundKeysForUserResponse { | ||||
// Map is keyed on devices' public ed25519 key used for signing | // Map is keyed on devices' public ed25519 key used for signing | ||||
map<string, SenderKeyInfo> devices = 1; | map<string, InboundKeyInfo> devices = 1; | ||||
} | } | ||||
// GetKeyserverKeys | // GetKeyserverKeys | ||||
// Information needed when establishing communication to a keyserver | // Information needed when establishing communication to a keyserver | ||||
message KeyserverSessionInfo { | message KeyserverSessionInfo { | ||||
IdentityKeyInfo identityInfo = 1; | IdentityKeyInfo identityInfo = 1; | ||||
PreKey identityPrekeys = 2; | PreKey identityPrekeys = 2; | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |