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

Commit 64a8fdb

Browse files
committed
finish section 6.4.1
1 parent 8f9738e commit 64a8fdb

File tree

1 file changed

+36
-5
lines changed
  • docs/Protocol Specifications

1 file changed

+36
-5
lines changed

docs/Protocol Specifications/core.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -902,11 +902,11 @@ After evicting a cached ID-Cert:
902902
#### 6.4.1 Verifying that a newly retrieved ID-Cert is not out-of-date
903903

904904
While the goal of achieving dynamic server load distribution to increase the viability of small,
905-
low-resource home servers is a noble one, this goal must not undermine P2s trust model, which other
906-
aspects of the protocol work very hard to uphold. Retrieving ID-Certs from a middleman introduces
907-
a new attack surface which must be mitigated. Consider the following example:
905+
low-resource home servers is a noble one, this goal must not undermine [P2s trust model](#2-trust-model),
906+
which other aspects of the protocol work very hard to uphold. Retrieving ID-Certs from a middleman
907+
introduces a new attack surface which must be mitigated. Consider the following example:
908908

909-
???+ example "Example attack abusing blind middleman trust"
909+
??? example "Example attack abusing blind middleman trust"
910910

911911
1. One of Alice's private identity keys is compromised.
912912
2. Malicious actor Eve logs onto a malicious Server X which is controlled by Eve, impersonating
@@ -923,7 +923,38 @@ a new attack surface which must be mitigated. Consider the following example:
923923
certificates). Until then, users do not notice that this certificate has been revoked and
924924
should no longer be valid.
925925

926-
This kind of attack has been considered and mitigated in polyproto. bla
926+
This kind of attack mentioned above has been considered and mitigated in polyproto. This mitigation
927+
is achieved through API behaviors enabling the fetching of actor ID-Certs with additional information
928+
attached to the response body. The additional information is structured as follows:
929+
930+
| Field name | JSON type | Actual type (if different from JSON type) | Description |
931+
| ------------------- | --------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
932+
| `cacheValidNotBefore` | String | Unsigned 64-bit integer | UNIX timestamp that specifies the time from which this cache entry may be treated as valid. |
933+
| `cacheValidNotAfter` | String | Unsigned 64-bit integer | UNIX timestamp that specifies a time until which this cache entry may be treated as valid. |
934+
| `cacheSignature` | String | - | Signature generated by the home server. This signature can be verified using the home servers' public identity key. |
935+
936+
A server generates the `cacheSignature` by concatenating the serial number of the ID-Cert in
937+
question with the `cacheValidNotBefore` timestamp and the `cacheValidNotAfter` timestamp, then
938+
generating the signature of the resulting, concatenated string using the private identity key of
939+
the server.
940+
941+
!!! warning
942+
943+
Concatenation operations are not commutative.
944+
945+
!!! quote "Definition: Concatenation"
946+
947+
> In formal language theory and computer programming, string concatenation is the operation of
948+
joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is
949+
"snowball".
950+
951+
*From Wikipedia, The Free Encyclopedia. [Source](https://en.wikipedia.org/w/index.php?title=Concatenation&oldid=1266032132#:~:text=In%20formal%20language,a%20primitive%20notion.)*
952+
953+
Because digital signatures rely on asymmetric key cryptography, possession of this server's public
954+
identity key allows an actor to validate that a cached ID-Cert is both genuine and up-to-date.
955+
956+
This technique remedies the possibility of caching introducing an additional attack vector, allowing
957+
caching to be used without conflicting with the [trust model](#2-trust-model) of polyproto.
927958

928959
### 6.5 Cryptographic recommendations
929960

0 commit comments

Comments
 (0)