Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

api_docs: Improve push_key description in `POST /mobile_push/register`.

Prakhar Pratyush4ae87a8f157c
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index 240262a8aa7..3d6249977b4 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -12797,13 +12797,21 @@ paths:
example: 2408
push_key:
description: |
- Key that the client would like the server to use to encrypt notifications. It
- consists of a single byte encoding which cryptosystem to use, followed by the
- byte sequence representing the key to use for that cryptosystem. This byte
- sequence is encoded using standard Base64 encoding as defined in RFC 4648. Supported cryptosystems are:
+ Key that the client would like the server to use to encrypt notifications,
+ encoded with Base64.
+
+ The key is a byte sequence beginning with a single byte that encodes which
+ cryptosystem to use, followed by the key to use for that cryptosystem.
+ This byte sequence is encoded using standard Base64 encoding as defined in RFC 4648.
+
+ The client should avoid sharing the key anywhere else: in particular it should
+ generate a fresh key for each server, and to the extent possible keep the key
+ out of any backups of the client's data.
+
+ Supported cryptosystems are:
- `0x31`: LibSodium's [SecretBox][libsodium-secretbox] symmetric key encryption
- system. Keys are 32 bytes, generated by the client using libsodium's
+ system. Keys are 32 bytes, which the server will use with libsodium's
`crypto_secretbox_easy`. See the [NaCl documentation][nacl-secretbox], which
details how this system uses `XSalsa20` and `Poly1305` to provide authenticated
encryption.