mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-20 16:38:37 +01:00
Merge pull request #2083 from matrix-org/travis/1.0/key-object
Clarify the key object definition for the key management API
This commit is contained in:
commit
8ac555f870
|
|
@ -56,25 +56,48 @@ paths:
|
|||
One-time public keys for "pre-key" messages. The names of
|
||||
the properties should be in the format
|
||||
``<algorithm>:<key_id>``. The format of the key is determined
|
||||
by the key algorithm.
|
||||
by the `key algorithm <#key-algorithms>`_.
|
||||
|
||||
May be absent if no new one-time keys are required.
|
||||
additionalProperties:
|
||||
type:
|
||||
- string
|
||||
- object
|
||||
example:
|
||||
"curve25519:AAAAAQ": "/qyvZvwjiTxGdGU0RCguDCLeR+nmsb3FfNG3/Ve4vU8"
|
||||
signed_curve25519:AAAAHg:
|
||||
key: "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs"
|
||||
signatures:
|
||||
"@alice:example.com":
|
||||
ed25519:JLAFKJWSCS: "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
|
||||
signed_curve25519:AAAAHQ:
|
||||
key: "j3fR3HemM16M7CWhoI4Sk5ZsdmdfQHsKL1xuSft6MSw"
|
||||
signatures:
|
||||
"@alice:example.com":
|
||||
ed25519:JLAFKJWSCS: "IQeCEPb9HFk217cU9kw9EOiusC6kMIkoIRnbnfOh5Oc63S1ghgyjShBGpu34blQomoalCyXWyhaaT3MrLZYQAA"
|
||||
# XXX: We can't define an actual object here, so we have to hope
|
||||
# that people will look at the swagger source or can figure it out
|
||||
# from the other endpoints/example.
|
||||
# - type: object
|
||||
# title: KeyObject
|
||||
# properties:
|
||||
# key:
|
||||
# type: string
|
||||
# description: The key, encoded using unpadded base64.
|
||||
# signatures:
|
||||
# type: object
|
||||
# description: |-
|
||||
# Signature for the device. Mapped from user ID to signature object.
|
||||
# additionalProperties:
|
||||
# type: string
|
||||
# required: ['key', 'signatures']
|
||||
example: {
|
||||
"curve25519:AAAAAQ": "/qyvZvwjiTxGdGU0RCguDCLeR+nmsb3FfNG3/Ve4vU8",
|
||||
"signed_curve25519:AAAAHg": {
|
||||
"key": "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs",
|
||||
"signatures": {
|
||||
"@alice:example.com": {
|
||||
"ed25519:JLAFKJWSCS": "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
|
||||
}
|
||||
}
|
||||
},
|
||||
"signed_curve25519:AAAAHQ": {
|
||||
"key": "j3fR3HemM16M7CWhoI4Sk5ZsdmdfQHsKL1xuSft6MSw",
|
||||
"signatures": {
|
||||
"@alice:example.com": {
|
||||
"ed25519:JLAFKJWSCS": "IQeCEPb9HFk217cU9kw9EOiusC6kMIkoIRnbnfOh5Oc63S1ghgyjShBGpu34blQomoalCyXWyhaaT3MrLZYQAA"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
responses:
|
||||
200:
|
||||
description:
|
||||
|
|
@ -246,8 +269,9 @@ paths:
|
|||
type: string
|
||||
description: algorithm
|
||||
example: "signed_curve25519"
|
||||
example:
|
||||
example: {
|
||||
"@alice:example.com": { "JLAFKJWSCS": "signed_curve25519" }
|
||||
}
|
||||
required:
|
||||
- one_time_keys
|
||||
responses:
|
||||
|
|
@ -275,20 +299,46 @@ paths:
|
|||
description: |-
|
||||
One-time keys for the queried devices. A map from user ID, to a
|
||||
map from devices to a map from ``<algorithm>:<key_id>`` to the key object.
|
||||
|
||||
See the `key algorithms <#key-algorithms>`_ section for information
|
||||
on the Key Object format.
|
||||
additionalProperties:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type:
|
||||
- string
|
||||
- object
|
||||
example:
|
||||
"@alice:example.com":
|
||||
JLAFKJWSCS:
|
||||
signed_curve25519:AAAAHg:
|
||||
key: "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs"
|
||||
signatures:
|
||||
"@alice:example.com":
|
||||
ed25519:JLAFKJWSCS: "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
|
||||
# XXX: We can't define an actual object here, so we have to hope
|
||||
# that people will look at the swagger source or can figure it out
|
||||
# from the other endpoints/example.
|
||||
# - type: object
|
||||
# title: KeyObject
|
||||
# properties:
|
||||
# key:
|
||||
# type: string
|
||||
# description: The key, encoded using unpadded base64.
|
||||
# signatures:
|
||||
# type: object
|
||||
# description: |-
|
||||
# Signature for the device. Mapped from user ID to signature object.
|
||||
# additionalProperties:
|
||||
# type: string
|
||||
# required: ['key', 'signatures']
|
||||
example: {
|
||||
"@alice:example.com": {
|
||||
"JLAFKJWSCS": {
|
||||
"signed_curve25519:AAAAHg": {
|
||||
"key": "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs",
|
||||
"signatures": {
|
||||
"@alice:example.com": {
|
||||
"ed25519:JLAFKJWSCS": "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
required: ['one_time_keys']
|
||||
tags:
|
||||
- End-to-end encryption
|
||||
"/keys/changes":
|
||||
|
|
|
|||
|
|
@ -72,19 +72,31 @@ paths:
|
|||
description: |-
|
||||
One-time keys for the queried devices. A map from user ID, to a
|
||||
map from devices to a map from ``<algorithm>:<key_id>`` to the key object.
|
||||
|
||||
See the Client-Server Key Algorithms section for more information on
|
||||
the Key Object format.
|
||||
additionalProperties:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type:
|
||||
- string
|
||||
- object
|
||||
required: ['one_time_keys']
|
||||
examples:
|
||||
application/json: {
|
||||
"one_time_keys": {
|
||||
- type: object
|
||||
title: KeyObject
|
||||
properties:
|
||||
key:
|
||||
type: string
|
||||
description: The key, encoded using unpadded base64.
|
||||
signatures:
|
||||
type: object
|
||||
description: |-
|
||||
Signature for the device. Mapped from user ID to signature object.
|
||||
additionalProperties:
|
||||
type: string
|
||||
required: ['key', 'signatures']
|
||||
example: {
|
||||
"@alice:example.com": {
|
||||
"JLAFKJWSCS": {
|
||||
"signed_curve25518:AAAAHg": {
|
||||
"signed_curve25519:AAAAHg": {
|
||||
"key": "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs",
|
||||
"signatures": {
|
||||
"@alice:example.com": {
|
||||
|
|
@ -95,7 +107,7 @@ paths:
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
required: ['one_time_keys']
|
||||
"/user/keys/query":
|
||||
post:
|
||||
summary: Download device identity keys.
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
Clarify the key object definition for the key management API.
|
||||
|
|
@ -0,0 +1 @@
|
|||
Clarify the key object definition for the key management API.
|
||||
Loading…
Reference in a new issue