telodendria/Schema/KeyUpload.json
LDA 4b427a4c82 [ADD/WIP] Dumb key management
This is just enough to fool FluffyChat and nheko, and still not enough
to actually do proper E2EE. Also, don't use Cinny with it, it seems to
repeteadly upload keys. Terrible.
2024-12-02 11:50:38 +01:00

62 lines
1.8 KiB
JSON

{
"guard": "TELODENDRIA_KEY_UPLOAD_H",
"header": "Schema/KeyUpload.h",
"types": {
"DeviceKeys": {
"type": "struct",
"fields": {
"device_id": {
"type": "string",
"required": true
},
"user_id": {
"type": "string",
"required": true
},
"algorithms": {
"type": "[string]",
"required": true
},
"keys": {
"type": "{string}",
"required": true
},
"signatures": {
"//": "TODO: More complex j2s types.",
"//": "This is meant to be a map from user ID to ",
"//": "algo+device ID to a signature(string).",
"type": "object",
"required": true
}
}
},
"KeyResponse": {
"type": "struct",
"fields": {
"one_time_key_counts": {
"type": "{integer}",
"required": true
}
}
},
"KeyUploadRequest": {
"type": "struct",
"fields": {
"device_keys": {
"type": "DeviceKeys",
"required": false
},
"fallback_keys": {
"//": "This is a one-time key.",
"type": "object",
"required": false
},
"one_time_keys": {
"//": "This is a one-time key.",
"type": "object",
"required": false
}
}
}
}
}