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

Commit e1b6f4a

Browse files
committed
include invalidatedAt in cache signature, clarify correct ordering of concatentations
1 parent 177e326 commit e1b6f4a

File tree

1 file changed

+21
-9
lines changed
  • docs/Protocol Specifications

1 file changed

+21
-9
lines changed

docs/Protocol Specifications/core.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,19 +1619,31 @@ This kind of attack mentioned above has been considered and mitigated in polypro
16191619
is achieved through API behaviors enabling the fetching of actor ID-Certs with additional information
16201620
attached to the response body. The additional information is structured as follows:
16211621

1622-
| Field name | JSON type | Actual type (if different from JSON type) | Description |
1623-
| --------------------- | --------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
1624-
| `cacheValidNotBefore` | String | Unsigned 64-bit integer | UNIX timestamp that specifies the time from which this cache entry may be treated as valid. |
1625-
| `cacheValidNotAfter` | String | Unsigned 64-bit integer | UNIX timestamp that specifies a time until which this cache entry may be treated as valid. |
1626-
| `cacheSignature` | String | - | Signature generated by the home server. This signature can be verified using the home servers' public identity key. |
1622+
| Field name | JSON type | Actual type (if different from JSON type) | Description |
1623+
| --------------------- | --------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1624+
| `cacheValidNotBefore` | String | Unsigned 64-bit integer | UNIX timestamp that specifies the time from which this cache entry may be treated as valid. |
1625+
| `cacheValidNotAfter` | String | Unsigned 64-bit integer | UNIX timestamp that specifies a time until which this cache entry may be treated as valid. |
1626+
| `cacheSignature` | String | - | Signature generated by the home server. This signature can be verified using the home servers' public identity key. |
1627+
| `invalidatedAt` | String? | Unsigned 64-bit integer | If present, represents a UNIX timestamp at which the certificate was [invalidated](#614-early-revocation-of-id-certs) on. Certificate was not prematurely invalidated if not present. |
16271628

16281629
A server generates the `cacheSignature` by concatenating the serial number of the ID-Cert in
1629-
question with the `cacheValidNotBefore` timestamp and the `cacheValidNotAfter` timestamp, then
1630-
generating the signature of the resulting concatenated string using the private identity key of
1631-
the server. Clients must reject certificates of which the `cacheSignature` can not be verified to be
1630+
question with the `cacheValidNotBefore` timestamp, the `cacheValidNotAfter` timestamp, and the `invalidatedAt`
1631+
timestamp, if present.
1632+
1633+
!!! warning
1634+
1635+
The order in which the concatenation operations are executed is important and must be adhered
1636+
to. The order is as follows:
1637+
1638+
`cacheSignature ⋅ cacheValidNotBefore ⋅ cacheValidNotAfter ⋅ (invalidatedAt|"")¹`
1639+
1640+
¹: The value of invalidatedAt, if present; otherwise, an empty string.
1641+
1642+
The resulting string is signed using the home servers private identity key.
1643+
Clients must reject certificates of which the `cacheSignature` can not be verified to be
16321644
correct.
16331645

1634-
!!! note "Note/Fun fact"
1646+
??? note "Note/Fun fact"
16351647

16361648
Note how the cache validity period is determined by the "original" home server and automatically
16371649
propagated through—and respected by—every server and client caching the certificate. If another

0 commit comments

Comments
 (0)