zulip/api_docs
Prakhar Pratyush 7ebdca52e8 push_notification: Use symmetric cryptography to encrypt notifications.
Earlier we were using asymmetric cryptography.

We were using libsodium "sealed box" which is unauthenticated
by design. The sender could have been anyone, as long as they
had the receiver's public key.

We had authenticity but only because the device's public key
is effectively kept secret. We were relying on the public key
being kept secret - which was a security risk. It's easy to
end up with code somewhere that treats the public key as public,
and can leak it.

This commit makes changes to use symmetric cryptography -
libsodium's `crypto_secretbox_easy` which provides authenticated
encryption using XSalsa20 and Poly1305.

`push_public_key` is replaced with `push_key` and it represents
a base64 encoded 33-byte value: one-byte prefix followed by 32-byte
secret key generated by the client.

The prefix `0x31` indicates the current cryptosystem in use.
It allows for future extensibility - for example, `0x32` could denote
a different cryptosystem.

Involves API changes to replace the `push_public_key` parameter
with `push_key` in `/api/v1/mobile_push/register` endpoint.

Signed-off-by: Prakhar Pratyush <prakhar@zulip.com>
2025-11-07 12:00:39 -08:00
..
include api_docs: Update get-file-temporary-url endpoint and add to sidebar. 2025-08-29 10:21:42 -07:00
api-doc-template.md api-docs: Move markdown files to top level directory. 2023-02-02 17:25:40 -08:00
api-keys.md api-docs: Use start_tabs formatting and add "Related articles". 2024-02-24 08:14:32 -08:00
changelog.md push_notification: Use symmetric cryptography to encrypt notifications. 2025-11-07 12:00:39 -08:00
client-libraries.md docs: Update CZO links from stream to channel in docs and comments. 2024-06-11 10:44:31 -07:00
configuring-python-bindings.md api_docs: List all Python bindings configuration options. 2024-02-23 09:43:57 -08:00
construct-narrow.md help: Clean up search by location documentation. 2025-08-12 15:26:12 -07:00
create-scheduled-message.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
create-stream.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
deploying-bots.md api_docs: Update instructions to deploy bots using Botserver. 2025-04-08 10:48:13 -07:00
group-setting-values.md api-docs: Fix incorrect field names for group-setting value objects. 2025-08-29 10:20:28 -07:00
http-headers.md rate_limit: Additionally limit to 2000 authenticated requests per hour. 2025-10-27 16:22:13 -07:00
incoming-webhooks-overview.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
incoming-webhooks-walkthrough.md integrations: Add URL option and UI for mapping messages to Zulip channels. 2025-08-07 17:19:03 -07:00
index.md web: Save a needless 301 redirect from /integrations to /integrations/. 2023-03-24 14:51:01 -07:00
installation-instructions.md api-docs: Use start_tabs formatting and add "Related articles". 2024-02-24 08:14:32 -08:00
integrations-overview.md help: Remove outdated "Set up integrations" page. 2025-11-03 15:54:45 -08:00
message-formatting.md api_docs: Describe how to recognize thumbails. 2025-10-23 14:16:00 -07:00
missing.md api-docs: Move markdown files to top level directory. 2023-02-02 17:25:40 -08:00
mobile-notifications.md push_notifications: Replace pm_users field with recipient_user_ids. 2025-11-04 12:21:40 -08:00
non-webhook-integrations.md api-docs: Use start_tabs formatting and add "Related articles". 2024-02-24 08:14:32 -08:00
outgoing-webhooks.md api_docs: Clarify Slack compatible webhook format. 2025-06-27 11:31:59 -07:00
real-time-events.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
rest-error-handling.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
rest.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
roles-and-permissions.md users: Return true for admins for is_moderator. 2025-04-22 11:24:49 -07:00
running-bots.md documentation: Add context properties for subdomain and host segments. 2025-06-20 16:04:26 -07:00
send-message.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
sidebar_index.md groups: Pass old setting value for can_mention_group. 2024-05-14 12:17:15 -07:00
writing-bots.md api_docs: Document the context manager for bot storage. 2025-02-24 17:10:39 -08:00