Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 2562007

Browse files
committed
Re-word some minor sections, complete some TODOs
1 parent f094597 commit 2562007

File tree

1 file changed

+37
-16
lines changed
  • docs/Protocol Specifications

1 file changed

+37
-16
lines changed

docs/Protocol Specifications/core.md

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,11 @@ of the key change, it must be informed of the change upon reconnection.
595595
polyproto does not require the use of CRLs or OCSP.
596596

597597
An ID-Cert can be revoked by the home server or the actor at any time. This can be done for various
598-
reasons, such as a suspected leak of the private identity key.
598+
reasons, such as
599+
600+
- a suspected leak of the private identity key
601+
- the changing of an actors' federation identifier.
602+
- keeping the number of ID-Certs associated with an actor within a desired boundary
599603

600604
When an ID-Cert is revoked, the server must revoke the session associated with the revoked ID-Cert.
601605
Revoking an ID-Cert is considered a [sensitive action](#412-sensitive-actions) and therefore should
@@ -610,10 +614,6 @@ require a second factor of authentication.
610614

611615
For information on how revocation detection is supposed to be handled, concern [section 6.4](#64-caching-of-id-certs)
612616

613-
TODO: Write about identifier changing and how to handle that across servers
614-
TODO: Perhaps recommend never using more than a specified number of certificates at once to make
615-
re-signing easier
616-
617617
### 6.2 Actor identity keys and message signing
618618

619619
As briefly mentioned section [#4](#4-federated-identity), users must hold on to an identity key pair
@@ -706,15 +706,17 @@ clients. If a P2 extension does not explicitly allow for this, both servers and
706706
reject such messages. Clients receiving unexpected external messages should inform the actor about
707707
the fact that a server has tried to send them an invalid, possibly malicious message.
708708

709+
TODO Make APIs for this or remove this paragraph ^
710+
709711
Before a polyproto server forwards such a message to clients, it must add an "external" property to
710712
the message object. If possible in the data format used, this property should be set to a boolean
711-
value of `true`. If the data format does not support boolean values, the property should be set to
712-
a string value of `true` in all lowercase characters. This property must be passed along to the
713-
client or clients receiving the message.
713+
value of `true`, or some other value that can be interpreted in an equivalent manner.
714+
This property must be passed along to the client or clients receiving the message.
714715

715-
If the actor receiving this external message is human, the client must inform the actor that the
716-
message is external, and that the message has not been signed by the sender. External messages
717-
should be distinguishable from signed messages at first glance.
716+
If the actor receiving this external message is human or otherwise sentient, the client application
717+
should inform the actor that the message is external, and that the message has not been signed by
718+
the sender. External messages should be distinguishable from signed messages at first glance, especially
719+
when viewed through a client application.
718720

719721
### 6.3 Private key loss prevention and private key recovery
720722

@@ -730,18 +732,37 @@ All encryption and decryption operations must be done client-side.
730732
If any uncertainty about the availability of the home server exists, clients should regularly
731733
download their encrypted private identity keys from the server and store them in a secure location.
732734
Ideally, each client should immediately download their encrypted private identity keys from the
733-
server after connecting. Clients should never store key backups in an unencrypted manner.
735+
server after connecting. Clients must never store key backups in an unencrypted manner.
734736

735737
Whether an actor uploads their encrypted private identity keys to the server is their own choice.
736738
It is also recommended backing up the encrypted private identity keys in some other secure location.
737739

738740
The APIs for managing encrypted private identity keys are documented in the
739741
[API documentation](https://apidocs.polyproto.org).
740742

741-
- [Upload encrypted private key material](/APIs/Core/Routes%3A Registration needed/#post-upload-encrypted-private-key-material)
742-
- [Get encrypted private key material](/APIs/Core/Routes%3A Registration needed/#get-get-encrypted-private-key-material)
743-
- [Delete encrypted private key material](/APIs/Core/Routes%3A Registration needed/#delete-delete-encrypted-private-key-material)
744-
- [Get encrypted private key material upload size limit](/APIs/Core/Routes%3A Registration needed/#options-get-encrypted-private-key-material-upload-size-limit)
743+
!!! tip
744+
745+
Actors can make use of the [migration APIs](#7-migrations) to reduce the number of ID-Certs/keys
746+
that they must hold on to, to migrate their account in the future.
747+
748+
For example: If an actor currently has messages signed with 20 different ID-Certs, but only uses
749+
2 clients (meaning that the actor always needs two active ID-Certs - one for each client),
750+
the 18 outdated/unused ID-Certs could be consolidated into one ID-Cert through [re-signing the messages](#72-re-signing-messages)
751+
made with the outdated ID-Certs with any other ID-Cert.
752+
753+
!!! warning
754+
755+
This drastically reduces the number of ID-Certs the actor needs to keep track of and hold on
756+
to, which may make re-signing messages in the future easier.
757+
758+
However, doing this also introduces additional risks, as the overwhelming majority of the
759+
actors' message history is now associated with one ID-Cert. **An accidental leak of the
760+
private identity key of that ID-Cert could likely not be recovered from**, since all associated
761+
messages are potentially under control by those who know the private identity key.
762+
763+
Actors and polyproto software developers must keep this information in mind, should
764+
consider whether the risks and benefits of this strategy are worth it for their usecase and
765+
can introduce additional strategies to manage the number of "relevant" private keys safely.
745766

746767
### 6.4 Caching of ID-Certs
747768

0 commit comments

Comments
 (0)