Package org.signal.chat.keys
Message
CheckIdentityKeyRequest
Message
CheckIdentityKeyResponse
Message
GetPreKeyCountResponse
Message
GetPreKeysAnonymousRequest
Message
GetPreKeysAnonymousResponse
Message
SetEcSignedPreKeyRequest
Message
SetKemLastResortPreKeyRequest
Message
SetOneTimeEcPreKeysRequest
Services
service Keys
Provides methods for working with pre-keys.
rpc GetPreKeyCount
Request: org.signal.chat.keys.GetPreKeyCountRequest
Response:
org.signal.chat.keys.GetPreKeyCountResponse
Retrieves an approximate count of the number of the various kinds of pre-keys stored for the authenticated device.
rpc GetPreKeys
Request: org.signal.chat.keys.GetPreKeysRequest
Response:
org.signal.chat.keys.GetPreKeysResponse
Retrieves a set of pre-keys for establishing a session with the targeted
device or devices. Note that callers with an unidentified access key for
the targeted account should use the version of this method in
KeysAnonymous instead.
rpc SetOneTimeEcPreKeys
Request: org.signal.chat.keys.SetOneTimeEcPreKeysRequest
Response:
org.signal.chat.keys.SetPreKeyResponse
Uploads a new set of one-time EC pre-keys for the authenticated device, clearing any previously-stored pre-keys. Note that all keys submitted via a single call to this method must have the same identity type (i.e. if the first key has an ACI identity type, then all other keys in the same stream must also have an ACI identity type). The provided list of pre-keys must be non-empty.
rpc SetOneTimeKemSignedPreKeys
Request: org.signal.chat.keys.SetOneTimeKemSignedPreKeysRequest
Response:
org.signal.chat.keys.SetPreKeyResponse
Uploads a new set of one-time KEM pre-keys for the authenticated device, clearing any previously-stored pre-keys. Note that all keys submitted via a single call to this method must have the same identity type (i.e. if the first key has an ACI identity type, then all other keys in the same stream must also have an ACI identity type). The provided list of pre-keys must be non-empty.
rpc SetEcSignedPreKey
Request: org.signal.chat.keys.SetEcSignedPreKeyRequest
Response:
org.signal.chat.keys.SetPreKeyResponse
Sets the signed EC pre-key for one identity (i.e. ACI or PNI) associated with the authenticated device.
rpc SetKemLastResortPreKey
Request: org.signal.chat.keys.SetKemLastResortPreKeyRequest
Response:
org.signal.chat.keys.SetPreKeyResponse
Sets the last-resort KEM pre-key for one identity (i.e. ACI or PNI) associated with the authenticated device.
service KeysAnonymous
Provides methods for working with pre-keys using "unidentified access" credentials.
rpc GetPreKeys
Request: org.signal.chat.keys.GetPreKeysAnonymousRequest
Response:
org.signal.chat.keys.GetPreKeysAnonymousResponse
Retrieves a set of pre-keys for establishing a session with the targeted
device or devices. Callers must not submit any self-identifying credentials
when calling this method and must instead present the targeted account's
unidentified access key as an anonymous authentication mechanism. Callers
without an unidentified access key should use the equivalent, authenticated
method in Keys instead.
rpc CheckIdentityKeys
Request: org.signal.chat.keys.CheckIdentityKeyRequest
Response:
org.signal.chat.keys.CheckIdentityKeyResponse
Checks identity key fingerprints of the target accounts.
Returns a stream of elements, each one representing an account that had a mismatched identity key fingerprint with the server and the corresponding identity key stored by the server.
Messages
message AccountPreKeyBundles
| Field | Type | Description | |
|---|---|---|---|
| 1 | identity_key |
bytes
|
The identity key associated with the targeted account/identity. |
| 2 | device_pre_keys |
map<uint32, DevicePreKeyBundle>
|
A map of device IDs to pre-key "bundles" for the targeted account. |
| 3 | unrestricted_unidentified_access |
bool
|
Whether the account has enabled sealed sender from anyone. Always false if the request was for a PNI, which does not allow any unidentified access. |
| 4 | unidentified_access_key_fingerprint |
bytes
|
If the target supports unidentified access and has an unidentified access key, a fingerprint of the target's UAK. This may be used to detect a change in the UAK that the sender has for the target before actually sending a message. Otherwise, empty. |
message CheckIdentityKeyRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | target_identifier |
org.signal.chat.common.ServiceIdentifier
|
The service identifier of the account for which we want to check the associated identity key fingerprint. |
| 2 | fingerprint |
bytes
|
The most significant 4 bytes of the SHA-256 hash of the identity key associated with the target account/identity type. |
message CheckIdentityKeyResponse
| Field | Type | Description | |
|---|---|---|---|
|
oneof response
|
|||
| 1 | matched |
google.protobuf.Empty
|
The key for the target account/identity type matched. |
| 2 | identity_key |
bytes
|
The identity key that is stored by the server for the target account/identity type. |
| 3 | target_not_found |
org.signal.chat.errors.NotFound
|
Either the target account was not found, or it has no identity key for the requested identity type. |
message DevicePreKeyBundle
| Field | Type | Description | |
|---|---|---|---|
| 1 | ec_signed_pre_key |
org.signal.chat.common.EcSignedPreKey
|
The EC signed pre-key associated with the targeted account/device/identity. |
| 2 | ec_one_time_pre_key |
org.signal.chat.common.EcPreKey
|
A one-time EC pre-key for the targeted account/device/identity. May not be set if no one-time EC pre-keys are available. |
| 3 | kem_pre_key |
org.signal.chat.common.KemSignedPreKey
|
A one-time KEM pre-key (or a last-resort KEM pre-key) for the targeted account/device/identity. |
| 4 | registration_id |
uint32
|
The registration ID for the targeted account/device/identity. |
message GetPreKeyCountResponse
| Field | Type | Description | |
|---|---|---|---|
| 1 | aci_ec_pre_key_count |
uint32
|
The approximate number of one-time EC pre-keys stored for the authenticated device and associated with the caller's ACI. |
| 2 | aci_kem_pre_key_count |
uint32
|
The approximate number of one-time Kyber pre-keys stored for the authenticated device and associated with the caller's ACI. |
| 3 | pni_ec_pre_key_count |
uint32
|
The approximate number of one-time EC pre-keys stored for the authenticated device and associated with the caller's PNI. 0 if the account does not possess a phone number. |
| 4 | pni_kem_pre_key_count |
uint32
|
The approximate number of one-time KEM pre-keys stored for the authenticated device and associated with the caller's PNI. 0 if the account does not possess a phone number. |
message GetPreKeysAnonymousRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | request |
org.signal.chat.keys.GetPreKeysRequest
|
The request to retrieve pre-keys for a specific account/device(s).
If |
|
oneof authorization
|
|||
| 2 | unidentified_access_key |
bytes
|
The unidentified access key (UAK) for the targeted account. |
| 3 | group_send_token |
bytes
|
A group send endorsement token for the targeted account. |
| 4 | unrestricted_access |
google.protobuf.Empty
|
The destination account allows unrestricted unidentified access |
message GetPreKeysAnonymousResponse
| Field | Type | Description | |
|---|---|---|---|
|
oneof response
|
|||
| 1 | pre_keys |
org.signal.chat.keys.AccountPreKeyBundles
|
The requested pre-key bundles |
| 2 | target_not_found |
org.signal.chat.errors.NotFound
|
Either the target account was not found, no active device with the given ID (if specified) was found on the target account. |
| 3 | failed_unidentified_authorization |
org.signal.chat.errors.FailedUnidentifiedAuthorization
|
The provided unidentified authorization credential was invalid |
message GetPreKeysRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | target_identifier |
org.signal.chat.common.ServiceIdentifier
|
The service identifier of the account for which to retrieve pre-keys. |
| 2 | device_id |
optional
uint32
|
The ID of the device associated with the targeted account for which to retrieve pre-keys. If not set, pre-keys are returned for all devices associated with the targeted account. |
message GetPreKeysResponse
| Field | Type | Description | |
|---|---|---|---|
|
oneof response
|
|||
| 1 | pre_keys |
org.signal.chat.keys.AccountPreKeyBundles
|
The requested pre-key bundles |
| 2 | target_not_found |
org.signal.chat.errors.NotFound
|
Either the target account was not found, no active device with the given ID (if specified) was found on the target account. |
message SetEcSignedPreKeyRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | identity_type |
org.signal.chat.common.IdentityType
|
The identity type (i.e. ACI/PNI) with which this key is associated. |
| 2 | signed_pre_key |
org.signal.chat.common.EcSignedPreKey
|
The signed EC pre-key itself. |
message SetKemLastResortPreKeyRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | identity_type |
org.signal.chat.common.IdentityType
|
The identity type (i.e. ACI/PNI) with which this key is associated. |
| 2 | signed_pre_key |
org.signal.chat.common.KemSignedPreKey
|
The signed KEM pre-key itself. |
message SetOneTimeEcPreKeysRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | identity_type |
org.signal.chat.common.IdentityType
|
The identity type (i.e. ACI/PNI) with which the keys in this request are associated. |
| 2 | pre_keys |
repeated
org.signal.chat.common.EcPreKey
|
The unsigned EC pre-keys to be stored. |
message SetOneTimeKemSignedPreKeysRequest
| Field | Type | Description | |
|---|---|---|---|
| 1 | identity_type |
org.signal.chat.common.IdentityType
|
The identity type (i.e. ACI/PNI) with which the keys in this request are associated. |
| 2 | pre_keys |
repeated
org.signal.chat.common.KemSignedPreKey
|
The KEM pre-keys to be stored. |