How to Compartment Secrets

. Secret sharing splits a secret s into (cid:96) shares in such a way that k ≤ (cid:96) shares suﬃce to reconstruct s . Let ρ i,j be the probability that shareholder i disclose their share to shareholder j , with 0 ≤ i, j < n . Given k ≤ (cid:96) ≤ n , to whom (cid:96) individuals should we hand shares, if we wish to minimize the probability that one of them reconstitutes s ?


Introduction
Queen Elizabeth I stated "Do not tell secrets to those whose faith and silence you have not already tested".Given the relative faith in the audience, how can we calculate the overall disclosure risk?This paper provides an answer to this question.
Secret sharing splits a secret s into "shares", distributed among n participants.Under certain conditions -the sharing scheme's access structure -this secret s can be reconstructed (e.g. from enough shares).In the simplest case, we may require all shares to be combined [Sha79,Mig82,Bla79].A more interesting access structure requires that at least k shares among n are required.Constructions for different access structures are known [DD94].
In this paper we are given a table: where ρ i,j is the probability that shareholder i will leak their share to shareholder j.Because of this leakage mechanism, it is possible that eventually one of the shareholders gets enough shares to reconstruct s.Our goal is to evaluate the probability p col that any third party's reconstructs s, an event called "collapse".The most general setting, where we can produce exactly shares, is motivated by a real-life data escrow scenario: given n data centers we wish to select of them to hold shares of a k-out-of-secret sharing, so that collapse probability is minimal.However, as we will discuss below this is a challenging problem, that is best approached in several steps.We therefore discuss two simplified versions of the problem first: The optimal strategy resides in the access structure.To see why, consider the simplest n-out-of-n setting in which all shares are necessary recover s.
The optimal choice in this situation (assuming 0 < ρ i,j < 1) is to give a share to everyone.The proof is immediate: adding a share to the game multiplies collapse probability by a factor < 1; p col can be computed with the tools of section 2.
• ρ i,j ∈ {0, 1}: Given n, ρ, compute p col and potentially avoid giving shares to participants not affecting p col .
The case ρ i,j ∈ {0, 1} allows a more parsimonious distribution of shares: we distribute a share per strongly-connected component of the graph defined by ρ i,j .Thus the general problem can be solved by condensing the graph (this is done in linear time) and handing a share to each representative of a stronglyconnected component.If there are fewer shares than connected components, we have p col = 0.If there are more, then depending on k we can have p col = 0 or 1.This process is detailed in section 3.

Notations and Hypotheses
Let n > 2 be the number of possible shareholders.Let [n] denote the set {0, . . ., n− 1}.The cardinality of a set X is denoted |X|.If p is a probability, we write p = 1 − p. U i will denote shareholder i.
For any i, j ∈ [n] we denote by ρ i,j the probability that U i shares all he knows with U j .We say in that case that U i and U j collude.Collusion is transitive: U i can send its share x i to U j , who then transmits it (along with x j ) to U -even if U i and U abstain from direct interactions.Note that ρ i,j may differ from ρ j,i .

Collapse Probability
In this section we explain how to compute the collapse probability, defined as the probability that at least one shareholder can reconstruct the secret (e.g. by gathering enough shares).
Definition 1 (Saturation, G ± ).A labeled directed graph G is saturated if all labels are equal to 1. Saturated graphs are in one-to-one correspondence with unlabeled directed graphs.We say that an edge is saturated if it is labeled 1, and is unsaturated otherwise.Unsaturated edges of G can be ordered (e.g. by lexicographic order), and we denote by G +(i→j) (resp.G −(i→j) ) the graph obtained by saturating (resp.removing) the first unsaturated edge of G, denoted i → j.
Definition 2 (Evaluation at a Random Graph).Let f be a function taking as input a directed graph and returning an element in some (fixed) vector space.Let G be a labeled directed graph, with edges labels in [0, 1].We define for the unsaturated edge i → j labeled i,j which we call the evaluation of f at G.
Definition 3 (Root-Directed Spanning Tree).Let G be a directed graph.
G has a Root-Directed Spanning Tree (RDST) if there is a vertex R such that, for every other vertex S, G has a directed path from S vertex to R.
Remark 1.Note that if G has an RDST, then G is connected, so that connectivity is a necessary condition.Note also that if G is strongly connected, then it has an RDST, so that strong-connectivity is a sufficient condition.Both properties can be established in linear time.
Note that G has this property if and only if G • has it, so that without loss of generality we may assume we are working on a condensed graph.Such a graph is acyclic which makes it possible to logarithmically check efficiently the presence of an RDST.
Example 1 ((n, n)-secret sharing).The (n, n)-collapse function L (n,n) takes a directed acyclic graph G as input, and returns 1 if G has a root-directed spanning tree, and 0 otherwise.Therefore, collapse probability for this access structure only depends on the graph ρ defined by the values of ρ i,j , and is p Example 2 ((n, n)-secret sharing, n = 3).Consider n = 3 and write a = ρ 0,1 , b = ρ 1,2 , c = ρ 2,0 all other probabilities being 0. The collapse probability is p col = ab + bc + ca − 2abc.Note that the expression is symmetric in a, b, c, and 0 ≤ p col ≤ 1.A worked-out computation is given in appendix A.
The following remark gives a computer-friendly representation of p col : Remark 2. Let e 1 , e 2 , . . ., e be the edges' labels in G, and for any -bit string Then any collapse probability is of the form where X is a set of -bit strings, corresponding to edge saturations associated with an RDST graph.In equation 2, with e i = (a, b, c), we have X = {011, 101, 110, 111}.
3 Optimal Solution when ρ ∈ {0, 1} The minimal collapse probability is achieved when every participant has a share.It is possible to be slightly more efficient using the following notion: Definition 4 (Condensation).Let G be a directed graph.A strongly connected component of G is a sub-graph in which there is a path in each direction between each pair of vertices.The condensation of G is the directed acyclic graph G • obtained by contracting strongly connected components.
We apply condensation to the graph G whose vertices are [n] and whose edges are those edges (i → j) such that ρ i,j = 1.Tarjan's algorithm [Tar72] computes the condensation of a graph in O(n + e), where n is the number of vertices and e the number of edges, i.e. e = |{i, j ∈ [n] | i = j, ρ i,j = 1}|.By design, all elements in an equivalence class have exactly the same knowledge (they share their knowledge with probability 1).Thus it suffices to give a share per representative of each equivalence class, and the optimal solution is attained by giving a share to every vertex in G • (which is at most n).Henceforth, we denote by n the number of vertices in the condensed graph, unless stated otherwise.
If there are fewer shares than connected components, we have p col = 0.If there are more, then we attempt to distribute them uniformly.Let g denote the number of strongly-connected components in G • , then if /g < k we have p col = 0. Otherwise p col = 1.

Optimal Solution for Monotone Secret Sharing
In threshold secret sharing, the secret is recovered as soon as any k shares among n are known.Recent work [BDIR18] shows that high-threshold instances of Shamir's secret sharing scheme are secure against local leakage when the underlying field is of a large prime order and the number of parties is sufficiently large. 4s mentioned in the introduction, the minimal collapse probability is achieved when k = n; in some settings there exists a value k < n with the same leakage probability.

Definition 5 (Access Structure). An access structure on [n] is a predicate on subsets of [n].
A secret sharing scheme has access structure P if it allows reconstructing s for any subset of [n] satisfying P , and does not allow reconstruction for any subset not satisfying P .This generalizes the threshold construction discussed previously, which corresponds to P : S → (|S| ≤ k).
In particular, threshold access structures are monotone; the argument made that a minimal leakage probability is achieved by handing shares to all participants applies immediately to monotone access structures.

Finding Optimal Strategies
Exact computation of p col .The algorithmic complexity of computing L on a graph with n vertices is O 2 n 2 using a direct implementation of the recursive algorithm corresponding to definition 2. Indeed there are n(n − 1)/2 edges to consider and each of them leads to a twofold branch in the evaluation of L. Using classical memorization techniques is it possible to reduce this cost.This is illustrated in the explicit computation of appendix A.
Optimal Strategy.The previous algorithm gives a computable (if inefficient) way to find optimal strategies for small graphs, by exhausting subsets of {1, . . ., n} of size and computing the collapse probability for each of them.In the simplest case, k = = n, there are n such subsets to be tested, whereas in the worst case, k ≈ n/2 there are of the order of 2 2n .As a result, in practice it becomes intractable to compute general solutions for n > 6.

Heuristic Solutions
Sampling heuristic.One heuristic argument consists in replacing all probabilities in ρ by the nearest integer (0 or 1), so that the efficient algorithm in that case can be used.We propose a slightly more refined approach: let 0 < η < 1 and h η the function that sends x to 0 if x ≤ η and 1 otherwise.Applying h η entrywise to ρ with η = 0.5 we fall back on the previous heuristic.For every value of η, we get a certain partition of the resulting graph G into strongly connected components.We are then interested in those components that are stable as we vary η.Indeed, any chose of η corresponds to an over-or an underestimation of the true leakage probabilities.We may assume η ∈ {i/m | i = 1, 2, . . ., m − 1} for some integer m, consider the graphs G η resulting from applying h η to ρ, and rank the vertices in G by the number of strongly-connected components that they belong to as we vary η.A vertex that remained in a single component all along ("stable") will be given many shares, whereas a vertex that often switched components ("unstable") will be given fewer shares, if any.
Furthermore, for every value of η, we get a collapse probability p η ∈ {0, 1}: by averaging these values we can hope to obtain an approximation p ≈ = E η [p η ] of the true collapse probability p col .
Future Work.The problem as stated is motivated by a distributed storage scenario; a "non-monotone" access structure [LMC15] may allow for a thriftier distribution of shares, assuming it is computationally difficult for the adversary to test all subsets of the shares they have collected.
Complementary to our work, but beyond the scope considered here, is the question of obtaining a reasonable estimate for the matrix ρ -what does this matrix look like in the real world?-as well as the consequences of having imperfect knowledge of this matrix on the predicted results.For instance, in the explicit computation of appendix A, an uncertainty δ in the values of (a, b, c) results in an uncertainty O(δ 2 ) in p col .Can this be treated in more generality?
There are also several interesting directions in which it would make sense to extend our model, which may lead to simplifications.For instance, restrictions to some families of structured graphs (e.g.grids) may allow for more efficient algorithms (or even closed-form expressions, although that seems unlikely).Alternatively, rather than minimising secret reconstruction, we may wish to maximise it, maybe only for a selected subset of shareholders.
Finally, precise bounds on the heuristic algorithm's errors (or maybe, better approximation algorithms) are needed.
A Detailed Computation For (3, 3) We denote [XYZ] = L(graph[XYZ]) for the following graphs: The collapse probability is:

B Detailed Computation With The Heuristic Algorithm
We apply the heuristic algorithm to the same graph as in the previous section.
The collapse probability is 1 whenever any two edges are saturated, and 0 otherwise.In other terms, using that Pr