From aedc60f1ccb4f9898123d150662c058ac14ff61f Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 22 Mar 2026 06:01:49 +0100 Subject: [PATCH] docs: document Header Confidentiality Policy --- spec.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/spec.md b/spec.md index 995cd3027..dca312387 100644 --- a/spec.md +++ b/spec.md @@ -39,9 +39,24 @@ Messages SHOULD be encrypted by the [Autocrypt](https://autocrypt.org/level1.html) standard; `prefer-encrypt=mutual` MAY be set by default. -Meta data (at least the subject and all chat-headers) SHOULD be encrypted -by the [Protected Headers](https://tools.ietf.org/id/draft-autocrypt-lamps-protected-headers-02.html) standard. - +Meta data SHOULD be encrypted +by the [Header Protection](https://www.rfc-editor.org/rfc/rfc9788.html) standard +with the following [Header Confidentiality Policy](https://www.rfc-editor.org/rfc/rfc9788.html#name-header-confidentiality-poli): +``` +hcp_chat(name, val_in) → val_out: + if lower(name) is 'from': + assert that val_in is an RFC 5322 mailbox + return the RFC 5322 addr-spec part of val_in + else if lower(name) is 'to': + return '"hidden-recipients": ;' + else if lower(name) is 'date': + return the UTC form of a random date within the last 7 days + else if lower(name) is 'subject': + return '[...]' + else if lower(name) is in ['message-id', 'chat-is-post-message']: + return val_in + return null +``` # Outgoing messages