|
| 1 | +# Copyright 2016 OpenMarket Ltd |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +type: object |
| 15 | +title: DeviceKeys |
| 16 | +description: Device identity keys |
| 17 | +properties: |
| 18 | + user_id: |
| 19 | + type: string |
| 20 | + description: |- |
| 21 | + The ID of the user the device belongs to. Must match the user ID used |
| 22 | + when logging in. |
| 23 | + example: "@alice:example.com" |
| 24 | + device_id: |
| 25 | + type: string |
| 26 | + description: |- |
| 27 | + The ID of the device these keys belong to. Must match the device ID used |
| 28 | + when logging in. |
| 29 | + example: "JLAFKJWSCS" |
| 30 | + algorithms: |
| 31 | + type: array |
| 32 | + items: |
| 33 | + type: string |
| 34 | + description: |- |
| 35 | + The encryption algorithms supported by this device. |
| 36 | + example: ["m.olm.curve25519-aes-sha256", "m.megolm.v1.aes-sha"] |
| 37 | + keys: |
| 38 | + type: object |
| 39 | + description: |- |
| 40 | + Public identity keys. The names of the properties should be in the |
| 41 | + format ``<algorithm>:<device_id>``. The keys themselves should be |
| 42 | + encoded as specified by the key algorithm. |
| 43 | + additionalProperties: |
| 44 | + type: string |
| 45 | + example: |
| 46 | + "curve25519:JLAFKJWSCS": "3C5BFWi2Y8MaVvjM8M22DBmh24PmgR0nPvJOIArzgyI" |
| 47 | + "ed25519:JLAFKJWSCS": "lEuiRJBit0IG6nUf5pUzWTUEsRVVe/HJkoKuEww9ULI" |
| 48 | + signatures: |
| 49 | + type: object |
| 50 | + description: |- |
| 51 | + Signatures for the device key object. A map from user ID, to a map from |
| 52 | + ``<algorithm>:<device_id>`` to the signature. |
| 53 | +
|
| 54 | + The signature is calculated using the process described at `Signing |
| 55 | + JSON`_. |
| 56 | + additionalProperties: |
| 57 | + type: object |
| 58 | + additionalProperties: |
| 59 | + type: string |
| 60 | + example: |
| 61 | + "@alice:example.com": |
| 62 | + "ed25519:JLAFKJWSCS": "dSO80A01XiigH3uBiDVx/EjzaoycHcjq9lfQX0uWsqxl2giMIiSPR8a4d291W1ihKJL/a+myXS367WT6NAIcBA" |
| 63 | +required: |
| 64 | + - user_id |
| 65 | + - device_id |
| 66 | + - algorithms |
| 67 | + - keys |
| 68 | + - signatures |
0 commit comments