Abstract
Threshold custody stores the session state of medical messaging, or a key that wraps it, as shares at independent relays, so that a seized device can be revoked. A mixed-integer program chooses the stored representation, holder set, threshold and generation lifetime under budgets on relay-side exposure, seizure exposure, undetected rollback, recovery and installation. On 200 traces of four illustrative clinical profiles, a wrapping key rotated at every state change, which detects rollback as direct sharing does, needs 1.3 to 2.1 times less write traffic than direct state sharing. A periodically rotated key needs far less but detects no rollback, which is admissible only where no older state can be resumed. Version anchors never saved a write. Product choices dominate seizure exposure. An application that keeps its state in memory is exposed almost like local storage (0.572 against 0.632). With eviction after use and a mean revocation delay of one day, a threshold reaches 0.032, against 0.043 for one revocable server, at a yearly probability of a metadata breach of 0.46 instead of 0.12. Compromises of all operators more often than 0.0069 per year defeat every policy. Placement is demonstrated on one night of measurements.
1. Introduction
Secure messaging between patients and clinicians is now a routine part of clinical work. Across 366 United States health systems, patient messages rose to 157% of the pre-pandemic average [1], and in one academic health system, the 5% most active patients sent 52.8% of all messages [2]. Clinicians widely use instant messaging, including messengers that encrypt end-to-end [3,4], and remote patient monitoring adds device traffic on schedules set by care plans [5]. End-to-end encrypted protocols protect these messages in transit. Every endpoint, however, keeps the cryptographic session state that it needs to read later messages: ratchet keys, chain keys and the keys of messages that arrived out of order [6,7,8]. A copy of that state taken from a lost or seized device can decrypt the traffic that the device itself would still be able to read [9,10]. Health data protection law requires such data to remain both confidential and available [11,12].
Device keystores protect local state against an adversary who can copy files but cannot use the keystore. They do not protect a seized device whose keystore is eventually broken, and they give the organization no way to withdraw access once a loss is reported. Threshold custody adds a remote factor that can be revoked. The endpoint stores shares of its state, or of a key that protects a local copy of the state, at n relays, any t of which return the shares needed for recovery [13,14], and after revocation, the relays refuse further requests. The same idea underlies networked devices that resist capture [15] and the backup services of Signal, Juicebox and WhatsApp [16,17,18]. The remote factor has a price. Relays can be compromised, so custody adds an exposure path that local storage does not have, and the device depends on the relays to open its own state. Session state also changes with every message, so a design that shares the state itself creates a new generation of shares at each change, and an attacker can accumulate shares of old generations over time [19,20].
We treat the configuration of a custody tier as a risk-constrained design problem. A policy chooses what to store remotely, where to place the shares, the threshold and the maximum age of a generation, and it should use as little custody traffic as possible. The exposure that custody adds, the exposure of a seized device and the probability of an undetected rollback must stay below budgets, and recovery and installation must succeed with required probabilities. We ask four questions. RQ1: How should the added exposure be bounded when compromises last for weeks, as incident data indicate [21]? RQ2: Which representation should a medical messaging deployment store remotely when the options are compared at equal guarantees, including rollback detection? RQ3: What does a threshold buy over a single revocable server once the lifecycle of the application, the reads, the waits and the relay metadata are counted? RQ4: When does an exact joint recovery constraint change the design, and what can one measurement campaign support?
Our contributions are as follows.
- (1)
- An exposure model with compromise episodes of random dwell time, built from known tools. A classical property of Poisson processes (Lemma 2) gives exact generating functions for one generation and for consecutive generations, and a certificate combines a Hunter tree bound with horizon-window bounds (Theorem 1). To this we add the exposure after a seizure, a deterministic requirement against the compromise of one operator, and upper and lower bounds on the expected number of messages whose keys can be derived from an exposed generation.
- (2)
- An exact formulation of the joint constraints for snapshot recovery and horizon exposure over relay sets. Response times are taken jointly from measurement rounds, variables are aggregated over age caps, and we apply dominance pruning that remains valid. We verify the formulation against exhaustive search. For representations that store several objects at shared holders, it avoids counting one failure event once per object. For a single object, such as a wrapping key, it reduces to one k-of-n constraint. On the nine-relay topology with equal declared rates, an enumeration of uniform policies reaches the same optimum on every trace, and the 17% saving over additive bounds concerns only direct sharing. The formulation changes the design on heterogeneous instances. With relay-specific rates and several sessions, the joint optimum is cheaper than the best uniform policy in 16 of 19 instances, and the additive constraint is infeasible in all of them (Section 3.7). We also test, out of sample in time, the pooled estimate and a robust variant defined over time windows of the measurements.
- (3)
- A comparison of representations at equal guarantees. Undetected rollback is budgeted with the same as exposure, so that direct sharing is compared with a wrapping key that rotates at every state change, and the larger saving of a periodically rotated key is stated together with the adversary under which it is admissible. The comparison uses dwell times derived from incident data and Double Ratchet traces of four illustrative clinical messaging profiles, and it is repeated for denser traffic, larger states, several sessions and an abstraction of group messaging. We also evaluate the costs that the objective does not contain (reads, retransmissions, blocked updates, unlock waits and relay metadata), application lifecycle policies, compromises shared by several operators, delayed deletion and state loss.
- (4)
- A demonstration of placement on one night of measurements. The campaign comprises 470 rounds of cold and warm HTTPS requests from a laptop in Astana, Kazakhstan, to 19 object storage endpoints of 9 operators, of which the base topology uses 9 EU-located relays of 7 operators. We compare against a reliability-ordered heuristic, additive constraints, keystore-only storage and a single revocable server. These network results describe one campaign. They show how the method is applied and are not claims about the relays.
Related Work
Secure messaging. The Double Ratchet derives a fresh key for every message and a fresh Diffie-Hellman ratchet key whenever the speaker changes [6], and its security has been defined and proved in several models [7,22,23,24]. Post-compromise security [25] and clone detection [10] limit what a copied state can do once the legitimate endpoint continues. They do not protect state that an attacker takes from a stopped or seized device, which is the case we consider. Keystores protect local data until the passcode or a keystore exploit becomes available [9]. MLS extends the problem to groups [26], which we treat only through an abstraction of group state. Server-side storage of encrypted message history [27] keeps message content recoverable across devices but does not address the session state of a seized device.
Capture resilience and threshold custody. Networked cryptographic devices keep a device key usable only with the help of a server that can be told to stop helping [15]. Keypad keeps file keys on a remote service so that the use of a stolen device’s files can be audited and disabled [28]. CleanOS evicts the keys of idle applications to the cloud and fetches them on use [29], and Sentry protects such material in the memory of a locked device [30]; we adopt this eviction model. All of these rely on one remote service, whereas we ask what to store and what a threshold across operators adds. Shamir sharing hides the secret below the threshold [13]. The mobile adversary corrupts different parties over time [19], and proactive and dynamic-committee schemes renew shares against it [20,31]. In our setting, the dealer is the endpoint itself, so renewal is trivial, and the open questions are what to store, how long generations live and where shares go.
Backup, deletion and rollback. Encrypted-backup systems protect a single long-lived recovery key with hardware security modules, enclaves or guess-limited protocols [16,17,18,32], and they do not choose placement under correlated failures. The Ephemerizer and Vanish delete data by deleting keys held by third parties [33,34], and sharing only a short key reduces share size [35]. Our KEY representation applies this idea to session state, and we decide between it and direct sharing at equal guarantees. Protection against rollback needs state outside the protected component, kept in non-volatile counters or replicated over a quorum [36,37]; KEY+A applies the quorum idea to custodied state. Correlated failures dominate data loss in storage systems [38,39], secure deletion is hard in practice [40], and crash consistency depends on careful use of file-system primitives [41].
Chance-constrained optimization. Joint chance constraints [42] are commonly replaced by Bonferroni or convex approximations [43] or by sampled scenarios [44,45], and the union bound can be tightened by the tree bound of Hunter [46]. We enumerate relay states exactly, but the response times come from a finite sample of dependent measurement rounds. Distributionally robust and scenario guarantees [47,48] assume independent samples, and block resampling [49] cannot support a budget of 1% with a few dozen blocks. We therefore estimate recovery on all rounds without claiming a guarantee and test the estimate out of sample. Table A3 compares the closest approaches.
2. Materials and Methods
2.1. System, Protected Objects and Representations
Figure 1 shows the deployment, and Table A1 lists the notation. Each endpoint (a patient application, a clinician application or a monitoring gateway) runs its own custody instance. Relays are operated by independent organizations, which we call operators. Relays that belong to the same operator share administration, credentials and software, so they fail together and are compromised together. In a hospital deployment, the operators could be the provider’s own data center, an electronic health record vendor, a regional health information exchange and a public cloud. Clinical records, consent and emergency access to records stay in the clinical record system.
Figure 1.
Deployment and threat model. Arrows: green, encrypted message transport between the endpoints; solid blue, writes of the shares to all holders; dashed blue, reads from any t holders at recovery; dotted black, the policy that is computed offline and given to the endpoint; dotted blue, the custody instance of the clinical endpoint. Each endpoint runs its own custody instance; relays are grouped by operator, which defines the correlated failure and compromise domains. Threats in the model: (i) endpoint files are copied repeatedly; (ii) the locked device is seized, and its keystore is broken, after a random time; (iii) a relay or (iv) a whole operator is compromised for an episode of random dwell time; in addition, relays suffer outages and slow responses. The relays are those of the base topology; rollback of the local state, capability (v), is not drawn and is detected at recovery (Section 2.2). The clinical endpoint runs its own custody instance against the same or other relays (dotted blue).
In our implementation, the state of a Double Ratchet session consists of three segments. The ratchet segment takes 174 bytes with the hybrid key exchange, and the chain segment takes 84 bytes. The skipped-key segment takes 107 bytes with one stored key; its size grows with the number of stored keys, which Section 3.7 varies. While the application runs, including in the background, it holds the state (or the key that protects it) in memory, so that it can process messages that arrive while the device is locked. The material is evicted when the application is terminated, at shutdown or restart, and at revocation. The first use after an eviction fetches t shares of every custodied object. We call such a fetch an unlock, and The clinical profiles of Section 2.7 declare how many unlocks occur. A monitoring gateway has no user and evicts at its daily restart. Age caps and periodic rotation act on the material in memory and need no extra reads. As a result, whether the material is in memory when a device is seized depends on whether the application was running. Section 3.4 treats the probability that it is resident as a declared input. We compare five representations.
SEG shares each segment separately. For every new generation of a segment, the endpoint draws a fresh mask C, stores it locally and Shamir-shares S XOR C. The C# prototype uses this representation.
WHOLE shares the 365-byte concatenated state in the same way. Every change to any segment therefore creates a generation.
KEY encrypts the state locally with authenticated encryption under a 32-byte wrapping key and shares a masked form of that key. The local ciphertext changes with every message. The key is rotated in one of two ways: periodically, when its maximum age expires, or at the first state change that occurs at least minutes after the previous rotation. Setting rotates the key at every change. Rotation at state changes writes to the relays while messages are being processed, and so it reveals message timing to them. The same key can also wrap the local message store without additional custody traffic, which no representation that shares the state itself can do.
KEY+A adds a 32-byte version anchor at each state change at which the key does not rotate. With these anchors, recovery can detect a rollback of the local ciphertext to an older snapshot [37]. The anchor is sent to every key holder, and the change proceeds once q acknowledgments have arrived. Section 2.2 specifies q.
LOCAL keeps the state under a keystore-protected key and uses no relays.
With SEG, the remote representation stays information-theoretically hidden, even from an adversary who could break the authenticated encryption that KEY uses [50]. However, the state itself contains keys that protect computationally secure messages, so this property does not strengthen the end-to-end guarantee. We report it but give it no value in the optimization. As for the record format, each record carries a 117-byte envelope made up of a 16-byte client identifier, an 8-byte object identifier, two 8-byte versions, the 1-byte share index, a 64-byte Ed25519 signature and 12 bytes of framing.
2.2. Threat Model and Security Goals
The endpoint authenticates to relays with a signing key that is generated inside the device keystore [51]. This key cannot be exported and can be used only on the device. We consider five adversary capabilities. (i) Repeated copy: the adversary obtains copies of the endpoint’s files, including masks and local ciphertexts, at any time, but cannot use the keystore. (ii) Seizure: the adversary obtains the locked device once, at an unknown time, and breaks its keystore after a random time B. The organization revokes the enrollment after a random delay R, and from then on relays refuse requests. (iii) Relay compromise: the adversary compromises a relay for an episode of random length and reads every share that the relay stores. (iv) Operator compromise: a single episode reaches all relays of one operator. (v) Rollback: the adversary replaces the local ciphertext with an older one and controls at most of the holders when the endpoint recovers. In every case, the adversary keeps everything it reads and sees all public metadata. It does not control the live, unlocked application. An attacker that runs code there reads the state directly, and custody cannot help against it.
These capabilities let us separate what custody gives from what it costs. Against (i) alone, LOCAL is never exposed, because the copied files are useless without the keystore. Custody, in contrast, stores masks or local ciphertexts outside the keystore, so (i) combined with (iii) or (iv) exposes it. This is the exposure that custody adds, and the repeated-copy certificate below is its price, budgeted by . Suppose instead that the local material is itself wrapped under a keystore key, a design we call keystore-bound custody. Then, (i) alone exposes nothing, and only exposures that follow a keystore break remain. The certificate then applies where the local material cannot be bound to a hardware keystore, for example, on devices that lack one, or where application data leave the device in backups that exclude keystore keys.
A seized device on which the application is still running holds the material in memory. Reading it from a locked device needs an exploit comparable to a keystore break [30], so we charge it like one. With probability , the material is resident at the seizure, and it is then exposed like LOCAL material, because revocation cannot evict it from a device that is offline. Against (ii), LOCAL is exposed whenever the keystore falls within the horizon. Custody is exposed in two cases. In the first, the keystore falls before revocation (), and the adversary can then fetch shares just as the endpoint would. In the second, the keystore falls later, and the adversary obtains the shares of the seized generation through relay compromise. This revocation race is the benefit of custody. Any revocable remote factor provides it, including a single server [15], and Section 3.4 shows what a threshold adds.
A generation g of object is exposed when the adversary holds at least t of its share indices together with the local material of the same generation. Up to f, further indices per generation may be obtainable outside the modeled episodes, for example, from backups or from storage that was not completely deleted [40]. We charge these indices against the threshold, so the modeled event is that at least indices are read. We use three exposure measures. The repeated-copy certificate bounds the probability that any generation of any object is exposed within the horizon T (budget ). The seizure exposure bounds the probability that the state current at a uniformly random seizure time is exposed through relay compromise after the keystore falls (budget ). The expected number of exposed messages measures how much an exposure reveals (optional budget ). This last measure assumes that the adversary also holds the ciphertexts, for example, from the messaging server.
A message is exposed if its key can be derived from some exposed generation. For every message and every object, we determine the interval of snapshot times from which the message key is derivable. For the chain segment, this is a snapshot taken after the ratchet step that opened the current chain and before the message. For the ratchet segment, it is a snapshot taken between the previous and the opening ratchet step, because its root key and own ratchet key derive the whole receiving chain of the opened peer turn. For the skipped-key segment, it is a snapshot taken while the key of a late message is stored. WHOLE and KEY derive a message from any snapshot in the union of these intervals. The generations of one object whose primary intervals meet the interval form a path. Hunter’s inequality therefore bounds the probability that one of them is exposed, and the horizon bound and the value 1 cap it. Summing over messages and objects gives, for each candidate, an upper bound that enters the synthesis problem of Section 2.6 linearly. For a selected policy, the largest exposure probability of a single such generation, taken over objects, gives a lower bound. We compare representations at equal upper bounds and report the lower bounds to show how tight the comparison is.
We now turn to capability (v). Consider a representation that writes every new version to all holders and waits for all acknowledgments. It detects a rollback whenever one honest holder responds, because that holder returns an authenticated version newer than the local material. SEG, WHOLE and KEY with rotation at every state change () have this property. KEY with periodic or delayed rotation, however, has no version information for the changes between rotations. KEY+A restores this information with anchors. Each anchor carries the device signature and is sent to all key holders, and a state change is released only after acknowledgments. Any t responders then include at least holders of the newest anchor, one of which is honest, and recovery accepts the highest authenticated version it sees. An undetected rollback is a confidentiality failure and not only a loss of freshness. An endpoint that resumes from an older Double Ratchet state derives again the message keys it has already used and encrypts new plaintexts under them. For this reason, the local authenticated encryption of KEY must not take its nonces from the state that can be rolled back. We assume random 96-bit nonces drawn by the device, or a nonce-misuse-resistant scheme [52]. A rollback goes undetected only if all newest-anchor holders among the responders are compromised. Section 3.3 evaluates this probability under the rollback budget defined next.
We make rollback a requirement of the synthesis. Let c be the number of responders that must all return stale material for a rollback to pass. For a representation that writes every version to all holders, . For a change protected by an anchor, . For KEY between rotations without anchors, , because nothing detects the rollback. We bound the probability of an undetected rollback by the probability that at least c holders of the policy are inside a compromise episode. At a random recovery time, this is the stationary occupancy of the episode process. An adversary who controls the local files can choose the time, and against such an adversary we use the probability that at least c holders meet an episode anywhere in the horizon window, which is an upper bound. Both probabilities follow from the generating function of Lemma 2. The synthesis budgets the second, larger one with , summed over objects. KEY with periodic or delayed rotation and no anchors cannot meet any such budget. It is admissible only where no older local state can ever be resumed. The adversary must be unable to write the endpoint’s files (capability (i) only), and benign rollbacks must be excluded as well, such as the restore of a device backup, a migration or an image restore, since any of them makes the endpoint reuse message keys. The alternative is a hardware monotonic counter that the device increments at every state change. We state this condition wherever we report results for periodic KEY. In our instances, the rollback budget never changes a selected policy, so it acts as a filter that admits only designs that detect rollback.
Remark 1
(Cumulative knowledge). The set of indices of a generation known to the adversary never shrinks, and an adversary that never controls more than one relay at a time can still collect t indices.
Lemma 1
(No combination across generations). Suppose every generation uses an independent mask and independent sharing polynomials. If for every generation the adversary holds fewer than t indices, the shares in its view are independent of all secrets, even when the masks are known, and the secrets of different generations are equal or related.
Proof.
For a fixed generation, fewer than t evaluations of a random polynomial of degree with a fixed constant term are uniformly distributed and independent of that constant term [13]. The polynomials of different generations are independent, so the joint distribution of all sub-threshold views is the product of uniform distributions whatever the constant terms are. Knowledge of the masks adds nothing, because each masked secret remains hidden. For KEY, the view also contains the local ciphertexts. This part of the statement is computational: since the shares are independent of the key, the ciphertexts are encryptions under a key the adversary has no information about, and their confidentiality and integrity reduce to those of the authenticated encryption scheme for the number of encryptions made under one key generation, at most a few thousand state changes within a 30-day lifetime in our profiles, for which random 96-bit nonces collide with negligible probability. The record envelopes (client and object identifiers, versions, timing) are outside the lemma; Appendix C treats them as metadata. □
Lemma 1 is what allows us to treat exposure as the union of events defined per generation.
2.3. Generations, Lifetimes and Publication
For each object, the policy subdivides the intervals between natural state changes at a maximum age . For KEY, the natural changes are the rotations. Generation g serves the primary interval of length . Its shares may exist from the start of preparation, at most before , where is the installation deadline. Relays apply a single deletion rule, which has two parts. First, the endpoint announces that a version of an object is current, using an authenticated message sent after promotion, and after this announcement the relays delete every older version of that object, including versions from failed attempts. Second, they delete any version after its scheduled expiry . Clock disagreement is bounded by at each end. In normal operation, the window in which shares of g may be read has the length given by Equation (1).
Publication requires acknowledgments from every holder in H before the new generation becomes current and before any ciphertext produced with the new state is released. Recovery, by contrast, needs any t holders. When an installation fails, the endpoint retries with a fresh generation. Promotion durably records the announcement of the new current generation together with the new Current. The endpoint repeats the announcement until every holder has acknowledged it, also after a crash (Appendix B). A holder that is down receives the announcement when it returns. A predecessor share can therefore outlive its window only by the length of that holder’s outage, which the windows of Theorem 1 do not charge; Appendix D bounds its effect. An online device refreshes every generation once half of its lifetime has passed, so that it loses its state only if one offline period exceeds the remaining lifetime (Appendix D). Generations then have an age of at most while the device is online, and a window can extend by up to while it is offline.
Proposition 1
(Retries). Charge a failed installation attempt as if every holder had stored its share. Then, the true exposure of the attempt and of all its retries is contained in the modeled event of the original attempt. Retries delay the announcement of the successor and extend the window of the predecessor by at most , which, with and s, is small against ω and is not modeled.
Proof.
A retry is prepared after the failed attempt started and serves the same primary interval with the same holder indices, and the announcement of the next promoted version deletes the failed attempt within ; an update that still fails after r retries keeps its attempts until the next promotion, which we neglect. A relay that holds a share of the retry also holds, in the charged model, a share of the original attempt over a larger window. Any episode that reads a holder during the retry window therefore reads the same holder during the original window, so the number of indices read for the attempt and its retries together cannot exceed the modeled count of the original attempt. A holder that did not store the failed attempt only reduces the true count. □
Proposition 2
(Publication). Suppose local updates are atomic and durable, counted relay acknowledgments are durable, version identifiers are never reused, recovery checks authenticate version and expiry metadata, and relays follow the deletion rule of Section 2.3. If ciphertext is released only after durable promotion, then (safety) no crash causes ciphertext produced from an unpromoted candidate to be released, and recovery either returns a complete unexpired snapshot or reports unavailability; (liveness) whenever t holders of every object of the promoted vector respond with unexpired shares, recovery returns that vector.
Appendix B gives the proof, which is an induction over the transitions of the Current and Pending transaction. Section 3.8 summarizes the crash experiments that exercise it.
2.4. Exposure with Compromise Episodes
We model compromise as a sequence of episodes. Episodes of relay i start as a Poisson process with rate and last for independent random dwell times with mean m. Episodes of operator d start with rate and have mean dwell . An episode reads every share whose window it intersects. We assume that the start processes are stationary, that is, that they have been running since before the horizon. Independence of the starts is a modeling assumption, and Section 3.1 tests it.
Lemma 2
(Episode counts). For a window of length ℓ, the number of episodes of relay i that intersect it is Poisson with mean . For two windows that overlap by , the number of episodes that intersect both is Poisson with mean , and the numbers that intersect only the first, only the second and both are independent. Both statements hold for every dwell distribution with finite mean m.
Proof.
This is the classical property of the infinite-server queue [53,54], applied to windows. Mark each episode with its start x and dwell D; the marked process is Poisson on the plane with intensity . An episode intersects a window if and , so the expected number is times the integral over of , which equals . For overlapping windows and with , an episode intersects both if and , which gives . The three classes are disjoint regions of the plane, so their counts are independent Poisson variables. For disjoint windows, the count of episodes reaching both depends on the full dwell law; consecutive generations always overlap, so this case does not arise. □
Consequently, relay i reads generation g with probability , and operator d reaches all of its holders with probability , as given in Equation (2). Here, is the number of holders of the object at operator d. The product over operators is the exact generating function of the number of distinct indices read, and its tail is the probability of the modeled event .
Consecutive generations require a joint treatment. For a generation g and its successor , the windows overlap by minus the gap between the two primary intervals. For every relay and operator, Lemma 2 gives the probabilities of reading only the first window, only the second, both or neither. We multiply the bivariate factors over the relays inside each operator and then mix over the four states of the operator. This yields the exact joint generating function of and the probability that both counts reach k.
Two further bounds use a single window. Every window of an object lies inside the horizon window of length , and reading is monotone in the window. The event that at least k holders of are read during the horizon window therefore contains every of that object. Its probability is the tail of Equation (2) at . For several objects, let S be the set of relays read during the horizon window. The event that some object has at least holders in S contains every exposure event of every object, and we compute its probability Z exactly by enumerating S. Because this event contains the event of every single object, for every .
Theorem 1
(Exposure certificate). Under the episode model, the probability that any generation of any object is exposed within the horizon is at most the certificate in Equation (3).
Proof.
For one object, the generations ordered in time form a path, which is a spanning tree of that object’s exposure events; Hunter’s inequality [46,55] bounds the probability of their union by the sum of the marginals minus the probabilities of the intersections along the path, and the marginal and pair probabilities are exact by Lemma 2. is the probability of an event that contains the same union, so the smaller of the two bounds is valid for the object. Boole’s inequality across objects gives the first term of the minimum, and Z bounds the union over all objects directly. The bound holds for every , since exposure requires at least modeled indices. □
The theorem combines known bounds. Its value is that each term is tight in a different regime. Under long dwell, consecutive events nearly coincide, and the horizon bounds are close to the truth, whereas the union bound counts the same long episode once for every generation. Under short dwell with frequent refresh, the Hunter term is far smaller than the horizon bounds, which ignore refresh. Appendix F shows which term binds in which regime.
Proposition 3
(Seizure exposure). Suppose the device is seized at a uniformly random time, and relays apply the deletion rule of Section 2.3 and, in the worst case, are never told to delete on revocation. Then, the probability that the generation current at the seizure time is exposed through relay compromise equals the tail of Equation (2) at , the same for every generation and independent of the trace.
Proof.
After a seizure, no successor generation is written, so no successor notice reaches the relays, and the shares of the current generation remain obtainable until after the scheduled expiry ; with preparation and clock error, the window has length , whatever the next change would have been. The tail is the same for all generations, so averaging over the seizure time does not change it. Summing over objects bounds the probability that any segment of the seized state is exposed. If relays delete on revocation, the window ends earlier, and the exposure can only decrease. □
The probabilistic certificate depends on rates that are hard to estimate. We therefore add a deterministic requirement that holds against any adversary limited to operators. For the set O of operators, no b operators, together with further relays and the f archived indices, may reach the threshold, as stated in Equation (4). The same requirement can be imposed for any other partition of the relays, for example, a partition by the jurisdictions that can compel their operators.
Proposition 4
(Operator budget). If Equation (4) holds, an adversary that compromises any b operators and relays at any times and obtains f further indices exposes no generation.
Proof.
The largest number of indices that such an adversary can hold for one generation is the left-hand side of Equation (4), which is below t. Lemma 1 rules out combining generations. □
The base requirement is and , which means that no single operator can reconstruct, even with f archived indices. No threshold below n protects against a compromise that reaches every relay at once, such as a vulnerability in relay software that all operators run. Suppose such shocks start at rate and have the same mean dwell m as other episodes. Then, by Lemma 2, every policy is exposed within the horizon with probability at least . Appendix E evaluates this floor.
2.5. Recovery, Installation and Reads
A relay responds within deadline D if its operator is reachable (probability ), the relay is available (probability ), and its response time is below D. Up and down states are independent across relays and operators; response times are not because a slow client network delays every relay at once. We take the response times from measured HTTPS request times to the relay’s service (Section 2.7). A recovery after an eviction has to open new connections, so it uses cold requests, which include name resolution and TCP and TLS setup. The response times of all relays are taken jointly from one measurement round. Each round r defines the set of relays that answered within D, and the responding set is the intersection of with the random set U of available relays. We enumerate the response sets together with their probabilities. A complete snapshot fails to be recovered within if some object has fewer holders among the responders than its threshold.
The base estimate gives every round the same weight ( in Equation (5)), and it does not give a statistical guarantee. The few hundred dependent rounds of one campaign cannot provide such a guarantee at a budget of 1%. Even with no failing round, a one-sided 95% bound for independent rounds needs about 300 rounds. The rounds of one evening, however, are strongly correlated, and a posterior over blocks of rounds is then decided by its prior rather than by the data. The measured rounds are also not stationary. Slow rounds cluster in time, so a policy can meet the pooled budget while failing far more often in one hour than in another.
For this reason, we also use a robust variant. We split the rounds into W consecutive windows with equal numbers of rounds and require the budget in every window; the ambiguity set of this constraint consists of the empirical distributions of the windows. Both rules reduce to counts. With rounds in window w, a policy may fail in at most rounds of the window, rounded down, and in fewer when relay and operator outages use part of the budget. On the pooled 470 rounds, this allows 4 failing rounds. With four windows of about 118 rounds, or about one hour each, it allows one per window. We test both rules out of sample (V4): a policy selected without one window, or without one half of the campaign, is evaluated on the held-out rounds. As further sensitivities, we treat the relays as independent and give each relay a conservative or plain empirical distribution of response times or a fitted log-normal distribution. For larger topologies, the enumeration keeps the most likely response sets and charges the remaining probability mass as failure.
The additive alternative sums the per-object failure probabilities. It is valid for any dependence, but it charges a failure event once per object when objects share holders. Installation is handled differently, because it must reach all holders of an object within its deadline. For each object, we bound the per-attempt failure probability by , which bounds the fraction of updates that need a retry and the delay added to the send path. A write on the send path finds an open connection only if the previous custody write was recent. Servers close idle connections, so a write that follows a gap longer than an idle time-out of 1 min must open a new connection, just as a recovery does. We therefore take from warm requests with deadline for writes that follow a shorter gap, and from cold requests with deadline 2 s for the others, weighting each by its share in the trace. Periodic key rotations are not on the send path, so we give them a background deadline of 5 s. Retries a few seconds apart run into the same relay or operator outage. For this reason, we report separately the expected number of updates blocked by an outage, which is the number of installations times the probability that some holder or its operator is down.
Every unlock is a recovery. An unlock reads t shares of every custodied object, so the read traffic per unlock is the sum over objects of , where is the object size, and e is the envelope. KEY+A also reads one anchor from each of the t responders. Reads depend on the thresholds and the number of objects, but not on lifetimes. We keep the write payload as the objective and report reads separately. For trace 1, adding reads to the objective lowers the total traffic of the equal-exposure KEY policy by 15% for the active patient and by 19% for consultation.
2.6. Policy Synthesis
A candidate c for object specifies , plus the rotation rule in the case of KEY, and induces generations. Its write payload is . This payload excludes acknowledgments, transport framing and retries, and we report the number of relay writes separately. For each candidate, we record the Hunter term , the horizon-window bound , the seizure exposure , the expected number of exposed messages , and the marginal recovery failure. We also record two indicator vectors over relay sets, namely the recovery failure and the horizon exposure .
The synthesis problem is Equation (6). Both indicators depend on c only through , so the exact constraints use variables , which are the sums of over the age caps and rotation rules of each holder set and threshold. A binary variable w selects which of the two terms of the certificate in Equation (3) must meet , with . Some candidates can be discarded before solving. If the own term of a candidate exceeds , then makes the policy infeasible under either branch.
Proposition 5
(Exact linearization). For binary x, the constraints on y are satisfiable with a total of at most if and only if the exact joint failure probability of the selected candidates is at most , and the same holds for z and the joint horizon bound.
Proof.
This is the standard epigraph formulation of a maximum over finitely many scenarios [45,56]. Exactly one candidate per object is selected, so the constraints force , the failure indicator of the snapshot, and setting to that indicator minimizes the left-hand side of the recovery constraint, which then equals Equation (5). The argument for z is identical. □
Proposition 6
(Dominance). Within one object, a candidate can be removed if another candidate has no larger payload, certificate terms, seizure exposure, expected exposed messages and , and failure and horizon indicator sets contained in its own. With the additive recovery constraint, set inclusion for φ is replaced by the marginal failure probability. Removal does not change the optimal value.
Proof.
Replacing the removed candidate by its dominating candidate in any feasible policy keeps one candidate per object, does not increase any additive coefficient and can only shrink the relay sets on which the indicators equal one. □
Proposition 7
(Bounded uncertainty). Fix the operator partition, the deadlines π, and , the traces and a family of dwell laws closed under scaling, and assume that at every point of a box the dwell law is the corner’s law scaled to the point’s mean. Suppose the episode rates, the mean dwell times, the unavailability probabilities, the response-time scale and the retention lie in the box. Then, at every point of the box, the true probability of exposure, the seizure exposure, the expected number of exposed messages and the recovery and installation failure probabilities are at most the corresponding probability at the corner with the largest values, and the exposure probability is at most the corner’s certificate.
Proof.
Couple every point of the box with the corner. Thin the corner’s episode starts to obtain the starts at a lower rate, and scale each dwell time by the ratio of the means, which, by assumption, yields the point’s dwell law. Every episode at the inner point then lies inside an episode at the corner, so every read at the inner point is also a read at the corner, and every exposure event, a monotone event in the reads, has no larger probability. The true exposure probability at the corner is at most its certificate by Theorem 1. Larger unavailability and slower responses can only remove timely responders under a common uniform coupling. The certificate itself, being a difference of probabilities, need not be monotone; the statement is therefore made for the true probabilities. The deadlines must be held fixed because enters exposure and installation with opposite signs. □
Algorithm 1 summarizes the method. We solve Equation (6) with the HiGHS solver [57] through SciPy [58] (version 1.17.1, under Python 3.11.9) with zero relative gap. A second stage then fixes the optimal payload and minimizes the summed normalized budget use, with ties broken by the solver. This stage reduces the dependence of the reported coefficients on tie-breaking but does not remove it. It must also solve to optimality, or else the run stops. Finally, we check the selected policy against the unscaled constraints. With nine relays, only a few candidates per segment meet every budget on their own. On the base topology with equal declared rates, the best uniform policy, found by enumeration, reached the same payload as the MILP on every trace (Section 3.2). The MILP changes the design where several objects share holders and objects or relays differ (Section 3.7). For KEY, which has a single object, the joint and additive recovery constraints coincide.
| Algorithm 1 Custody Policy Synthesis |
|
2.7. Inputs
Latency. We measured HTTPS request times from a laptop in Astana, Kazakhstan, to 19 object storage endpoints of 9 operators (Table 1). The campaign ran from 22:31 on 21 October to 03:06 on 22 October 2026 (local time). A script in the browser pane of the Claude desktop application measured the endpoints every 30 s in two waves, since a recovery contacts one holder set at a time. The first wave queried the 9 relays of the base topology in parallel, and the second wave queried the other endpoints in parallel. For every endpoint, the script first sent a cold request to a fresh random host name under the endpoint’s domain. Such a request forces a new name resolution and new TCP and TLS connections, as after an application restart. The script then sent a warm request over the same connection, as on the send path of a running application.
Table 1.
HTTPS request times measured from Astana, Kazakhstan, from 22:31 on 21 October to 03:06 on 22 October 2026 local time (470 rounds; time-outs of 5 s counted as infinite in the percentiles; the time-out column counts cold requests), with a cold request to a fresh host name under the endpoint and a warm request on the same connection, and the probability that a relay does not respond within the recovery deadline (2 s, cold) and the installation deadline (1 s, warm), including relay unavailability. R1 to R9 form the base topology.
The times of this campaign are script-level times. The script called fetch() in no-cors mode and read performance.now() before the call and when the returned promise resolved, which happens when the response headers have arrived. It did not use the Resource Timing interface, whose phase details are withheld for cross-origin responses that carry no Timing-Allow-Origin header. The campaign therefore has no separate times for name resolution, TCP connection and TLS handshake, and every value includes the scheduling and queueing of the browser itself, with nine or ten requests issued in parallel to distinct hosts. The warm request was a second fetch() to the same host name, issued as soon as the first had resolved. We did not verify that it reused the connection. Reuse is the expected behavior of the browser’s connection pool, and the only evidence for it is indirect: warm times are far below cold times (Table 1). The requests were unauthenticated reads of non-existent buckets, so the service time of authenticated durable writes remains an assumption for this campaign (Appendix E varies it between 20 and 100 ms). The supplementary package contains a native probe designed to remove these limits. It times name resolution, connection, handshake, time to first byte and complete response separately, confirms reuse by the socket that carried the response, and issues signed PUT, GET and DELETE requests of 64 B, 4 kB and 64 kB objects with a check of the stored checksum. We used it, without credentials, for a second campaign (Section 3.2).
Second campaign. For the revision, the probe ran for 2.0 days (13 November 2026 to 15 November 2026; planned for seven days and stopped early) on a server in a data center in Astana, with fixed host names, the operating-system resolver and one round every 2 min, which gave 1292 usable rounds. In each round it sent to all 19 endpoints a cold GET on a new connection and a GET after 30 s of idle time on the kept connection, and it recorded whether the connection was reused. The requests stayed unauthenticated, because we had no storage credentials. The egress of this site drops a large share of TCP SYN segments and DNS queries to every external address, public resolvers included, while established connections showed no loss. A lost SYN costs 3 s in the Windows TCP stack, so the raw connect times describe the site and not the relays. The probe therefore repeated a failed connect or name lookup on a new socket. In the conversion, the connect phase of every request whose SYN was retransmitted (43% of the new connections to the base relays) was replaced by the TLS 1.3 handshake time of the same connection, which takes one round trip on the same path. On 9434 connections without loss, the handshake took 6 ms longer than the connect at the median and 17 ms at the 95th percentile, so the substitution errs on the slow side. Name lookups of 0.9 s or more (0.5%) were replaced by the median lookup time of the same name. Rounds in which some base relay could not be reached by any attempt were excluded (125 of 1417), and every failure after the connection was open counts as a failure of the relay. The client is a host in a data center, not a patient or clinician network.
Some rounds needed special treatment. The first three rounds overlapped with an earlier instance of the script that was still running, and we discarded them, which left 484 rounds. In 14 of these (2.9%), every cold request of the first wave, to all base relays, timed out after 5 s. The warm requests to the same names, sent right after the time-out, answered after a median of 3.8 s, so the names did resolve, but slowly. Such a stall lies on the client side and is common to all relays of the wave, and no choice of relays can mask it. It is most likely caused by the probe itself. A client that contacts fixed relay names can usually be answered from the cache of the recursive resolver, but the fresh random host names of the probe cannot. We exclude these rounds from the relay model, which leaves 470 rounds, and report recovery conditional on a responsive client. Section 3.2 gives the unlock waiting time with the stalls counted. In no round did all endpoints fail to answer. In 5 further rounds, only the second wave stalled. Since the base relays answered normally, we keep these rounds and count their stalled cold requests as time-outs. By the same caching argument, the cold request times are pessimistic for a client with fixed relay names. The supplementary package contains the raw browser record, including the discarded and excluded rounds, and the conversion script that applies every exclusion.
A request time runs from the start of the request to the response headers. It includes the server’s processing of an unauthenticated request for a non-existent bucket, but not an authenticated durable write. Following the advice to report the measurement method and its limits [59], we note that the client is one laptop on one network and that a browser schedules timers and connections in its own way. Cellular access would also add radio promotion delays to cold requests [60]. Recovery is decided by tail latency rather than by the median [61]. Cold requests to the base relays took a median of 576 to 988 ms, and warm requests took 98 to 454 ms (time-outs excluded). Conditions changed during the campaign. Before midnight, 51 of the 145 rounds had a base relay slower than , but after midnight, only 15 of the 325 rounds did. The campaign ran at night, outside the clinical hours of the consultation profile.
The base topology consists of the 9 EU-located relays of 7 operators: AWS in Frankfurt and Stockholm, Hetzner in Falkenstein and Helsinki, OVHcloud in Gravelines, Scaleway in Paris, IONOS in Frankfurt, Exoscale in Frankfurt and the Frankfurt regional endpoint of Google Cloud Storage. The other endpoints serve the scaling and jurisdiction analyses. We set the recovery deadline to 2 s, which is an acceptable wait for opening a messaging application after it was terminated. In 66 rounds (14.0%), at least one base relay missed this deadline, and in 6 rounds, at least three did. Appendix E varies .
Compromise and availability. No public data give compromise rates of individual relays. The rates in Table 2 are therefore declared inputs, and since absolute certificate values scale with them, those values should be read relative to the budgets. Mandiant reported a global median dwell time of 14 days for incidents investigated in 2025, up from 11 days [21]. Lemma 2 makes the mean the relevant quantity, and dwell distributions are right-skewed. A log-normal law with median 14 days and shape has a mean of 23 days, which we use as the base. The shape is an assumption. With or 2, the same median gives means of 43 and 103 days. A targeted intrusion may also resemble the cyber espionage and North Korean IT worker incidents, for which the same report gives a median of 122 days. Appendix F covers means from 0 to 201 days. For availability, we use a relay availability of 0.999, which lies between the 99.5% instance-level and the 99.99% region-level commitments of the EC2 service agreement [62], and an operator availability of 0.9995.
Table 2.
Declared model inputs, explored ranges and their basis.
Budgets. The horizon is 30 days. This is an engineering choice that corresponds to one month of an outpatient care episode. Chronic monitoring runs longer, and acute episodes run shorter, and absolute exposures scale with the horizon. The base budgets are . Recovery has a deadline of 2 s (cold requests) with failure budget on the pooled rounds, and installation has a deadline of 1 s (warm requests) with per-attempt failure budget . Further inputs are archived index, s and s. These are declared requirements of an interactive messaging application rather than clinical requirements. Table A2 lists the regulatory requirements to which each quantity relates, without claiming compliance [11,12,63].
Clinical messaging profiles. Segment change times follow from Double Ratchet processing at the custodied endpoint. Every sent or received message advances a chain key, every first message of a peer turn triggers a ratchet step, and an out-of-order message stores a skipped key that is removed when the message arrives [6]. We assume that 2% of received messages arrive out of order, after a mean delay of 10 min. Four illustrative profiles generate the message streams of one Double Ratchet session (Table 3). Their parameters are declared rather than fitted, and they describe hypothetical end-to-end encrypted services.
Table 3.
Illustrative clinical messaging profiles of one Double Ratchet session, the segment changes they induce at the custodied endpoint over 30 days (median [minimum, maximum] over 10 traces) and the declared number of unlocks. Message counts per thread or conversation are a fixed minimum plus a Poisson number.
The two patient profiles model asynchronous patient-clinician messaging. Patient portals such as those studied in [1,2] store messages on servers rather than in end-to-end encrypted sessions, so we take from them only the concentration of messages on a few patients. The typical patient opens one thread per month. Suppose that per-patient message rates are log-normal and that the top 5% of patients send 52.8% of all messages [2]. The shape parameter is then 1.72, and a patient at the 95th percentile sends 16.8 times as many messages as the median patient. The active patient opens threads at that rate. Because the reported population includes patients who send no messages, a strictly positive log-normal overstates the spread among senders. A hurdle model would be the correct form, so the factor is an upper estimate. Replies follow after hours.
The remote monitoring profile is a monitoring gateway that relays a device reading every 30 min and receives feedback twice a day through an encrypted session. Many monitoring systems instead upload readings to a vendor service over TLS. The consultation profile is the session of a clinician with the most frequently consulted colleague. The clinician starts about one conversation per hour during weekday shifts, and a quarter of these conversations go to this colleague. Table 3 also lists the declared number of unlocks per 30 days. We draw 10 independent traces of 30 days per profile. Traces of the typical patient are conditioned on at least one message, because a session without messages has no changing state to compare.
2.8. Experiments and Validation
For every trace, we solve the synthesis problem for SEG, WHOLE, KEY and KEY+A. For SEG, we add four comparators. The first is an engineering heuristic that stores every segment at the h most reliable relays (fewest measured rounds slower than ), for the largest h that admits a feasible policy, with the smallest admissible threshold and the cheapest age cap per segment. The second is the best uniform policy, which uses one holder set and threshold for all segments but chooses the age cap per segment. The third is the equal-budget policy, an additive design that gives each segment one third of every budget. The fourth is the joint policy with the additive recovery constraint. Unless the window rule is stated, every design and every sensitivity uses the pooled estimate of Section 2.5 for recovery and installation alike. Age caps range from 5 min to 30 days, and KEY may rotate periodically or at state changes with between 0 and 4 h.
To compare representations at equal exposure, we solve KEY, KEY with rotation at every change, KEY+A and KEY+A with again, with set to the upper bound of the SEG policy of the same trace. Because this tunes KEY to the trace, we also choose one KEY policy per profile that meets every budget and the SEG upper bound on the first 5 traces, and we evaluate it on the others. Beyond these comparisons, we run a series of further experiments. We trace payload against with all other budgets active and evaluate the policies chosen on the first trace on the other traces. We vary the budgets, the recovery budget, the residual copies f, the number of windows, the minimum lifetime and the measurement period, and we compare the certificate terms. We also vary the mean dwell time, the per-relay non-response, the operator and jurisdiction requirements, the uncertainty box, the envelope size, the latency model, the recovery deadline, the service time, the installation connections and the minimum lifetime. Finally, we compare custody with LOCAL and with a single revocable server in the seizure race, and we scale the topology.
Further experiments address guarantees and costs that the base comparison leaves out. For equal guarantees, we solve SEG and KEY on 50 traces per profile with the rollback budget , KEY being held at the SEG bound on exposed messages, and KEY+A for every . For keystore-bound custody, we repeat this comparison without the repeated-copy certificate. For correlated compromise, shocks arrive at rate and reach every operator independently with probability . On 3 traces each of two profiles, we replace the exposure and seizure coefficients of every candidate by horizon-window bounds computed from the exact distribution of the read set with shocks, so that these constraints hold under the shock model. The rollback budget is not re-evaluated there. We also raise the deterministic requirement to two and three operators chosen by the adversary.
For the costs outside the objective, we compute for every selected policy the read traffic, expected retransmissions, updates blocked by outages, the unlock wait, and the probability that a holder or its operator is compromised within the horizon and within a year. We also count the write traffic that the objective omits. It consists of the announcement of every new generation to its holders (108 bytes per holder, as in the C# implementation) and of the refresh at half the lifetime adopted in Appendix D. For KEY, we enumerate all candidates, report those that are not dominated in traffic, metadata exposure and unlock wait, and trace an -constraint front with budgets on the yearly metadata exposure and the 95th-percentile wait. These costs are evaluated outside the MILP. For the lifecycle, we compute from the message traces and the declared unlocks the fraction of time during which the state is in memory. The application evicts it a fixed time after the last activity, with or without background processing of incoming messages, and we evaluate the seizure race for each policy.
For delayed deletion, predecessor generations are retained for up to three days beyond their window. For state loss, a generation that expires while the device is offline is lost. Offline episodes follow declared distributions, and a Monte Carlo simulation of the refresh rule checks a closed-form approximation. Finally, we vary the workload and search for instances on which the exact formulation changes the design. Analytic bounds hold under the stated episode model. Recovery, installation and wait figures are plug-in estimates from dependent measurement rounds of one night, and we label the two kinds of results separately throughout.
Six checks validate the model. V1 compares the univariate and bivariate generating functions with brute-force enumeration of the latent states of all relays and operators. V2 simulates episodes with exponential, log-normal and fixed dwell times and compares read counts with Lemma 2. V3 simulates complete 30-day histories in which all segments share the same episodes. It uses five episode processes: Poisson starts with exponential, log-normal and Pareto dwell, bursty renewal starts, and an added common shock that reaches every relay. The last two violate the model. V4 holds measurements out in time. For each of four windows of about one hour, and for each half of the campaign, it selects the joint SEG policy of the consultation trace on the other rounds, both with the window rule and with pooled rounds. It then computes the failure of the selected policy round by round on the held-out rounds. V5 compares the solver with exhaustive search over unpruned catalogs, first on a reduced topology for the optimal payload and then on a six-relay topology with the joint horizon branch active for both stages. V6 evaluates the coefficients at all vertices and at sampled points of an uncertainty box and compares them with the corner, which checks their monotonicity (Proposition 7).
2.9. Use of Generative Artificial Intelligence
Generative artificial intelligence was used in this study as follows. The policy model, the experiment, validation and plotting scripts, the measurement and conversion scripts and the manuscript build scripts were written with the assistance of Claude Opus 5.5 (Anthropic PBC, San Francisco, CA, USA, model claude-opus-5-5). The figures were drawn with Matplotlib 3.11.2. The latency measurements of Section 2.7 were collected by a script executed in the browser pane of the Claude desktop application on an author’s laptop. Claude and ChatGPT (GPT-5; OpenAI, San Francisco, CA, USA) were also used for language editing, for drafting text and proof sketches, and for literature checks. The authors reviewed and verified all proofs, re-ran all experiments and checked all references and numerical results. The revision was carried out with Claude Fable 5.2 and Claude Opus 5.5 (Anthropic, models claude-fable-5-2 and claude-opus-5-5) under the direction of the authors. This covers the additional experiments, the native measurement probe, the extension of the C# prototype with its tests, and the revised text and figures. The authors reviewed the code, re-ran the experiments and checked the results. The corresponding statement is given in the Acknowledgments.
3. Results
3.1. Validation
Table 4 summarizes the checks. In 21 cases, the generating functions agree with enumeration to . We simulated 200,000 histories per dwell law, and the marginal probabilities of Lemma 2 agree with the simulation to 0.0023. Of the 12 pair probabilities, one lies outside the 95% Wilson interval of the simulation, where about 0.6 would be expected by chance, and the largest deviation is 2.5 standard errors.
Table 4.
Validation of the model and the solver.
Figure 2 compares the certificate terms with shared-history simulations. For the consultation trace at base rates, the union bound is , the summed Hunter term is , and the per-object horizon bound is . The joint horizon bound is , and this term is the certificate. Under Poisson starts, the simulated frequency is , so the certificate lies within a factor of 1.5 of the truth. The order reverses with one-day dwell, rates multiplied by 20 and age caps of at most one hour. In that setting, the Hunter term (0.047) is 3.3 times smaller than the joint horizon bound (0.157), and the simulated frequency is 0.016. Under Poisson starts, all three dwell laws stay below the certificate or within its sampling interval, including the Pareto law with shape 2.5. At base rates, they give nearly equal frequencies. The reason is that exposure is then dominated by episodes that reach the horizon window, and the number of such episodes depends on the dwell law only through its mean (Lemma 2). Bursty starts and the common shock exceed the certificate at base rates ( and for consultation). The certificate relies on independent episode starts. A compromise that reaches all operators is not covered by any threshold (Section 2.4), and only diversity of software and administration across operators reduces it.
Figure 2.
Probability that any generation of any object is exposed within 30 days for the selected SEG policies of the active patient and consultation profiles: the certificate terms of Theorem 1, the union bound for comparison (capped at 1), and the simulated frequency of the modeled event with 95% Wilson intervals under five episode processes, at base rates, at rates ×20, and at rates ×20 with one-day dwell and age caps of at most one hour (budgets 0.5 for the last two). Bursty starts and the common shock violate the independence assumption.
The recovery check V4 is reported in Section 3.2. Of the remaining checks, we start with the solver. On the reduced topology, it returned the same optimum as exhaustive search in all 12 instances (6 feasible, 4 distinct optimal payloads). We also ran exhaustive search on a six-relay topology over 592,704 combinations of unpruned candidates, with the full certificate, exact recovery and installation. It agreed with the solver in all 8 budget cells, both in the optimal payload and in the second-stage budget use, and the joint horizon bound was the smaller certificate term in every feasible cell. For the selected base SEG policies, the joint horizon bound is the smaller term on 40 of the 40 traces. Finally, none of the 168 evaluated points of the uncertainty box, including its 128 vertices, exceeded the corner values. V6 thus checks the monotonicity of the coefficients stated in Proposition 7. It does not check the robustness of a selected policy, which Appendix E evaluates.
3.2. Recovery and Placement on the Measured Network
This subsection demonstrates the method on the one night of measurements described in Section 2.7 and then checks it on a second campaign of 2.0 days (Section 3.2). Every recovery and installation figure in it is an empirical plug-in estimate from 470 dependent rounds, not a certified bound, and the selected holder sets are properties of this campaign.
Recovery limits the threshold and decides the placement. On every trace, the joint SEG policy stores all three segments at the same 5 of the 9 relays with threshold 4, and the base KEY policy uses 5 holders with threshold 4. Table 5 summarizes the selected policies. The pooled rule allows 4 failing rounds (Section 2.5), and the selected policies use up this allowance. With relay and operator outages included, the consultation policy fails to recover within in 4 of the 470 rounds, a failure probability of 0.0093. The placement is therefore decided by a few slow rounds of this campaign, and a longer campaign may select a different set.
Table 5.
Selected SEG policies by profile in the base evaluation (medians over 10 traces per profile; joint policy at the base budgets, without the rollback budget, which does not change them). The representations are compared in Table 6. Payload and reads in kB per 30 days (reads of KEY with periodic rotation for comparison); A: recovery failure of the SEG policy on the pooled rounds, with relay and operator outages, and in parentheses the number of failing rounds; Delay: 95th percentile of the delay that SEG adds to a message on warm and on reopened connections (trace 1); Blocked: SEG updates blocked by an outage per 30 days; Meta: probability of a metadata breach at some holder.
Table 6.
Consolidated comparison of the representations at the base budgets with the rollback budget (ranges of the medians by profile over 50 traces each). Exposure and rollback columns are analytic bounds under the episode model; the SEG rollback bound is a union bound over three objects that share one holder set. The recovery column is an empirical plug-in estimate from one night of measurements and is conditional on no adopted candidate being pending; the refusals of Remark A1 add at most 0.0070 per unlock at the declared availabilities (Section 3.8). Write traffic is the payload of the objective per 30 days; announcements add 108 bytes per holder and event (Section 3.3). KEY+A is listed without further evaluation (Section 3.3).
The rounds are not exchangeable in time. All 4 failing rounds of the selected consultation policy lie in the first quarter of the campaign. There, the policy fails in 0.0351 of the attempts, 3.5 times , while in the other quarters, it fails in at most 0.0007. Requiring the budget in every one of W windows removes such policies, but at a price. With 2, 3 or 4 windows, the SEG payload of the consultation trace is 671 kB with 6 holders, compared with 559 kB on the pooled rounds. With 5, 6 or 8 windows, no SEG policy is feasible, and with four windows of about one hour, the payload rises by 20%.
Whether this price buys protection can only be judged out of sample (V4, Table 4). We hold out each quarter of the campaign and each half in turn, which gives 6 cases (Table 4). Without the first quarter, which is the slowest part, both rules select the same policy. It fails in 0.0522 of the held-out attempts (6 rounds), 5.2 times . Without the first half, both rules again select the same policy, which fails in 0.0349 of the held-out attempts (8 rounds), 3.5 times . Without the second, third or fourth quarter, the window rule selects 6 holders, and the pooled rule selects 5. Both meet on the held-out rounds: the window rule fails in at most 0.0086, and the pooled rule fails in at most 0.0093. Without the second half, no policy meets the window rule, while the pooled policy fails in 0.0000 of the held-out attempts. There is no case in which the window rule meets on held-out rounds where the pooled rule misses it. On this campaign, therefore, the window rule gives no measurable protection beyond the pooled rule, and we use it only as a sensitivity. One night of measurements cannot tell how slow the worst hour of a deployment will be, and with dependent rounds it supports no statistical guarantee. The recovery results below hold for conditions like those measured.
Placement is a real choice, and for direct sharing, the exact formulation matters. Storing every segment at all 9 relays is infeasible on every trace. Installation then waits for every relay, and most writes follow an idle gap and find the connections closed. The engineering heuristic stores every segment at the most reliable relays in order. It is feasible on every trace with 7 or 8 relays and costs 1.4 to 2.4 times as much as the joint policy (medians by profile). The optimum, in contrast, uses a set that is not a prefix of the reliability order. The additive constraint charges every segment its own failure probability. It selects 6 holders and costs 20% more on every trace. The reason is that the three segments share their holders and fail together, and the additive bound counts this joint failure three times. The exact joint constraint thus saves 17% of the SEG payload. The equal-budget design, which gives each segment a third of every budget, reaches the same payload as the additive constraint. For KEY, which is a single object, the joint and the additive constraints coincide.
Allocation across segments matters little. The joint policy and the best uniform policy reach the same payload in 100% of the traces, so on nine relays, an enumeration of common holder sets and thresholds also finds the optimum. On a grid of budgets for 2 traces per profile (Figure A3), the joint policy saves at most 16.3% against the uniform policy and up to 60% against the heuristic.
We also checked whether the selected policies carry over between traces. The SEG and KEY policies chosen on the first trace of each profile were evaluated on the other traces, and 0 of 72 evaluations violate a budget, because the binding certificate, seizure and recovery terms do not depend on the trace. The payload of the trained SEG policy exceeds the optimum of the trace by a median of 0.0% (at most 2.4%).
Every unlock after an eviction waits for the network. Consider the selected consultation holder set, with the client stalls counted. An unlock that needs 4 cold responses waits longer than in 3.7% of all 484 measured rounds, and longer than 5 s in 2.9%, of which 100% are client stalls. A clinician with 20 such unlocks per shift thus waits longer than 0.74 times and longer than 5 s 0.58 times per shift. If the application evicts on lock instead (Section 3.4), every screen unlock becomes a recovery. With a declared 50 screen unlocks per shift, the clinician then waits longer than 1.9 times and longer than 5 s 1.4 times per shift. A missed deadline delays the opening of the session but does not prevent it. LOCAL storage has no such wait, and caching the key for a lease removes the wait within the lease (Section 3.4).
Second Campaign
On the second campaign (Section 2.7), the cold times of the base relays had medians of 207 to 356 ms and 99th percentiles of at most 1036 ms. At most, 0.31% of the cold requests to any base relay failed or took longer than 2 s. The median over the base relays was 270 ms in clinical hours (Monday to Friday, 08:00 to 18:00 Astana time, 100 rounds) and 258 ms at night (22:00 to 06:00, 455 rounds). We repeated the equal-guarantee synthesis of Section 3.3 on 40 traces with this campaign as the latency input. KEY with rotation at every change used 4 of 5 relays on 40 traces, and SEG needed 1.4 to 2.7 times its write payload, against 1.4 to 2.5 with the night campaign. For a temporally separated validation, we selected the policies on the first half of the campaign and evaluated their recovery failure on the second half. For KEY, it was at the median and at most , against on the first half, and it exceeded the budget of 0.01 on 0 of 40 traces. The probe ran for 2.0 of the 7 planned days, so the clinical hours of this result rest on the 100 rounds of one Friday afternoon. The largest recovery failure on a single day was , in clinical hours, , at night, , and in the worst clock hour, . The first half selected the same holder set and threshold as the whole campaign on 27 of 40 traces. Out of sample, the selected KEY policies thus kept the recovery budget on every trace, unlike on the night campaign, where a policy selected without the first quarter failed at 5.2 times the budget. Because the campaign is this short, it shows that the validation can be carried out, not that a placement selected on it would hold over weeks; the estimates remain plug-in estimates from the dependent rounds of one client.
Sensitivity to the treatment of the site’s losses. We repeated the synthesis and the validation with three alternative treatments. With the raw measured times, which keep every retransmitted SYN and repeated connect in the request time, 49% to 55% of the cold requests to every base relay take longer than 2 s, because one lost SYN alone costs 3 s. No policy then meets the recovery budget, on any of the 40 traces, whether the rounds with an unreachable relay are excluded (1292 rounds) or kept as failures of the relay (1417 rounds). These raw times describe the site and not the relays, and this is why we reconstruct the connect phase. With the reconstructed times and no round excluded (1417 rounds), a request whose connect failed on every attempt counts as a failure of the relay. KEY then again used 4 of 5 relays on 40 traces, but with the same holder set as with excluded rounds on 0 of them. Out of sample, its recovery failure was at most 0.0016 and exceeded the budget on 0 of 40 traces, and the worst clock hour reached 0.034. Removing the reconstructed requests instead leaves 0 complete rounds, because every round contains at least one reconstructed request among its 18 base-relay requests. Charging the lost connects to the relays thus leaves the out-of-sample result within the budget but changes the holder set and the worst hour.
3.3. Representations at Equal Guarantees
We compare the representations under the same requirements: the base budgets, the rollback budget of Section 2.2, and for KEY the upper bound on exposed messages of the SEG policy of the same trace. Table 6 summarizes the outcome on 200 traces, 50 per profile. Both designs are feasible on all 200 traces. KEY with rotation at every state change uses 4 of 5 relays on 200 traces, the same holder set and threshold as the SEG policy. SEG needs 1.4 to 2.5 times as much write payload, the quantity of the objective. This range runs over the four profiles and is taken from the median, within each profile, of the per-trace ratio of the two payloads (1.4 to 3.2 over all traces). The medians are 12.5 against 4.8 kB for the typical patient, 98.2 against 47.7 kB for the active patient, 467.2 against 231.7 kB for consultation and 1603.9 against 1119.7 kB for remote monitoring. These medians are taken separately for each design, so their ratio differs from the median ratio: 2.6 against 2.5 for the typical patient.
The objective omits two parts of the write traffic. Every promoted event is announced to the holders of the changed objects, at 108 bytes per holder in our implementation (Section 3.8), and the refresh rule of Appendix D adds generations on traces with long gaps. Both designs announce the same events to the same holders, so the announcements dilute the difference. With them, SEG needs 1.3 to 2.1 times as much write traffic as KEY with rotation at every change (2.1 for the typical patient, 1.7 for the active patient, 1.6 for consultation and 1.3 for remote monitoring), and announcements make up about 42% of the KEY traffic. This factor, and not the larger ones below, is the saving of a wrapping key at equal guarantees. WHOLE, which shares the whole state as one object, meets the rollback budget on all 200 traces with the policies it selects without it (bound ). It needs 1.3 to 2.3 times as much payload as SEG, because it rewrites all segments at every change, and 3.2 times as much as KEY with rotation at every change (2.3 in full write traffic).
The rollback budget is met with a wide margin and changes no selected policy (0 of 200 traces), so it acts as a filter that admits only designs that detect rollback. Both designs write every version to all holders, so a rollback passes only if all responders are compromised. Against an adversary who chooses the time, the bound is for each object. The value for SEG is the union bound over its three objects, which share one holder set and threshold, so the underlying event is the same as for KEY. At a random recovery time, the bound per object is .
A periodically rotated key is far cheaper and gives up rollback detection. If KEY only has to meet the SEG bound on exposed messages, it rotates every 30 days on every trace and writes 1.0 kB of payload per 30 days, so that SEG needs 12 to 1538 times as much write payload and 6 to 986 times as much write traffic once announcements and refresh are counted. Between rotations, this key carries no version information, so any resumption of an older local state goes undetected and reuses message keys. The factor therefore applies only under the condition of Section 2.2: the adversary cannot write the endpoint’s files, benign restores of older states are excluded, or the device keeps a hardware monotonic counter that it increments at every state change.
Anchors do not close this gap. With and , the bound on an undetected rollback at an adversary-chosen time is 0.087 and 0.0058 for the base holders, both above . The budget needs , and the cheapest KEY+A policy then writes no anchor at all on 200 of 200 traces, because an anchor is as large as a key share and goes to every holder. KEY+A saved a write on 0 traces. We therefore treat it as a negative result and do not consider it further.
The certificate of Table 6 prices local masks and ciphertexts that the keystore does not protect (Section 2.2). Where the local material is bound to the keystore, this exposure disappears, and only the seizure budget remains. We therefore repeated the comparison without the certificate on 80 traces. SEG then needs 1.4 to 2.6 times as much write traffic as KEY with rotation at every change, so the equal-guarantee factor does not depend on the certificate. The policies become cheaper by up to 20%, because a smaller holder set suffices. The certificate thus matters for devices without a keystore and for backups that exclude keystore keys, and the comparison that holds with keystore binding rests on the seizure and relay-path exposure of Section 3.4.
Four further analyses are in the appendices. Appendix C gives the base policies of all representations, the comparison with periodic key rotation and its sensitivity, and the reads, send-path delays and metadata of the base evaluation. Appendix E varies the operator and jurisdiction requirements, the relay availability, the deadlines, the minimum lifetimes and the joint uncertainty. Appendix F shows that with dwell times of weeks, refreshing generations every few minutes lowers exposure only by a small factor, and Appendix G reports the computation for larger topologies.
3.4. Revocation, LOCAL and a Single Revocable Server
Table 7 compares custody with LOCAL and with a single revocable server for a seized device over the same 30-day horizon. It evaluates declared laws for revocation and keystore breaks, so it is an analytical illustration rather than an experiment. Revocation delays are exponential with mean . The keystore is breakable with probability p, after an exponential time with mean ; otherwise, it does not fall within the horizon. LOCAL is exposed whenever the keystore falls within the horizon, which for and days, happens with probability 0.632. Custody is exposed if the keystore falls before revocation. Custody that is not keystore-bound has a second path, because it is also exposed if the shares of the seized generation are later obtained through relay compromise. For keystore-bound custody, this path additionally requires a late keystore break. For a managed device with a mean revocation delay of one day, the exposure under threshold KEY is 0.032. For a patient-owned device with a mean delay of a week, it is 0.188. If an exploit exists for only one device in five, the two values become 0.025 and 0.100, compared with 0.197 for LOCAL. These figures assume that the material was evicted when the device was seized, which holds only for an application that evicts when the device locks.
Table 7.
Seized device: probability that the state is exposed within 30 days under LOCAL, threshold KEY (consultation policy) and a single revocable relay with its best lifetime (), without and with keystore binding of the local material, and for keystore-bound KEY when the material is in memory at the seizure with probability . Exponential revocation delays (mean ); keystores breakable with probability p after an exponential time with mean . Relays keep shares until scheduled expiry. Analytical evaluation of declared laws.
The usual behavior of a messenger is different (Section 2.1). It keeps the material in memory while it runs in the background, and with , the exposure in the one-day managed case rises from 0.032 to 0.572 (0.332 at ). Section 3.5 evaluates eviction policies between these extremes. Deleting shares on revocation instead of at scheduled expiry lowers the relay-path term of the selected KEY policy from to for a one-day revocation delay.
The race itself is the same for a single server because the benefit comes from revocation rather than from the threshold. This race dominates the end-to-end exposure, and the relay-side exposure that the budgets bound is one to two orders of magnitude smaller. The threshold matters instead through the relay path and the repeated-copy exposure. With the declared rates and its best lifetime (30 days), a single relay () has a repeated-copy certificate and a seizure exposure of 0.017. Threshold KEY reaches with and with , where the optimizer selects a cheaper policy with threshold 2 of 3, so removing archived copies does not itself raise the exposure. As a consequence, the end-to-end exposure of the single relay for a one-day revocation delay is 0.049 instead of 0.032. The single relay would meet only with an episode rate below 0.0069 per year. This rate is 17 times less than the declared relay and operator rates together, although a hardened service built on hardware security modules may achieve it [16]. A threshold policy faces the same limit for compromises that reach every relay at once. It meets only if such common-mode compromises occur less than 0.0056 times per year, which is the rate at which they use up the part of that the policy’s own certificate leaves. The threshold therefore helps exactly when common-mode compromise of independent operators is much rarer than the compromise of one service.
We next compare recovery and metadata. The most reliable single relay (AWS Frankfurt) has a recovery failure of 0.0079 on the pooled rounds (3 failing rounds). This value meets , so recovery does not distinguish a single server from a threshold here. Two relays of one operator with nearly double the exposure (0.031). The single relay also concentrates the metadata in one place, whose breach probability, 0.017, is about 5 times smaller than that of the threshold holders (Appendix C). Keystore-bound custody removes the repeated-copy exposure for both designs. What remains is the relay path after a late keystore break, and there the threshold changes the end-to-end exposure only from 0.043 to 0.032 for a one-day revocation delay. Custody therefore helps when revocation is fast relative to the time an adversary needs to break the keystore. A threshold adds protection mainly where the remote factor cannot be keystore-bound, or where a single server would be compromised about as often as a relay.
A last point concerns availability at unlock. Each unlock after an eviction depends on the network (Section 3.2). Caching the key under the keystore for a lease of L hours after a recovery removes the network from later unlocks within the lease. Until the lease ends, however, custody behaves like LOCAL. With a keystore that falls after 7 days on average, a device seized right after a recovery is exposed with an additional probability of up to 0.006 for a one-hour lease and 0.047 for an eight-hour lease.
3.5. Application Lifecycle and Costs Outside the Objective
The objective counts write payload, which is small in absolute terms. The costs that decide whether custody is worth deploying lie elsewhere, and Table 8 reports them for the equal-guarantee KEY policy, which rotates at every change. We first consider the lifecycle of the application. If the application keeps the material in memory while its process lives, a seized device holds it with a declared probability . Revocation cannot evict it from a seized device, so with a mean revocation delay of one day, the exposure is 0.572, against 0.632 for LOCAL.
Table 8.
Lifecycle policies for the equal-guarantee KEY policy (4 of 5 relays, rotation at every change): fraction of time with the material in memory (mean over 50 traces, with the declared unlocks), key fetches per 30 days with background processing of incoming messages, and seizure exposure of keystore-bound custody for this policy and for the single revocable relay of Table 7 (, days; LOCAL: 0.632). With an eviction timer, a resident copy is exposed only through a memory exploit before the eviction. Exposures are analytic under the declared laws; and fetches follow from the declared profiles.
If the application instead evicts the material a fixed time after the last activity, the timer keeps running on the seized device. A resident copy is then exposed only if a memory exploit succeeds before the eviction, and we bound this by the law of the keystore break over the length of the timer. For timers between 30 s and 60 min, this term adds at most 0.0013 to the exposure, which is then set by the revocation race: 0.001, 0.032 and 0.188 for mean revocation delays of one hour, one day and seven days in the consultation profile. The bound assumes that the adversary cannot stop the timer without such an exploit. Under that assumption, the protection comes from eviction as such, not from a short timer.
Eviction is paid for in fetches. With a five-minute timer, background processing of incoming messages and the declared unlocks of Table 3, the consultation endpoint fetches its key 417 times per 30 days, the active patient 147 times, the typical patient 36 times and the gateway 1509 times. At the estimated recovery failure of 0.0093, 3.9 consultation fetches and 14.0 gateway fetches per 30 days miss the 2 s deadline. Each fetch waits a median of 656 ms and a 95th percentile of 1327 ms for the fourth-fastest of five relays on cold connections. If incoming messages instead wait for the next foreground use, the consultation endpoint fetches 387 times, and an incoming message is decrypted a median of 2 minutes late there and 120 minutes late for the active patient.
The second cost is metadata. Every holder learns when the endpoint writes and reads. Among the KEY candidates that meet the base budgets, only holder sets of 5, 6, 7, 8 relays occur, and the least yearly probability that some holder or its operator is compromised is 0.46. A single relay has 0.12, but no single-relay candidate meets the budgets (0 candidates). A metadata budget below 0.46 per year is thus incompatible with the base exposure budgets on this topology. We also traced an -constraint front with budgets on the yearly metadata exposure and the 95th-percentile unlock wait. It is degenerate: no candidate meets a metadata budget below 0.46 or a wait budget of 1 s, and for budgets of 0.5 and 2 s, the cheapest candidate is the five-relay policy. For the consultation trace, five relays cost 535.7 kB of writes and reads at a metadata probability of 0.46, and seven relays cost 710.6 kB at 0.57. At most, 5 candidates per trace are not dominated in the traffic, metadata and unlock wait, and the least 95th-percentile wait among them is 1298 ms.
Table 8 also shows what the threshold buys over a single revocable server once the lifecycle is fixed. For the single server, we use the relay of Table 7, with its best lifetime of 30 days. Both designs give the same revocation race. With keystore binding and a mean revocation delay of one day, the threshold lowers the seizure exposure from 0.043 to 0.032. Over the three delays, the difference is 0.008 to 0.011 in absolute terms, a factor of 8.6 at one hour and 1.04 at seven days. The single relay, however, does not meet the relay-side budgets at the declared rates. Its seizure exposure through the relay path is 0.017 against , and it would meet the budget only with a compromise rate below 0.0069 per year. The threshold is what makes these budgets attainable, and its price is the rise of the yearly metadata probability from 0.12 to 0.46. The relay-side budgets, and with them, the threshold, matter where the local material cannot be bound to a keystore or the keystore may fall, the material is evicted within minutes of use, and revocation takes hours. Where revocation takes days, the race dominates, and both designs are exposed alike. Where the material stays resident, neither improves much on LOCAL.
The remaining costs are small next to these. At equal guarantees, a KEY endpoint reads 262.2 kB per 30 days for consultation against 1260.2 kB for SEG; expected retransmissions add 11.4 and 23.0 kB, and outages block 2.2 and 2.9 updates. For the monitoring gateway, 10.5 and 10.9 readings per 30 days are blocked until an outage ends. Rotation at every change thus removes the advantage in blocked updates that periodic KEY has. These costs, the waits and the metadata exposure are evaluated for selected or enumerated policies; they are not variables of the MILP.
3.6. Correlated Compromise, Delayed Deletion and State Loss
Appendix D reports three analyses of the assumptions behind the bounds. Shocks that reach every operator make every policy infeasible above 0.0069 per year, whatever the policy, while shocks that reach each operator with probability 0.5 or less are absorbed by a higher threshold over more operators; the ranking of the representations holds in 63 of 63 cells. An adversary who chooses two operators is tolerated on 5 of 5 consultation traces and on 1 of 5 traces of the active patient. Predecessor shares retained at unreachable holders for up to 3 days changed no optimal policy. State loss changed the protocol: an online device refreshes a generation once half of its lifetime has passed. With this rule, the probability of losing the state within a year is for nightly absences and a lifetime of a week, and 0.0010 for absences with a median of two days and a lifetime of 30 days, whereas a device that stays off for weeks loses its session under any lifetime the budgets admit.
3.7. Workloads and the Value of the Exact Formulation
We repeated the equal-guarantee comparison on 219 traces of 14 workload variants (Table 9). Both designs were feasible on all of them, and SEG cost more than KEY on every trace. For pairwise sessions, the payload factor stays near 2. It is 2.0 to 2.1 when the message rate is multiplied by 0.25, 4 or 16, 2.1 to 2.3 when 10% or 30% of the received messages arrive out of order, and 2.0 to 2.1 for three or five sessions of one endpoint under a single key. With announcements and refresh, the corresponding full write factors are 1.6 to 2.3. Two variants only scale object sizes and show how the factor grows with the state, because a key share stays at 32 bytes. When every segment is 10 and 50 times larger, the payload factor is 10.8 and 49.7, and 6.8 and 29.6, with announcements. When only the skipped-key segment is 10 and 50 times larger, it is 2.2 and 2.9. For groups, we use an abstraction with one 72-byte sender-ratchet object per member and an epoch object, so that SEG rewrites only the sender’s object at a message. The payload factor is then 1.6 for 8 members and 2.5 for 32 members, and the full write factor is 1.3 and 1.9. All of these workloads are generated from declared parameters. No trace of a clinical service was available to us, so the figures show how the comparison scales and do not predict the traffic of a deployment.
Table 9.
Equal-guarantee comparison under other workloads (medians pooled over the active-patient and consultation traces where both are used; write payload per 30 days; factor: median, minimum and maximum of the per-trace ratio of SEG to KEY with rotation at every change; full: median ratio of the write traffic with announcements and refresh). All workloads are generated from declared parameters; the size variants only scale object sizes.
On these instances, we also asked where the exact formulation changes the design. On the base topology with equal declared rates, it does not. The best uniform policy equals the MILP optimum on all traces, also on the mixed Kazakh topology (0 of 20 instances differ) and on one trace each of EU topologies of 10 and 11 relays. Heterogeneous instances behave differently. When the episode rates and unavailabilities of relays and operators are drawn independently around the declared values (log-normal with unit shape), the joint SEG optimum is cheaper than the best uniform policy in 19 of 79 feasible instances, by up to 15.2%, and the additive recovery constraint is infeasible in 18 of them. With two or three sessions of different profiles at one endpoint, which gives six or nine objects, the additive constraint is infeasible in all 15 instances, while the exact constraint is feasible in all. With several sessions and heterogeneous rates together, the joint optimum beats the best uniform policy in 16 of 19 instances, by up to 37.8%, and places different objects at different holder sets. All of these are multi-object SEG instances. The exact formulation is therefore needed where several objects share holders and objects or relays differ. For the recommended single wrapping key, it reduces to a k-of-n condition, and enumeration suffices.
3.8. Evidence from the Implementation
We extended the C# prototype (.NET 8.0.31), which implemented SEG, with KEY and KEY+A (Table 10). KEY encrypts the serialized state with AES-256-GCM under a fresh 256-bit wrapping key and a random 96-bit nonce. The associated data bind the device, the policy, the key generation, the version counter and the predecessor version. A mask of the key stays in the local record, and the masked key is shared with the existing Shamir code at the holders. Generations are published with the Current and Pending transaction of Proposition 2, including the outbox and the announcement. The key rotates at every state change, at the first change after a minimum age, or periodically. KEY+A sends a signed 32-byte anchor to every key holder at changes without rotation and releases the change after q acknowledgments. Keystore binding goes through an interface that signs, wraps and unwraps without exporting keys. Only a software implementation of this interface exists, so the tests do not cover a hardware keystore.
Table 10.
Implementation evidence. The first four rows concern the transaction substrate of the SEG implementation; the last three concern the KEY and KEY+A extension of the revision (software keystore, relays in one process).
The test harness checks 133 combinations of test and configuration, with 854,682 cases in total. It injects a crash at every fault point of publication and of the recovery that follows it, returns stale records from every subset of relays, makes every subset of relays unavailable, corrupts, forges and replays shares and anchors, replaces the local record with every durable image written earlier, and runs the revocation race. A randomized campaign adds 100,000 schedules with 4,904,397 steps, 207,133 crashes and 1,756,853 unlocks. After every step, it checks that recovery returns the latest committed state or the open candidate, or refuses. Every case met its expected outcome, and the campaign found 0 violations. The tests also reproduce the negative property of Section 3.3. Of 318,866 rollbacks to an older committed version in the campaign, KEY with periodic or delayed rotation accepted 27,180, all inside the current key generation. KEY with rotation at every change and KEY+A never accepted an older state while at most holders lied. With lying holders, KEY+A missed the rollback, as its assumption predicts (undetected in 9 of 358 placements, detected in 349 with ).
The implementation exposed one gap in the protocol. The proof of Proposition 2 discards a Pending candidate that the local record does not show as acknowledged. Combined with rollback detection, this rule fails when the local record is an older copy taken during a publication, because such a copy shows no acknowledgment for a candidate that was promoted later. Recovery then either raises a false alarm or returns the predecessor. The prototype therefore adopts a candidate whenever relays hold authenticated records of it and a promotion cannot be excluded, completes its publication, and refuses recovery until enough holders return otherwise (Remark A1). This rule costs availability. While a key generation is blocked by an unreachable holder and its promotion cannot be excluded, unlocks are refused until the holder returns. In the randomized campaign, where injected crashes, outages and record replacements are far more frequent than the declared availabilities, 18.6% of the unlocks were refused this way. Under the declared availabilities, a refusal needs an adopted candidate whose publication cannot be completed. A key generation needs the acknowledgment of every holder, so this requires some holder or its operator to be unreachable. For the selected KEY policies with rotation at every change, the probability of a refusal per unlock is therefore at most the probability that some holder or its operator is down, 0.0070 in every profile, because all profiles select the same holders. This is at most 3.1 refused unlocks per 30 days for consultation and 0.21 for the typical patient. The bound is reached only if every outage meets an interrupted publication; the actual share is this bound times the probability of such a meeting, which depends on the crash rate of the device and which we did not measure. The bound is of the same order as the recovery failure of Table 6, which is conditional on no adopted candidate being pending, so, in the worst case, the refusals could take the total failure of an unlock above . A candidate whose promotion is excluded is abandoned, and the application redoes the change. An endpoint that accepted an older copy of its own record can later take its own failed attempts for a rollback. In 232 of 41,077 such schedules, the device ended, unable to recover, which is a loss of availability, not of confidentiality.
The payload of the implementation agrees with the model. For KEY and KEY+A, the measured write payload and request counts equal the model values in 126 of 126 measurements, and the reads of t shares in 45 of 45. In addition, every promoted generation is announced to each holder with a 108-byte message, which the objective omits and Section 3.3 counts. For SEG, the model charges each segment at its declared size, while the implementation writes less in 6 of 15 measured changes. A message sent on the same chain changes 52 instead of 84 bytes of the chain segment, and an empty skipped-key segment takes 4 bytes. The model therefore overstates the traffic of SEG. As a lower bound for SEG, we repeated the equal-guarantee synthesis on the 200 traces with the smallest sizes the implementation wrote, 52 bytes for every chain-segment change and 4 bytes for every skipped-key change. SEG then needs 1.2 to 2.2 times the write payload of KEY with rotation at every change (1.2 to 2.8 over all traces, below 1 on 0), and 1.1 to 1.9 times its full write traffic with announcements and refresh (below 1 on 0 of 200 traces). The evidence has the limits of a harness. The relays are objects in one process, crashes are injected at fault points rather than by power loss, and the relay-side expiry and retention delay are not implemented. The earlier QEMU campaign [64] concerns SEG only.
4. Discussion
4.1. Recommendations for Medical Messaging
The first decision is whether a remote factor is wanted at all. Keystore-protected local storage already resists copied files. Custody adds the ability to cut off a seized device by revocation, at the price of relay-side exposure, relay metadata, a network fetch at every use after an eviction, and custody traffic. Its benefit depends on two product choices more than on the threshold (Section 3.5). An application that keeps the material resident to process messages in the background is exposed almost like LOCAL. One that evicts after use and is revoked within hours to a day on average reaches exposures of a few percent, but it fetches the key for every incoming message or delays incoming messages until the next use. Where the local material can be bound to the keystore, the repeated-copy exposure disappears, and the certificate of this paper matters only for devices without a keystore and for backups that exclude keystore keys.
If custody is used, the representation comes next. At equal guarantees, a wrapping key that rotates at every state change needs 1.3 to 2.1 times less write traffic than direct sharing of the state, announcements included, and about a fifth of the reads. A periodically rotated key needs 6 to 986 times less, but only where no older local state can be resumed (Section 3.3). Rotating the key at every change gives the rollback detection of direct sharing. Quorum anchors did not meet the rollback budget below and saved no writes on any trace, so we do not recommend them. Direct sharing of the state is justified only if the stored representation must stay hidden from an adversary who can break authenticated encryption. That adversary, however, can then also read the messages protected by the state.
Placement and threshold come third. At the declared compromise rates, a threshold across independent operators is needed to meet the relay-side budgets, which a single relay misses by an order of magnitude. Its end-to-end benefit over a single revocable server is about 0.01 in seizure exposure, and its price is a metadata exposure about four times higher (Section 3.5). It is worth that price where the material is evicted after use, revocation takes hours, and the local material cannot be keystore-bound, or the keystore may fall. A single server meets the budgets only if it is compromised less than 0.0069 times per year, for example, a service hardened with hardware security modules. A threshold also requires that compromises reaching every operator at once stay below that rate, so operators should differ in jurisdiction and in the software they run. Where several objects share holders or relays differ, the holder set should be chosen with the exact joint recovery constraint on measured response times; for one key on a homogeneous topology, enumeration suffices (Section 3.7). Lifetimes come last. With episodes that last weeks, short refresh intervals reduce exposure only by a small factor (Appendix F), while refresh at half the lifetime with lifetimes of a week for devices that are off overnight, and of a month for devices that are off for days, prevents most state loss (Appendix D).
The enrollment of a patient-owned device should be revocable by the patient as well as by the organization. If the key also protects the message store, a revocation by the patient must not destroy the clinician’s copy of the conversation, which belongs to the clinical record [3]. The recovery budget and deadline should come from the application’s requirements and be checked against response times of the actual relays, measured from the networks that patients and clinicians use over weeks and tested on held-out periods, because one slow hour can exceed the budget several times over while the pooled estimate meets it. Relay records carry metadata that may be health data. Relays should therefore see per-relay pseudonymous identifiers, and the number of operators that see them is itself a privacy cost. Custody complements the authentication, authorization and audit that surround health data exchange [65]. It does not replace emergency access to the clinical record [12], and it does not undo a disclosure to an endpoint that has already decrypted a message. Clinical deployments should embed its budgets in their risk management for networked medical IT [66,67]. For such a risk analysis, the model supplies four hazards, each with a model quantity and a control. The first is loss of the session state when a device stays offline past the lifetime of a generation, controlled by long lifetimes with refresh at half the lifetime (Appendix D). The second is an unreadable message history if the wrapping key also protects the message store, controlled by lifetimes long enough for the expected offline periods and a recovery path for the history. The third is a delayed message when an outage blocks an update. Here, the quantity is 2.9 SEG updates and 2.2 updates of KEY with rotation at every change per 30-day consultation session (Section 3.5), and the control is an indication to the sender and a fallback channel. The fourth is a delayed unlock, with 0.58 waits longer than 5 s per shift at the declared unlock counts on the measured night (Section 3.2), controlled by a key lease (Section 3.4).
4.2. Data Protection of Shares and Relay Metadata
A share below the threshold reveals nothing about the state (Lemma 1), but every relay sees which client identifier and network address writes and reads at what time. Whether such records are personal data, and possibly data concerning health, depends on whether they can be linked to a person, and the case law and guidance on this point differ [68,69,70]. The status of relay records must therefore be settled for each deployment. If they are personal data, relay operators are processors under the GDPR and likely business associates under HIPAA [11,71,72,73,74], relays outside the European Economic Area receive transfers under Chapter V [75], and national rules on domestic storage, such as Article 12(2) of the Kazakh personal data law [76,77], restrict the topology. Each of these rules removes operators from the candidate set and so reduces the operator diversity on which the threshold relies. The model touches them at two points only. The jurisdiction requirement of Equation (4) expresses that no single jurisdiction may reach the threshold, and the metadata exposure of Appendix C counts the operators that can observe a client. Table A2 maps the individual requirements to model quantities. The mapping shows which quantity informs a requirement and does not establish compliance. With the two Kazakh relays that we measured, the operator requirement cannot be met at all, because a threshold that no single operator reaches would need both relays and leave no redundancy. A domestic topology needs at least one more independent operator, and Appendix E evaluates a mixed topology instead.
4.3. Limitations
Several limitations concern the threat model. The compromise rates are declared inputs rather than estimates, and the dwell anchor comes from a broader incident population. The feasibility of the base case depends on them, but the ranking of representations does not. The certificate depends on independent episode starts. In our simulations, bursty starts and a common shock exceeded it. Appendix D replaces it with bounds that hold under a declared shock model on a few traces, and these show that no policy withstands shocks that reach all operators. The deterministic requirement covers an adversary who chooses two operators only on some traces (Appendix D), and no more on nine relays. The costs outside the objective, the unlock wait and the metadata exposure are evaluated for selected or enumerated policies and are not variables of the MILP. The model does not cover adaptive attackers that target the operators of a seized device, compromise of the unlocked endpoint, or legal compulsion of several jurisdictions.
Other limitations concern what the model counts. The expected number of exposed messages counts the messages whose keys are derivable from an exposed generation within the horizon. It ignores derivations of messages after the horizon and active attacks by an adversary who uses an exposed state to impersonate an endpoint. It also ignores the plaintext message history that applications keep on the device, which KEY can protect but we did not model. The state-loss figures of Appendix D rest on declared distributions of offline periods. The seizure exposure of several objects is bounded by a sum. Since every current window contains the seizure time, Lemma 2 would give the joint law exactly, so the sum slightly overstates the exposure of SEG. Custody also makes every unlock after an eviction depend on the network. A clinician or patient without connectivity cannot open the application, which matters in hospital basements, rural areas and ambulances. Caching the key on the device for a bounded lease trades this availability against seizure exposure (Section 3.4), and we bound this trade-off but did not optimize it.
The latency measurements have their own limits. The second campaign covers 2.0 days with fixed host names and phase timing, but from one data-center client, with unauthenticated requests and with connect and name-lookup phases reconstructed where the site lost packets (Section 2.7). The rest of this paragraph concerns the first campaign. They come from one laptop on one wired or wireless network in Astana, through a browser, over 4.6 h at night, to relays in the EU. This combination matches neither an EU deployment, whose clients would be much closer to the relays, nor a Kazakh one. The probe used fresh random host names, which defeat resolver caching, make cold requests pessimistic and probably caused the excluded stalls. The measurements use unauthenticated requests rather than authenticated durable writes, and the browser timed them at script level without phases or a check of connection reuse (Section 2.7). They do not include the radio promotion delays of cellular access [60], and they do not cover the hospital and mobile networks that patients and clinicians use. The recovery and installation estimates hold for conditions like those measured, on average over the campaign. In the slowest hour, recovery failed several times more often than on average, and a policy selected without that hour failed it several times more often than budgeted. We give no statistical guarantee for future conditions. Recovery is also conditional on a responsive client: in 2.9% of the measured rounds, the client itself stalled. The endpoints used for scaling and for the jurisdiction analyses were measured in the second wave of each round, seconds after the base relays. Their response times are therefore not joint with those of the base relays in the strict sense.
The remaining limitations concern protocol details, the traces and the implementation. The endpoint repeats the announcement of a new current generation until every holder acknowledges it. A holder that is down during an outage keeps the predecessor’s share for the rest of the outage, about 43 min per month at a relay availability of 0.999; Appendix D bounds the effect of such retention, but Theorem 1 does not charge it. The traces and unlock counts come from declared profiles, not from logs of a clinical service. Group conversations are represented only by an abstraction with declared object sizes and commit rates (Section 3.7), not by an implementation of a group protocol, and no trace of a clinical service was available. The lifecycle results rest on the same declared profiles. The write payload ignores acknowledgments, transport framing and energy. The C# implementation of KEY and KEY+A runs in a test harness with relays in one process and a software keystore, and the synthesized policies have not been deployed in a service. Finally, expiry at relays and bounded residual copies are obligations of the relay operators that the model assumes [40].
5. Conclusions
We formulated the configuration of threshold custody for messaging session state as a mixed-integer program that budgets the exposure custody adds, the exposure after a seizure, undetected rollback, and failed recovery and installation. Two results form the core, and a third delimits the method. The first is the comparison of representations at equal guarantees. When both designs must detect rollback, a split wrapping key that rotates at every state change needs 1.3 to 2.1 times less write traffic than direct sharing of the state, counting the announcements of new generations, and 1.4 to 2.5 times less payload. The factor holds with keystore binding and grows with the size of the state. The much larger saving of a periodically rotated key gives up rollback detection and is admissible only where no older local state can be resumed. Version anchors saved nothing. The second result is the revocation race. Custody does not protect against copied files, which a keystore already resists. Its benefit is the ability to revoke a seized device, so the lifecycle of the application and the speed of revocation dominate the exposure. An application that keeps its material resident stays at 0.572 against 0.632 for local storage. One that evicts the material after use reaches 0.001 with a mean revocation delay of one hour and 0.032 with one day, at the price of a network fetch at every use. The third result concerns the recovery constraint. An exact joint constraint over relay sets changes the design where several objects share holders and objects or relays differ. For the recommended single key, it reduces to a k-of-n condition that enumeration solves.
These results delimit when a threshold is worth deploying. Against a single revocable server with a mean revocation delay of one day, it lowers the seizure exposure only from 0.043 to 0.032, and it raises the yearly probability that some relay sees the client’s metadata under compromise from 0.12 to 0.46. It is needed to meet the relay-side exposure budgets at the declared compromise rates, which a single relay misses by an order of magnitude. Those budgets matter where the material is evicted within minutes of use, revocation takes hours, and the local material cannot be bound to a keystore or the keystore may fall. A threshold fails against compromises that reach all operators more often than 0.0069 times per year, whatever the policy. Generations must be refreshed at half their lifetime, and devices that are off for days need lifetimes of a month, since otherwise a device that is switched off at expiry loses its session.
The limits are those of the inputs. Compromise rates, profiles, offline periods and lifecycle parameters are declared, and the placement results come from one night of unauthenticated requests from one client, which we present as a demonstration of the method. The analytic bounds hold under the episode model, whereas the recovery estimates carry no statistical guarantee. The next steps are a campaign of several weeks with authenticated writes from the client networks of a deployment, and estimates of compromise rates from operator incident data.
Supplementary Materials
The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/info17121219/s1, Software S1: a single archive with the policy model and the experiment, validation and plotting scripts, including the experiments added in the revision (revision_experiments.py) and the generator of every number quoted from them (make_numbers_rev.py); the browser measurement script and the conversion script that applies every exclusion; the measured request-time samples and the raw browser record with the discarded and excluded rounds; the native measurement probe with authenticated requests, its deployment and analysis scripts; all numerical results; the manuscript sources; the C# prototype with the KEY and KEY+A extension, its test harness, logs and result tables, and the sources, environment manifests and logs of the earlier executions in a virtual machine; a file index that maps every table, figure and number in the text to the result file it is computed from; and a SHA-256 manifest of all files; Table S1: Representations at the base budgets and at an equal upper bound on the expected number of exposed messages; Table S2: Sensitivity of the selected policies for the consultation trace.
Author Contributions
Conceptualization, B.A. and N.N.; methodology, B.A., L.R. and N.N.; software, L.R., N.N. and D.Z.; validation, B.A., G.J., L.R. and D.Z.; formal analysis, N.N. and D.Z.; investigation, B.A. and N.N.; resources, B.A., G.J. and L.R.; data curation, L.R. and N.N.; writing—original draft preparation, B.A. and N.N.; writing—review and editing, B.A., G.J., L.R. and D.Z.; visualization, N.N. and D.Z.; supervision, B.A. and L.R.; project administration, G.J.; funding acquisition, B.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Committee of Science of the Ministry of Science and Higher Education of the Republic of Kazakhstan, grant number BR24993145.
Institutional Review Board Statement
Not applicable. The study evaluates protocol software and parameterized computational models using generated message traces and network measurements to public service endpoints; no human participants or health records were involved.
Informed Consent Statement
Not applicable.
Data Availability Statement
Code, request-time samples, generated traces, prototype test results and all numerical results are included in the supplementary package (Software S1), which is deposited at Zenodo under the persistent identifier https://doi.org/10.5281/zenodo.24361462. No patient data were used.
Acknowledgments
During the preparation of this work, the authors used Claude Opus 5.5 (Anthropic, model claude-opus-5-5, accessed through the Claude desktop application in October 2026) and ChatGPT (GPT-5; OpenAI) for language editing, drafting of text and proof sketches, literature checks, and implementation and testing of analysis code. The policy model, experiment, validation and plotting scripts of the supplementary package (custody_model.py, scenarios.py, run_experiments.py, validate.py, plot_results.py, plot_architecture.py), the measurement and conversion scripts and the manuscript build scripts were written with the assistance of Claude; the latency measurements of Section 2.7 were run by a script executed in the browser pane of the Claude desktop application on an author’s laptop. The authors reviewed and verified all proofs (Lemmas 1 and 2, Theorem 1, Propositions 1–7 and Appendix B) line by line, re-ran all experiments and checked all references and numerical results, and they take full responsibility for the content of the publication. The revision (additional experiments in revision_experiments.py and make_numbers_rev.py, the native measurement probe, the KEY and KEY+A extension of the C# prototype with its tests, and the revised text and figures) was carried out with Claude Fable 5.2 and Claude Opus 5.5 (Anthropic, models claude-fable-5-2 and claude-opus-5-5, November 2026) under the supervision of the authors.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| CFR | Code of Federal Regulations |
| E2EE | End-to-end encrypted |
| EDPB | European Data Protection Board |
| ePHI | Electronic protected health information |
| EU | European Union |
| GDPR | General Data Protection Regulation |
| HHS | US Department of Health and Human Services |
| HIPAA | Health Insurance Portability and Accountability Act |
| HSM | Hardware security module |
| HTTPS | Hypertext Transfer Protocol Secure |
| IT | Information technology |
| MAC | Message authentication code |
| MILP | Mixed-integer linear programming |
| MLS | Messaging Layer Security |
| RQ | Research question |
| TCP | Transmission Control Protocol |
| TLS | Transport Layer Security |
| VM | Virtual machine |
Appendix A. Additional Tables
Table A1.
Notation.
Table A2.
Requirements related to the model. The mapping indicates which model quantity informs a requirement; it does not establish compliance.
Table A3.
Comparison with the closest approaches.
Table S1 of Software S1 details the representations of Appendix C, and Table S2 of Software S1 details the sensitivity results of Appendix E.
Appendix B. Proof of Proposition 2
The endpoint keeps a durable local record with two slots, Current and Pending, and an outbox. Current holds the committed vector of object versions with their masks or local ciphertext; Pending holds at most one candidate event: the candidate vector, the new masks and the ciphertext to be released. A transition is one of: prepare (write Pending durably), publish (send records of the candidate to the holders), promote (atomically replace Current by Pending, clear Pending, append the ciphertext to the outbox and record an outstanding announcement of the new versions), announce (send the outstanding announcement to every holder that has not acknowledged it, and remove it from the record once all have), release (send the outbox head and remove it after acknowledgment), and recover (after a crash, rebuild the state from the durable record and the relays, and resume announce for any outstanding announcement). Relays delete a version after a later version of the object is announced as current, which the endpoint does only after promote, or after its scheduled expiry (Section 2.3); these deletions are transitions of the relays.
Invariant. In every reachable state: (a) every ciphertext in the outbox or released was produced from a vector that was durably promoted; (b) Current is a complete vector whose generations were acknowledged by all their holders and are kept by them unless they expired, in which case Current is marked unavailable; (c) Pending, if present, refers only to fresh version identifiers.
Safety. The invariant holds initially, with an empty outbox and a Current installed by a completed first publication. Prepare writes only Pending and leaves (a) and (b) unchanged; (c) holds because identifiers are never reused. Publish sends records but changes no local slot. A relay deletes a version only after a later version is announced, which follows promote, so before promote, it never deletes the shares of Current; an expiry of Current marks it unavailable, which (b) allows. Promote happens only after every holder of every changed object has acknowledged, so the new Current satisfies (b), and the atomic write of Current, Pending and outbox together preserves (a). Release reads only the outbox, so a released ciphertext satisfies (a); a crash between sending and removing the outbox head causes the head to be sent again, which the receiver discards as a duplicate by its message number. A crash can interrupt any transition; because each local write is atomic and durable, the record after a crash is the record before or after the interrupted transition. Recover reads that record. An announcement that was recorded by promote but not yet acknowledged by every holder is still in the record, so a crash after promote cannot lose it; recovery resumes announce, and the predecessor’s shares are deleted after each holder receives the announcement. If Pending exists and the durable local record shows that every holder acknowledged it, recovery promotes it, which is the promote transition. Otherwise, it discards Pending; since no announcement followed an unpromoted Pending, the relays still keep the shares of Current, and recovery uses it if its generations are unexpired and marks it unavailable otherwise. Recovery never creates ciphertext; it replays the outbox, so no ciphertext from an unpromoted candidate is released. Expiry only removes options and never authorizes a partial vector. By induction over transitions, the invariant holds in every reachable state.
Liveness. Let Current be the promoted vector after recovery. By (b), its generations are kept by all their holders unless they expired, since no later version is announced during recovery. If t holders of every object respond with unexpired shares, the authenticated metadata identifies the generation of Current at each of them, the shares reconstruct each object, and recovery returns the vector. This proves the proposition.
Remark A1
(Pending candidates and rollback). Proposition 2 assumes that the local record is the device’s own. If the record may be replaced by an older copy, as in capability (v), a copy taken between prepare and promote shows a candidate as unacknowledged although it may have been promoted later. Discarding it then raises a false rollback alarm or returns the predecessor. Recovery therefore adopts a candidate whenever relays hold authenticated records of its version and fewer responders lack it than is possible after a promotion (at most for a key generation, which needs all holders, and fewer than t for an anchor). It completes the publication of an adopted candidate and promotes it, and it refuses recovery while the publication cannot be completed. The liveness part of Proposition 2 then holds only when no adopted candidate is pending or when its holders respond. The C# implementation follows this rule (Section 3.8).
Appendix C. Periodic Key Rotation and Sensitivity of the Comparison
Table 5, Table S1 of Software S1 and Figure A1 give the base policies of the base evaluation, with 10 traces per profile. At the base budgets, KEY needs 745 bytes per 30-day episode in every profile, one key generation at 5 relays with threshold 4, while SEG needs a median of 10.5 kB for the typical patient, 106 kB for the active patient, 1603 kB for remote monitoring and 500 kB for consultation. These amounts are small in absolute terms. Because one key generation covers every message of the episode, base KEY has a higher upper bound on exposed messages than SEG on 40 of the 40 traces by a median factor of 4.9, so the comparison must be made at an equal bound.
Figure A1.
Write payload and relay writes per 30 days by profile for SEG, WHOLE, KEY and KEY+A at the base budgets and for KEY at the upper bound of SEG (KEY, equal bound; median, minimum and maximum over the 10 traces per profile of the base evaluation, without the rollback budget; logarithmic axes).
If KEY must keep its upper bound at or below that of the SEG policy of the same trace but need not detect rollback, it rotates every 30 days on every trace, uses threshold 5 of 7 relays on 38 traces and 4 of 6 on 2, and writes a median of 1.0 kB in every profile. On these 10 traces per profile, SEG then needs 10 to 1537 times as much write payload (medians of the per-trace ratios by profile; the bootstrap intervals of the medians lie between 8.9 and 1542), and 12 to 1538 times on the 200 traces of Section 3.3. This factor holds only under the condition of Section 2.2 that no older local state can be resumed. It is large because SEG writes three objects at every message, while one key generation covers many messages, and it depends strongly on the traffic, the budgets and the residual copies.
A single periodic KEY policy per profile, chosen on the first 5 traces, met the SEG bound on 20 of the 20 held-out traces. Two caveats apply to every comparison at an equal bound. It compares upper bounds, although, on every trace, KEY keeps its upper bound even below the lower bound of SEG, and the two bounds of SEG differ by a median of 12%. It is also risk-neutral: one exposed 30-day key generation reveals every message of the episode, whereas one SEG generation reveals only a few.
The ranking is stable under the sensitivities we ran on two traces per profile: a looser recovery budget ( or 0.05, factor 10 to 1795), no residual copies (, factor 11 to 1619), and latency models built from the second half of the rounds or with independent relays (up to 1795). On the frontier of Figure A2, KEY is feasible wherever SEG is and needs 51 to 2160 times less payload. WHOLE costs 1.6 to 2.3 times as much as SEG for the busy profiles, because every segment change rewrites the full state.
Figure A2.
Write payload needed to reach a given expected number of exposed messages with all other budgets at their base values, for each representation, three profiles and two mean dwell times (sweep over the budget ). Colors and markers identify the representations as in the legend. Each line is the step function through the points of one representation; the dashed lines of WHOLE and KEY+A only distinguish them from the solid lines of SEG and KEY.
Figure A3.
Median payload saving of the joint SEG policy over the best uniform policy (top) and over the reliability-order heuristic (bottom) over 2 traces per profile, in percent, with recovery required in every window. Hatched cells are infeasible for the comparator or for both designs.
Reads change the size of the advantage. With the declared unlock counts, periodic KEY reads 328 kB per 30 days for consultation against 1260 kB for SEG, and SEG needs 4.2 to 72 times as much custody traffic once reads are counted. A clinician device with sessions of 40 typical patients, 5 active patients and one colleague reads 132 kB at every unlock under SEG and 596 bytes under one key for the whole device, which, however, reveals all sessions at once when exposed.
Per-message custody also costs time on the send path. For the consultation policy, the slowest SEG holder adds a median of 364 ms and a 95th percentile of 697 ms on warm connections, and 729 ms and 2036 ms when the connections must be reopened, which is needed for 57% of the consultation writes and for 94 to 100% of the writes of the other profiles. Some holder or its operator is down 0.70% of the time, so on these traces, a median of 3.1 SEG updates per 30-day consultation session and 10.9 readings of a monitoring gateway are blocked until an outage ends, against 0.007 for periodic KEY. Because ciphertext is released only after promotion (Proposition 2), a blocked update delays a message. KEY with rotation at every change writes at every message, so it pays the slowest-holder delay like SEG.
Every holder also learns when the endpoint writes and reads. The probability that some holder of the selected policies, or its operator, meets a compromise episode is 0.081 within the horizon and 0.46 within a year, against 0.017 and 0.12 for a single relay, and one relay breach exposes the records of every enrolled user. Where relay records are protected health information or personal data (Section 4.2), each such event calls for a breach risk assessment under 45 CFR 164.402 [83] and an assessment of notification under Article 33 of the GDPR [11]. Per-relay pseudonymous identifiers, an oblivious proxy and batched or cover reads would reduce what a breach reveals; we did not model them.
Appendix E. Requirements, Non-Response, Topology and Uncertainty
Table S2 of Software S1 collects the sensitivity results for the consultation trace. We begin with the fault requirement. Tolerating one operator plus one further relay, or any two operators, changes the SEG payload by +20%. If operators are ignored during design, the optimizer selects a cheaper policy whose certificate, once evaluated with operator episodes, is 4.4 times the budget. Jurisdiction is the next question. Of the 9 base relays, 3 belong to operators headquartered in the United States. Requiring that no single jurisdiction can reconstruct does not change the SEG policy, whereas requiring the same for any two jurisdictions makes every design infeasible. Restricting the topology to the 5 relays of operators headquartered in the EU also makes every design infeasible, because recovery and installation on these 5 relays leave no threshold that also meets the operator requirement. An EU provider that excludes operators with a parent in the United States therefore needs further EU operators. For the two Kazakh endpoints alone, no design is feasible, with or without the operator requirement. A mixed topology of the two Kazakh endpoints and the first seven base relays, in contrast, is feasible with the operator requirement. SEG needs 559 kB with 5 holders, 1 of them domestic (Yandex Kazakhstan). KEY needs 745 bytes, again, with 5 holders and 1 of them domestic (Yandex Kazakhstan), and KEY+A needs 273 kB with 5 holders, 1 of them domestic (Yandex Kazakhstan). The domestic relays of this topology were measured in the second wave of each round, seconds after the base relays. The only domestic holder these policies use is the Kazakh region of Yandex Cloud, whose website names a Russian company, OOO Yandex.Oblako [84]; the other Kazakh operator, Servercore, states a data center in Almaty but not its corporate parent [85]. The topology therefore depends on that operator being independent of the others, and the legal questions of Section 4.2 remain.
The per-relay unavailability is a declared input, so we vary it. Every representation remains feasible down to a relay availability of 0.995. At 0.99 and 0.985, only KEY and KEY+A remain feasible, and from 0.98, no design is feasible. The binding constraints in this range are recovery and installation rather than exposure. Three changes leave the selected payloads unchanged. The first is a recovery deadline of 3 s. The second adds 20, 50 or 100 ms of service time to every response, as an authenticated read of a stored object would. The third uses installation from warm requests only, as for an application that keeps its connections open. A recovery deadline of 1.5 s, in contrast, makes every design infeasible. With independent relays, it would leave the payloads unchanged, so assuming independence would declare an infeasible deadline feasible.
Lifetimes raise a separate concern. A device that is switched off or offline when a generation reaches its scheduled expiry loses its custodied state (Appendix D), and short lifetimes make this more likely. We therefore required minimum lifetimes for SEG and for the equal-bound KEY policy on 3 traces per profile, keeping the KEY bound at the base SEG bound. We required every lifetime to be at least one day, or at least seven days, which covers a weekend and most absences of a patient. In neither case does the SEG or the KEY payload change on any of the 12 traces, and SEG still needs 10 to 1543 times as much write payload as periodic KEY at an equal upper bound on these 3 traces per profile. The KEY policies rotate every 30 days, and the caps of one hour or one day that some SEG policies use add no writes. The second stage selects these caps only because state loss has no cost in Equation (6), so a deployment can impose a minimum lifetime of a week at no cost here. A minimum lifetime alone does not prevent state loss, however; refreshing at half the lifetime does (Appendix D).
Finally, we consider joint uncertainty. In the uncertainty box, where every rate, dwell time, unavailability, response time and retention is multiplied by up to 1.5, the nominal SEG policy violates the seizure and recovery budgets. No SEG policy on the base topology meets all budgets, and neither does KEY. A compromise that reaches every relay at the declared operator rate of 0.02 per year exposes any policy with probability at least within the horizon, which is above . For the budget to be attainable by any policy, such shocks must stay below 0.0069 per year. The threshold of 0.0056 per year in Section 3.4 is lower because it also deducts the certificate of the KEY policy itself.
Appendix F. Dwell Time, Refresh and the Binding Certificate Term
Long dwell times make refresh nearly useless (Figure A4). For the selected KEY policy, the seizure exposure with instantaneous reads grows by 6 orders of magnitude between a 15 min and a 30-day lifetime. With the base mean dwell, the exposure instead starts from a floor of , which is set by episodes already in progress, and grows only by a factor of 5.9. Dwell also affects the payload. For SEG on the consultation trace, the payload is 447 kB with instantaneous reads, 485 kB at a mean dwell of 14 days and 559 kB at the base, while KEY costs 596 to 1043 bytes where it is feasible. Every design remains feasible at a higher payload, up to the largest mean we evaluated (201 days).
Figure A4.
(a) Seizure exposure of the selected KEY policy against key lifetime for several mean dwell times. (b) Union bound, Hunter term and horizon-window bound for the chain segment of a consultation trace against the age cap, for one-day and base dwell.
Panel (b) of Figure A4 shows why the certificate takes a minimum. With one-day dwell, the Hunter term for the chain segment is 18 times below the horizon bound, because short generations separate the reads of short episodes. With the base dwell, the two bounds differ by a factor of 1.6. The union bound, in contrast, reaches 0.28 at a 5 min cap, because it counts one long episode once per generation. The choice of certificate therefore matters for the decision. If we replace the certificate with the horizon bound alone, the SEG payload rises by up to 13.9%, and with the Hunter term alone, it rises by up to 0.8%. The union bound makes 3 of the 16 budget cells infeasible, whereas the full certificate leaves 0 of them infeasible.
Appendix G. Scaling
Table A4 and Figure A5 report the computation for topologies of 7 to 10 relays. We built them by removing the last two relays of the base topology or by adding a second AWS location. The number of candidates grows from 1218 to 29,190, and the number of possible relay sets doubles with every relay. The number of relay sets with probability above , however, grows from 124 to 587. Catalog generation takes 0.9 s at and 12 s at , and the exact MILP solve takes 0.02 s and 25.49 s at and 10. The optimal payload stays at 559 kB, while the reliability-order heuristic costs 1.2 to 1.6 times as much. On the machine of the submitted evaluation (two cores, 8 GB), 11 relays exceeded the memory. On the server used for the revision (64 cores, 196 GB), one consultation trace was solved on EU topologies of 10 and 11 relays: catalog generation took 25 s and 78 s, the exact MILP took 60 s and 137 s, the best uniform policy reached the same payload, and the additive constraint cost 7% and 7% more. Storing the indicator matrices per holder set and threshold, or in sparse form, would remove most of the memory use. Larger topologies need a coarser truncation of the enumeration of Section 2.5 or a sampled scenario set [45,86].
Table A4.
Computation for growing topologies built from the measured EU endpoints (consultation trace, base budgets). Times of the MILP solve on two cores of a cloud virtual machine, single runs (submitted evaluation); relay sets with probability below are charged as failure; the last column gives the payload of the reliability-order heuristic of Section 3.2, which stores at the largest feasible prefix of the relays ordered by reliability (storing at all nine relays is infeasible); – no feasible policy.
Figure A5.
Computation time against the number of relays (consultation trace, base budgets).
References
- Holmgren, A.J.; Downing, N.L.; Tang, M.; Sharp, C.; Longhurst, C.; Huckman, R.S. Assessing the Impact of the COVID-19 Pandemic on Clinician Ambulatory Electronic Health Record Use. J. Am. Med. Inform. Assoc. 2022, 29, 453–460. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Holmgren, A.J.; Apathy, N.C.; Mehrotra, A.; Chernew, M.E. The Uneven Distribution of Patient Portal Messages Across Patients and Physicians. Health Aff. 2026, 45, 862–870. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Guerra, F.; Linz, D.; Garcia, R.; Kommata, V.; Kosiuk, J.; Chun, J.; Boveda, S.; Duncker, D. Use and Misuse of Instant Messaging in Clinical Data Sharing: The EHRA-SMS Survey. Europace 2021, 23, 1326–1330. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Morris, C.; Scott, R.E.; Mars, M. WhatsApp in Clinical Practice: The Challenges of Record Keeping and Storage. A Scoping Review. Int. J. Environ. Res. Public Health 2021, 18, 13426. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cawthra, J.; Grayson, N.; Pulivarti, R.; Hodges, B.; Kuruvilla, J.; Littlefield, K.; Snyder, J.; Wang, S.; Williams, R.; Zheng, K. Securing Telehealth Remote Patient Monitoring Ecosystem; NIST Special Publication 1800-30; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2022. [Google Scholar] [CrossRef] [Scilit]
- Perrin, T.; Marlinspike, M.; Schmidt, R. The Double Ratchet Algorithm. Signal Specifications, Revision 4. 4 November 2025. Available online: https://signal.org/docs/specifications/doubleratchet/ (accessed on 21 October 2026).
- Alwen, J.; Coretti, S.; Dodis, Y. The Double Ratchet: Security Notions, Proofs, and Modularization for the Signal Protocol. In Advances in Cryptology: EUROCRYPT 2019; LNCS 11476; Springer: Cham, Switzerland, 2019; pp. 129–158. [Google Scholar] [CrossRef] [Scilit]
- Unger, N.; Dechand, S.; Bonneau, J.; Fahl, S.; Perl, H.; Goldberg, I.; Smith, M. SoK: Secure Messaging. In Proceedings of the 2015 IEEE Symposium on Security and Privacy, San Jose, CA, USA, 17–21 May 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 232–249. [Google Scholar] [CrossRef] [Scilit]
- Zinkus, M.; Jois, T.M.; Green, M. SoK: Cryptographic Confidentiality of Data on Mobile Devices. Proc. Priv. Enhancing Technol. 2022, 2022, 586–607. [Google Scholar] [CrossRef] [Scilit]
- Cremers, C.; Fairoze, J.; Kiesl, B.; Naska, A. Clone Detection in Secure Messaging: Improving Post-Compromise Security in Practice. In Proceedings of the 2020 ACM SIGSAC Conference on Computer and Communications Security (CCS ’20); ACM: New York, NY, USA, 2020; pp. 1481–1495. [Google Scholar] [CrossRef] [Scilit]
- Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the Protection of Natural Persons with Regard to the Processing of Personal Data and on the Free Movement of Such Data, and Repealing Directive 95/46/EC (General Data Protection Regulation). OJ L 119, 4.5.2016. p. 1. Available online: https://eur-lex.europa.eu/eli/reg/2016/679/oj (accessed on 21 October 2026).
- 45 CFR Part 164, Subpart C: Security Standards for the Protection of Electronic Protected Health Information. Electronic Code of Federal Regulations. Available online: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-C (accessed on 21 October 2026).
- Shamir, A. How to Share a Secret. Commun. ACM 1979, 22, 612–613. [Google Scholar] [CrossRef] [Scilit]
- Brandão, L.T.A.N.; Mouha, N.; Vassilev, A. Threshold Schemes for Cryptographic Primitives: Challenges and Opportunities in Standardization and Validation of Threshold Cryptography; NISTIR 8214; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2019. [Google Scholar] [CrossRef] [Scilit]
- MacKenzie, P.; Reiter, M.K. Networked Cryptographic Devices Resilient to Capture. In Proceedings of the 2001 IEEE Symposium on Security and Privacy, Oakland, CA, USA, 13–16 May 2001; IEEE: Piscataway, NJ, USA, 2001; pp. 12–25. [Google Scholar] [CrossRef] [Scilit]
- Connell, G.; Fang, V.; Schmidt, R.; Dauterman, E.; Popa, R.A. Secret Key Recovery in a Global-Scale End-to-End Encryption System. In Proceedings of the 18th USENIX Symposium on Operating Systems Design and Implementation (OSDI 24), Santa Clara, CA, USA, 10–12 July 2024; pp. 703–719. Available online: https://www.usenix.org/conference/osdi24/presentation/connell (accessed on 21 October 2026).
- Trapp, N.; Ongaro, D. Juicebox Protocol: Distributed Storage and Recovery of Secrets Using Simple PIN Authentication. Cryptology ePrint Archive, Paper 2025/348, 2025. Available online: https://eprint.iacr.org/2025/348 (accessed on 21 October 2026).
- Davies, G.T.; Faller, S.; Gellert, K.; Handirk, T.; Hesse, J.; Horváth, M.; Jager, T. Security Analysis of the WhatsApp End-to-End Encrypted Backup Protocol. In Advances in Cryptology: CRYPTO 2023; LNCS 14084; Springer: Cham, Switzerland, 2023; pp. 330–361. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ostrovsky, R.; Yung, M. How to Withstand Mobile Virus Attacks. In Proceedings of the 10th Annual ACM Symposium on Principles of Distributed Computing (PODC), Montreal, QC, Canada, 19–21 August 1991; Association for Computing Machinery: New York, NY, USA, 1991; pp. 51–59. [Google Scholar] [CrossRef] [Scilit]
- Herzberg, A.; Jarecki, S.; Krawczyk, H.; Yung, M. Proactive Secret Sharing Or: How to Cope With Perpetual Leakage. In Advances in Cryptology: CRYPTO ’95; LNCS 963; Springer: Berlin/Heidelberg, Germany, 1995; pp. 339–352. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Mandiant (Google Cloud). M-Trends 2026: Data, Insights, and Strategies From the Frontlines. 23 March 2026. Available online: https://cloud.google.com/blog/topics/threat-intelligence/m-trends-2026 (accessed on 21 October 2026).
- Cohn-Gordon, K.; Cremers, C.; Dowling, B.; Garratt, L.; Stebila, D. A Formal Security Analysis of the Signal Messaging Protocol. J. Cryptol. 2020, 33, 1914–1983. [Google Scholar] [CrossRef] [Scilit]
- Bellare, M.; Singh, A.C.; Jaeger, J.; Nyayapati, M.; Stepanovs, I. Ratcheted Encryption and Key Exchange: The Security of Messaging. In Advances in Cryptology: CRYPTO 2017; LNCS 10403; Springer: Cham, Switzerland, 2017; pp. 619–650. [Google Scholar] [CrossRef] [Scilit]
- Jost, D.; Maurer, U.; Mularczyk, M. Efficient Ratcheting: Almost-Optimal Guarantees for Secure Messaging. In Advances in Cryptology: EUROCRYPT 2019; LNCS 11476; Springer: Cham, Switzerland, 2019; pp. 159–188. [Google Scholar] [CrossRef] [Scilit]
- Cohn-Gordon, K.; Cremers, C.; Garratt, L. On Post-Compromise Security. In Proceedings of the 29th IEEE Computer Security Foundations Symposium (CSF), Lisbon, Portugal, 27 June–1 July 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 164–178. [Google Scholar] [CrossRef] [Scilit]
- Barnes, R.; Beurdouche, B.; Robert, R.; Millican, J.; Omara, E.; Cohn-Gordon, K. RFC 9420: The Messaging Layer Security (MLS) Protocol; Internet Engineering Task Force (IETF). 2023. Available online: https://www.rfc-editor.org/info/rfc9420/ (accessed on 18 November 2026). [CrossRef] [Scilit]
- Meta. The Labyrinth Encrypted Message Storage Protocol, Version 1. 6 December 2023. Available online: https://engineering.fb.com/wp-content/uploads/2023/12/TheLabyrinthEncryptedMessageStorageProtocol_12-6-2023.pdf (accessed on 21 October 2026).
- Geambasu, R.; John, J.P.; Gribble, S.D.; Kohno, T.; Levy, H.M. Keypad: An Auditing File System for Theft-Prone Devices. In Proceedings of the Sixth Conference on Computer Systems (EuroSys ’11), Salzburg, Austria, 10–13 April 2011; ACM: New York, NY, USA, 2011; pp. 1–16. [Google Scholar] [CrossRef] [Scilit]
- Tang, Y.; Ames, P.; Bhamidipati, S.; Bijlani, A.; Geambasu, R.; Sarda, N. CleanOS: Limiting Mobile Data Exposure with Idle Eviction. In Proceedings of the 10th USENIX Symposium on Operating Systems Design and Implementation (OSDI 12), Hollywood, CA, USA, 8–10 October 2012; USENIX Association: Berkeley, CA, USA, 2012; pp. 77–91. Available online: https://www.usenix.org/conference/osdi12/technical-sessions/presentation/tang (accessed on 18 November 2026).
- Colp, P.; Zhang, J.; Gleeson, J.; Suneja, S.; de Lara, E.; Raj, H.; Saroiu, S.; Wolman, A. Protecting Data on Smartphones and Tablets from Memory Attacks. In Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’15), Istanbul, Turkey, 14–18 March 2015; ACM: New York, NY, USA, 2015; pp. 177–189. [Google Scholar] [CrossRef] [Scilit]
- Maram, S.K.D.; Zhang, F.; Wang, L.; Low, A.; Zhang, Y.; Juels, A.; Song, D. CHURP: Dynamic-Committee Proactive Secret Sharing. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security (CCS), London, UK, 11–15 November 2019; Association for Computing Machinery: New York, NY, USA, 2019; pp. 2369–2386. [Google Scholar] [CrossRef] [Scilit]
- Dauterman, E.; Corrigan-Gibbs, H.; Mazières, D. SafetyPin: Encrypted Backups with Human-Memorable Secrets. In Proceedings of the 14th USENIX Symposium on Operating Systems Design and Implementation (OSDI 20); USENIX Association: Berkeley, CA, USA, 2020; pp. 1121–1138. [Google Scholar]
- Perlman, R. The Ephemerizer: Making Data Disappear. J. Inf. Syst. Secur. 2005, 1, 51–68. [Google Scholar]
- Geambasu, R.; Kohno, T.; Levy, A.A.; Levy, H.M. Vanish: Increasing Data Privacy with Self-Destructing Data. In Proceedings of the 18th USENIX Security Symposium; USENIX Association: Berkeley, CA, USA, 2009; pp. 299–315. [Google Scholar]
- Krawczyk, H. Secret Sharing Made Short. In Advances in Cryptology: CRYPTO ’93; LNCS 773; Springer: Berlin/Heidelberg, Germany, 1994; pp. 136–146. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Parno, B.; Lorch, J.R.; Douceur, J.R.; Mickens, J.; McCune, J.M. Memoir: Practical State Continuity for Protected Modules. In Proceedings of the 2011 IEEE Symposium on Security and Privacy, Oakland, CA, USA, 22–25 May 2011; IEEE: Piscataway, NJ, USA, 2011; pp. 379–394. [Google Scholar] [CrossRef] [Scilit]
- Matetic, S.; Ahmed, M.; Kostiainen, K.; Dhar, A.; Sommer, D.; Gervais, A.; Juels, A.; Capkun, S. ROTE: Rollback Protection for Trusted Execution. In Proceedings of the 26th USENIX Security Symposium (USENIX Security 17), Vancouver, BC, Canada, 16–18 August 2017; USENIX Association: Berkeley, CA, USA, 2017; pp. 1289–1306. [Google Scholar]
- Nath, S.; Yu, H.; Gibbons, P.B.; Seshan, S. Subtleties in Tolerating Correlated Failures in Wide-area Storage Systems. In Proceedings of the 3rd Symposium on Networked Systems Design and Implementation (NSDI ’06), San Jose, CA, USA, 8–10 May 2006; USENIX Association: Berkeley, CA, USA, 2006; pp. 225–238. [Google Scholar]
- Cidon, A.; Rumble, S.; Stutsman, R.; Katti, S.; Ousterhout, J.; Rosenblum, M. Copysets: Reducing the Frequency of Data Loss in Cloud Storage. In Proceedings of the 2013 USENIX Annual Technical Conference (USENIX ATC 13), San Jose, CA, USA, 26–28 June 2013; USENIX Association: Berkeley, CA, USA, 2013; pp. 37–48. [Google Scholar]
- Reardon, J.; Basin, D.; Capkun, S. SoK: Secure Data Deletion. In Proceedings of the 2013 IEEE Symposium on Security and Privacy, Berkeley, CA, USA, 19–22 May 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 301–315. [Google Scholar] [CrossRef] [Scilit]
- Pillai, T.S.; Chidambaram, V.; Alagappan, R.; Al-Kiswany, S.; Arpaci-Dusseau, A.C.; Arpaci-Dusseau, R.H. All File Systems Are Not Created Equal: On the Complexity of Crafting Crash-Consistent Applications. In Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14), Broomfield, CO, USA, 6–8 October 2014; USENIX Association: Berkeley, CA, USA, 2014; pp. 433–448. [Google Scholar]
- Charnes, A.; Cooper, W.W. Chance-Constrained Programming. Manag. Sci. 1959, 6, 73–79. [Google Scholar] [CrossRef] [Scilit]
- Nemirovski, A.; Shapiro, A. Convex Approximations of Chance Constrained Programs. SIAM J. Optim. 2007, 17, 969–996. [Google Scholar] [CrossRef] [Scilit]
- Calafiore, G.; Campi, M.C. Uncertain Convex Programs: Randomized Solutions and Confidence Levels. Math. Program. 2005, 102, 25–46. [Google Scholar] [CrossRef] [Scilit]
- Luedtke, J.; Ahmed, S. A Sample Approximation Approach for Optimization with Probabilistic Constraints. SIAM J. Optim. 2008, 19, 674–699. [Google Scholar] [CrossRef] [Scilit]
- Hunter, D. An Upper Bound for the Probability of a Union. J. Appl. Probab. 1976, 13, 597–603. [Google Scholar] [CrossRef] [Scilit]
- Mohajerin Esfahani, P.; Kuhn, D. Data-Driven Distributionally Robust Optimization Using the Wasserstein Metric: Performance Guarantees and Tractable Reformulations. Math. Program. 2018, 171, 115–166. [Google Scholar] [CrossRef] [Scilit]
- Campi, M.C.; Garatti, S. The Exact Feasibility of Randomized Solutions of Uncertain Convex Programs. SIAM J. Optim. 2008, 19, 1211–1230. [Google Scholar] [CrossRef] [Scilit]
- Künsch, H.R. The Jackknife and the Bootstrap for General Stationary Observations. Ann. Stat. 1989, 17, 1217–1241. [Google Scholar] [CrossRef] [Scilit]
- Shannon, C.E. Communication Theory of Secrecy Systems. Bell Syst. Tech. J. 1949, 28, 656–715. [Google Scholar] [CrossRef] [Scilit]
- Android Developers. Android Keystore System. Available online: https://developer.android.com/privacy-and-security/keystore (accessed on 18 October 2026).
- Gueron, S.; Langley, A.; Lindell, Y. RFC 8452: AES-GCM-SIV: Nonce Misuse-Resistant Authenticated Encryption. Internet Research Task Force (IRTF). 2019. Available online: https://www.rfc-editor.org/info/rfc8452/ (accessed on 18 November 2026). [CrossRef] [Scilit]
- Ross, S.M. Stochastic Processes, 2nd ed.; John Wiley & Sons: New York, NY, USA, 1996. [Google Scholar]
- Eick, S.G.; Massey, W.A.; Whitt, W. The Physics of the Mt/G/∞ Queue. Oper. Res. 1993, 41, 731–742. [Google Scholar] [CrossRef] [Scilit]
- Worsley, K.J. An Improved Bonferroni Inequality and Applications. Biometrika 1982, 69, 297–302. [Google Scholar] [CrossRef]
- Luedtke, J.; Ahmed, S.; Nemhauser, G.L. An Integer Programming Approach for Linear Programs with Probabilistic Constraints. Math. Program. 2010, 122, 247–272. [Google Scholar] [CrossRef] [Scilit]
- Huangfu, Q.; Hall, J.A.J. Parallelizing the Dual Revised Simplex Method. Math. Program. Comput. 2018, 10, 119–142. [Google Scholar] [CrossRef] [Scilit]
- Virtanen, P.; Gommers, R.; Oliphant, T.E.; Haberland, M.; Reddy, T.; Cournapeau, D.; Burovski, E.; Peterson, P.; Weckesser, W.; Bright, J.; et al. SciPy 1.0: Fundamental Algorithms for Scientific Computing in Python. Nat. Methods 2020, 17, 261–272. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Paxson, V. Strategies for Sound Internet Measurement. In Proceedings of the 4th ACM SIGCOMM Conference on Internet Measurement (IMC ’04), Taormina, Italy, 25–27 October 2004; ACM: New York, NY, USA, 2004; pp. 263–271. [Google Scholar] [CrossRef] [Scilit]
- Huang, J.; Qian, F.; Gerber, A.; Mao, Z.M.; Sen, S.; Spatscheck, O. A Close Examination of Performance and Power Characteristics of 4G LTE Networks. In Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services (MobiSys ’12), Windermere, UK, 25–29 June 2012; ACM: New York, NY, USA, 2012; pp. 225–238. [Google Scholar] [CrossRef] [Scilit]
- Dean, J.; Barroso, L.A. The Tail at Scale. Commun. ACM 2013, 56, 74–80. [Google Scholar] [CrossRef] [Scilit]
- Amazon Web Services. Amazon Compute Service Level Agreement. Last Updated 25 May 2022. Available online: https://aws.amazon.com/compute/sla/ (accessed on 21 October 2026).
- ISO 27799:2025; Health Informatics: Information Security Controls in Health Based on ISO/IEC 27002. International Organization for Standardization: Geneva, Switzerland, 2025. Available online: https://www.iso.org/standard/84647.html (accessed on 21 October 2026).
- QEMU Project. System Emulation: Invocation. Available online: https://www.qemu.org/docs/master/system/invocation.html (accessed on 18 October 2026).
- Health Level Seven International. FHIR Security. FHIR Release 5, version 5.0.0. Available online: https://hl7.org/fhir/R5/security.html (accessed on 18 October 2026).
- IEC 80001-1:2021; Application of Risk Management for IT-Networks Incorporating Medical Devices, Part 1: Safety, Effectiveness and Security in the Implementation and Use of Connected Medical Devices or Connected Health Software. International Electrotechnical Commission: Geneva, Switzerland, 2021. Available online: https://webstore.iec.ch/en/publication/34263 (accessed on 21 October 2026).
- IEC 81001-5-1:2021; Health Software and Health IT Systems Safety, Effectiveness and Security, Part 5-1: Security, Activities in the Product Life Cycle. International Electrotechnical Commission: Geneva, Switzerland, 2021. Available online: https://webstore.iec.ch/en/publication/63293 (accessed on 21 October 2026).
- ECLI:EU:C:2016:779; Judgment of the Court (Second Chamber) of 19 October 2016, Patrick Breyer v Bundesrepublik Deutschland, Case C-582/14. Court of Justice of the European Union: Luxembourg, 2016. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62014CJ0582 (accessed on 21 October 2026).
- European Data Protection Board. Guidelines 01/2025 on Pseudonymisation, Version for Public Consultation; Adopted on 16 January 2025. Available online: https://www.edpb.europa.eu/system/files/2025-01/edpb_guidelines_202501_pseudonymisation_en.pdf (accessed on 21 October 2026).
- ECLI:EU:C:2025:645; Judgment of 4 September 2025, European Data Protection Supervisor v Single Resolution Board, Case C-413/23 P. Court of Justice of the European Union: Luxembourg, 2025. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:62023CJ0413 (accessed on 21 October 2026).
- U.S. Department of Health and Human Services, Office for Civil Rights. Guidance on HIPAA & Cloud Computing. Content Last Reviewed 23 December 2022. Available online: https://www.hhs.gov/hipaa/for-professionals/special-topics/health-information-technology/cloud-computing/index.html (accessed on 21 October 2026).
- 45 CFR 160.103, Definitions (Business Associate). Electronic Code of Federal Regulations. Available online: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-160/subpart-A/section-160.103 (accessed on 21 October 2026).
- 45 CFR 164.502(e), Standard: Disclosures to Business Associates. Electronic Code of Federal Regulations. Available online: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-E/section-164.502 (accessed on 21 October 2026).
- 45 CFR 164.504(e), Standard: Business Associate Contracts. Electronic Code of Federal Regulations. Available online: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-E/section-164.504 (accessed on 21 October 2026).
- European Data Protection Board. Recommendations 01/2020 on Measures That Supplement Transfer Tools to Ensure Compliance with the EU Level of Protection of Personal Data, Version 2.0; Adopted on 18 June 2021. Available online: https://www.edpb.europa.eu/system/files/documents/2021-06/edpb_recommendations_202001vo.2.0_supplementarymeasurestransferstools_en.pdf (accessed on 21 October 2026).
- Law of the Republic of Kazakhstan of 21 May 2013 No. 94-V “On Personal Data and Their Protection” (as Amended up to 14 September 2026). Adilet Legal Information System of Regulatory Legal Acts of the Republic of Kazakhstan. Available online: https://adilet.zan.kz/rus/docs/Z1300000094_ (accessed on 21 October 2026).
- Law of the Republic of Kazakhstan of 24 June 2026 No. 326-VIII “On Amendments and Additions to Certain Legislative Acts of the Republic of Kazakhstan on Digitalization, Personal Data Protection, Road Traffic and Regulation of Advanced Technologies in Transport”. Adilet Legal Information System of Regulatory Legal Acts of the Republic of Kazakhstan. Available online: https://adilet.zan.kz/rus/docs/Z2600000326 (accessed on 21 October 2026). (In Russian)
- Dodis, Y.; Katz, J.; Xu, S.; Yung, M. Key-Insulated Public Key Cryptosystems. In Advances in Cryptology, EUROCRYPT 2002; Knudsen, L.R., Ed.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2002; Volume 2332, pp. 65–82. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schultz, D.; Liskov, B.; Liskov, M. MPSS: Mobile Proactive Secret Sharing. ACM Trans. Inf. Syst. Secur. 2010, 13, 1–32. [Google Scholar] [CrossRef] [Scilit]
- Rabin, M.O. Efficient Dispersal of Information for Security, Load Balancing, and Fault Tolerance. J. ACM 1989, 36, 335–348. [Google Scholar] [CrossRef] [Scilit]
- Resch, J.K.; Plank, J.S. AONT-RS: Blending Security and Performance in Dispersed Storage Systems. In Proceedings of the 9th USENIX Conference on File and Storage Technologies (FAST 11), San Jose, CA, USA, 15–17 February 2011; USENIX Association: Berkeley, CA, USA, 2011. [Google Scholar]
- Mills, K.A.; Chandrasekaran, R.; Mittal, N. Algorithms for Optimal Replica Placement under Correlated Failure in Hierarchical Failure Domains. Theor. Comput. Sci. 2020, 809, 482–518. [Google Scholar] [CrossRef] [Scilit]
- 45 CFR Part 164, Subpart D: Notification in the Case of Breach of Unsecured Protected Health Information. Electronic Code of Federal Regulations. Available online: https://www.ecfr.gov/current/title-45/subtitle-A/subchapter-C/part-164/subpart-D (accessed on 25 October 2026).
- Yandex Cloud. Yandex Cloud Opens New Data Center in Kazakhstan. Yandex Cloud Blog. 10 April 2024. Available online: https://yandex.cloud/en/blog/posts/2024/04/yandex-cloud-in-kazakhstan (accessed on 21 October 2026).
- Servercore. Meet Servercore. Available online: https://servercore.com/about-us/ (accessed on 22 October 2026).
- Pagnoncelli, B.K.; Ahmed, S.; Shapiro, A. Sample Average Approximation Method for Chance Constrained Programming: Theory and Applications. J. Optim. Theory Appl. 2009, 142, 399–416. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.






