Reduction Theorem for Secrecy over Linear Network Code for Active Attacks

We discuss the effect of sequential error injection on information leakage under a network code. We formulate a network code for the single transmission setting and the multiple transmission setting. Under this formulation, we show that the eavesdropper cannot increase the power of eavesdropping by sequential error injection when the operations in the network are linear operations. We demonstrated the usefulness of this reduction theorem by applying a concrete example of network.


I. INTRODUCTION
Secure network coding offers a method for securely transmitting information from an authorized sender to an authorized receiver.Cai and Yeung [1] discussed the secrecy when the malicious adversary, Eve, wiretaps a subset E E of the set E of all the channels in a network.Using the universal hashing lemma [2], [3], [4], the papers [5], [6] showed the existence of a secrecy code that works universally for any type of eavesdropper when the cardinality of E E is bounded.In addition, the paper [7] discussed the construction of such a code.As another type of attack on information transmission via a network, a malicious adversary contaminates the communication by changing the information on a subset E A of E. Using an error correction, the papers [8], [9], [10], [11] proposed a method to protect the message from contamination.That is, we require that the authorized receiver correctly recovers the message, which is called robustness.
As another possibility, we consider the case when the malicious adversary combines eavesdropping and contamination.That is, contaminating a part of the channels, the malicious adversary might improve the ability of eavesdropping while a This works was supported in part by the Japan Society of the Promotion of Science (JSPS) Grant-in-Aid for Scientific Research (B) Grant 16KT0017 and for Scientific Research (A) Grant 17H01280 and for Scientific Research (C) Grant 16K00014 and No. 17K05591, in part by the Okawa Research Grant, and in part by the Kayamori Foundation of Informational Science Advancement.The material in this paper was presented in part at the 2017 IEEE International Symposium on Information Theory (ISIT 2017), Aachen (Germany), 25-30 June 2017 [33].
Masahito Hayashi is with the Graduate School of Mathematics, Nagoya University, Nagoya, 464-8602, Japan.He is also with Shenzhen Institute for Quantum Science and Engineering, Southern University of Science and Technology, Shenzhen, 518055, China, Center for Quantum Computing, Peng Cheng Laboratory, Shenzhen 518000, China, and the Centre for Quantum Technologies, National University of Singapore, 3 Science Drive 2, 117542, Singapore (e-mail:masahito@math.nagoya-u.ac.jp).Masaki Owari is with Department of Computer Science, Faculty of Informatics, Shizuoka University, Japan (e-mail:masakiowari@inf.shizuoka.ac.jp).Go Kato is with NTT Communication Science Laboratories, NTT Corporation, Japan (email:kato.go@lab.ntt.co.jp).Ning Cai is with the School of Information Science and Technology, ShanghaiTech University, Middle Huaxia Road no 393, Pudong, Shanghai 201210, China (e-mail: ningcai@shanghaitech.edu.cn).
parallel network offers no such a possibility [12], [13], [14].In fact, in arbitrarily varying channel model, noise injection is allowed after Eve's eavesdropping, but Eve does not eavesdrop the channel after Eve's noise injection [15], [16], [17], [19] [18, Table I].The paper [21] also discusses secrecy in the same setting while it addresses the network model.The studies [7], [20] discussed the secrecy when Eve eavesdrops the information transmitted on the channels in E E after noises are injected in E A , but they assume that Eve does not know the information of the injected noise.The paper [21] discusses secrecy only for a passive attack.
In contrast, this paper focuses on network, and discusses the secrecy when Eve adds artificial information to the information transmitted on the channels in E A , eavesdrops the information transmitted on the channels in E E , and estimates the original message from the eavesdropped information and the information of the injected noises.We call this type of attack an active attack and call an attack without contamination a passive attack.Specially, we call each of Eve's active operations a strategy.When E A ⊂ E E and any active attack is available for Eve, she is allowed to arbitrarily modify the information on the channels in E A sequentially based on the obtained information.
This paper aims to show a reduction theorem for an active attack, i.e., the fact that no strategy can improve Eve's information when every operation in the network is linear and Eve's contamination satisfies a natural causal condition.When the network is not well synchronized, Eve can make an attack across several channels.This reduction theorem holds even under this kind of attack.In fact, there is an example having a non-linear node operation such that Eve can improve her performance to extract information from eavesdropping an edge outgoing an intermediate node by adding artificial information to an edge incoming the intermediate node [32].This example shows the necessity of linearity for this reduction theorem.Although our discussion can be extended to the multicast and multiple-unicast cases, for simplicity, we consider the unicast setting in the following discussion.
Further, we apply our general result to the analysis of a concrete example of a network.In this network, we demonstrate that any active attack cannot improve the performance of eavesdropping.However, in the single transmission case over the finite field F 2 , the error correction and the error detection is impossible over this contamination.To resolve this problem, this paper addresses the multiple transmission case in addition to the single transmission case.In the multiple transmission case, the sender uses the same network multiple times, and the topology and dynamics of the network do arXiv:2003.11722v1[cs.IT] 26 Mar 2020 not change during these transmissions.While several papers discussed this model, many of them discussed the multiple transmission case only with contamination [23], [24], [25] or eavesdropping [5], [6].Only the paper [21] addressed it with contamination and eavesdropping, i.e., it assumed that all contaminations are done after eavesdropping.We formulate the multiple transmission case when each transmission has no correlation with the previous transmission while injected noise might have such a correlation.Then, we show the above type of reduction theorem for an active attack even under the multiple transmission case.We apply this result to the multiple transmission over the above example of a network, in which, the error correction and the error detection are possible over this contamination.Hence, the secrecy and the correctness hold in this case.
The remaining part of this paper is organized as follows.Section II discusses only the single transmission setting that has only a single transmission and Section III does the multiple transmission setting that has n transmissions.Two types of multiple transmission settings are formulated.Then, we state our reduction theorem in both settings.In Section IV, we state the conclusion.

A. Generic model
In this subsection, we give a generic model, and discuss its relation with a concrete network model in the latter subsections.We consider the unicast setting of network coding on a network.Assume that the authorized sender, Alice, intends to send information to the authorized receiver, Bob, via the network.Although the network is composed of m 1 edges and m 2 vertecies, as shown in later, the model can be simplified as follows when the node operations are linear.We assume that Alice inputs the input variable X in F m3 q and Bob receives the output variable Y B in F m4 q , where F q is a finite field whose order is a power q of the prime p.We also assume that the malicious adversary, Eve, wiretaps the information Y E in F m6 q 1 .Then, we adopt the model with matrices K B ∈ F m4×m3 q and K E ∈ F m6×m3 q , in which,the variables X, Y B , and Y E satisfy their relations This attack is a conventional wiretap model and is called a passive attack to distinguish an active attack, which will be introduced later.Section II-B will explain how this model is derived from a directed graph with E E and linear operations on nodes.
In this paper, we address a stronger attack, in which, Eve injects noise Z ∈ F m5 q .Hence, using matrices H B ∈ F m4×m5 q and H E ∈ F m6×m5 q , we rewrite the relations (1) as which is called a wiretap and addition model.
Although a part of Y E is a function of α i , this 1 In this paper, we denote the vector on Fq by a bold letter.But, we use a non-bold letter to describe a scalar and a matrix.
point does not make a problem for causality, as explained in Section II-D.In this paper, when a vector has the j-th component x j , the vector is written as [x j ] 1≤j≤a , where the subscript 1 ≤ j ≤ a expresses the range of the index j.Thus, the set α = [α i ] 1≤i≤m5 of the functions can be regarded as Eve's strategy, and we call this attack an active attack with a strategy α.That is, an active attack is identified by a pair of a strategy α and a wiretap and addition model decided by K, H. Here, we treat K B , K E , H B , and H E as deterministic values, and denote the pairs (K B , K E ) and (H B , H E ) by K and H, respectively.Hence, our model is written as the triplet (K, H, α).As shown in the latter subsections, under the linearity assumption on the node operations, the triplet (K, H, α) is decided from the network topology (a directed graph with E A and E E ) and dynamics of the network.Here, we should remark that the relation ( 2) is based on the linearity assumption for node operations.Since this assumption is the restriction for the protocol, it does not restrict the eavesdropper's strategy.We impose several types for regularity conditions for Eve's strategy α, which are demanded from causality.Notice that α i is a function of the vector [Y E,j ] 1≤j≤m6 .Now, we take the causality with respect to α into account.Here, we assume that the assigned index i for 1 ≤ i ≤ m 5 expresses the timeordering of injection.That is, we assign the index i for 1 ≤ i ≤ m 5 according to the order of injections.Hence, we assume that α i is decided by a part of Eve's observed variables.We say that subsets w i ⊂ {1, . . ., m 6 } for i ∈ {1, . . ., m 5 } are the domain index subsets for α when the function α i is given as a function of the vector [Y E,j ] j∈wi .Here, the notation j ∈ w i means that the j-th eavesdropping is done before the i-th injection, i.e., w i expresses the set of indexes corresponding to the symbols that do effect the i-th injection.Hence, the eavesdropped symbol Y E,j does not depend on the injected symbol z i for j ∈ w i .Since the decision of the injected noise does not depend on the consequences of the decision, we introduce the following causal condition.Definition 1.We say that the domain index subsets {w i } 1,...,m5 satisfy the causal condition when the following two conditions hold; (A1) The relation H E;j,i = 0 holds for j ∈ w i .(A2) The relation w 1 ⊆ w 2 ⊆ . . .⊆ w m5 holds.
As a necessary condition of the causal condition, we introduce the following uniqueness condition for the function α i , which is given as a function of the vector [Y E,j ] 1≤j≤m6 .Definition 2. For any value of x, there uniquely exists y ∈ F m6 q such that y = K E x + H E α(y). ( This condition is called the uniqueness condition for α.
Examples of a network with w i , [H E;j,i ] i,j will be given in Subsection II-E.Then, we have the following lemma.
Lemma 1.When a strategy α has domain index subsets to satisfy the causal condition, the strategy α satisfies the uniqueness condition.
Proof: When the causal condition holds, we show the fact that y j is given as a function of K E x for any j ∈ w i by induction with respect to the index i = 1, . . ., m 5 , which expresses the order of the injected information.This fact yields the uniqueness condition.
For j ∈ w 1 , we have y j = (K E x) j because (H E α(y)) j is zero.Hence, the statement with i = 1 holds.We choose j ∈ w i+1 \ w i .Let z i be the i -th injected information.Due to Conditions (A1) and (A2), Since the assumption of the induction guarantees that z 1 , . . ., z i are functions of [y j ] j ∈wi , z 1 , . . ., z i are functions of K E x.Then, we find that y j = (K E x) j + (H E z) j is given as a function of K E x for any j ∈ w i+1 \ w i .That is, the strategy α satisfies the uniqueness condition.Now, we have the following reduction theorem.
Theorem 1 (Reduction Theorem).When the strategy α satisfies the uniqueness condition, Eve's information Y E (α) with strategy α can be calculated from Eve's information Y E (0) with strategy 0 (the passive attack), and Y E (0) is also calculated from Y E (α).Hence, we have the equation I(X; Y E )[α] expresses the mutual information between X and Y E under the strategy α.
due to the uniqueness condition of the strategy α, we can uniquely evaluate Y E (α) from Y E (0) = K E X and α.Therefore, we have and H E , we have the opposite inequality.
This theorem shows that the information leakage of the active attack with the strategy α is the same as the information leakage of the passive attack.Hence, to guarantee the secrecy under an arbitrary active attack, it is sufficient to show secrecy under the passive attack.However, there is an example of non-linear network such that this kind of reduction does not hold [32].In fact, even when the network does not have synchronization so that the information transmission on an edges starts before the end of the information transmission on the previous edge, the above reduction theorem hold under the uniqueness condition.

B. Construction of K B , K E from concrete network model
Next, we discuss how we can obtain the generic passive attack model (1) from a concretely structured network cod-ing, i.e. communications identified by directed edges and linear operations by parties identified by nodes.We consider the unicast setting of network coding on a network, which is given as a directed graph (V, E), where the set V := {v(1), . . ., v(m 2 )} of vertices expresses the set of nodes and the set E := {e(1), . . ., e(m 1 )} of edges expresses the set of communication channels, where a communication channel means a packet in network engineering, i.e., a single communication channel can transmit single character in F q .In the following, we identify the set E with {1, . . ., m 1 }, i.e, we identify the index of an edge with the edge itself.Here, the directed graph (V, E) is not necessarily acyclic.When a channel transmits information from a node v(i) In the single transmission, the source node has several elements of F q and sends each of them via its outgoing edges in the order of assigned number of edges.Each intermediate node keeps received information via incoming edges.Then, for each outgoing edge, the intermediate node calculates one element of F q from previously received information, and sends it via the outgoing edge.That is, every outgoing information from a node v(i) via a channel e(j) depends only on the incoming information into the node v(i) via channels e(j ) such that j < j.The operations on all nodes are assumed to be linear on the finite field F q with prime power q. Bob receives the information Y B in F m4 q on the edges of a subset Let Xj be the information on the edge e(j).In the following, we describe the information on the m 7 := m 1 − m 3 edges that are not directly linked to the source node because m 3 expresses the number of Alices input symbols.When the edge e(j) is an outgoing edge of the node v(i), the information Xj is given as a linear combination of the information on the edges incoming to the node v(i).We choose an m 1 × m 1 matrix θ = (θ j,j ) such that Xj = j θ j,j Xj , where θ j,j is zero unless e(j ) is an edge incoming to v(i).The matrix θ is the coefficient matrix of this network.Now, from causality, we can assume that each node makes the transmissions on the outgoing edges in the order of the numbers assigned to the edges.At the first stage, all m 3 information generated at the source node are directly transmitted via e(1), • • • e(m 3 ) respectively.Then, at time j, the information transmission on the edge e(j + m 3 ) is done Hence, naturally, we impose the condition which is called the partial time-ordered condition for θ.Then, to describe the information on m 7 edges that are not directly linked to the source node, we define m 7 m 1 × m 1 matrices M 1 , . . ., M m7 .The j-th m 1 × m 1 matrix M j gives the information on the edge e(j + m 3 ) as a function of the information on edges {e(j )} 1≤j ≤m1 at time j.The j + m 3 -th row vector of the matrix M j is defined by [θ j+m3,j ] 1≤j ≤m1 .The remaining part of M j , i.e., the i-th row vector for i = j + m 3 is defined by [δ i,j ] 1≤j ≤m1 and δ i,j is the Kronecker delta.Since edge e(j ) at time j, we have While the output of the matrix M m7 • • • M 1 takes values in F m1 q , we focus the projection P B to the subspace F m4 q that corresponds to the m 4 components observed by Bob.That is, P B is a m 4 ×m 1 matrix to satisfy P B;i,j = δ ζ B (i),j .Similarly, we use the projection P A (an m 1 ×m 3 matrix) as P A;i,j = δ i,j .Due to (6), the matrix The malicious adversary, Eve, wiretaps the information Y E in F m6 q on the edges of a subset We employ the projection P E (an m 6 × m 1 matrix) to the subspace F m6 q that corresponds to the m 6 components eavesdropped by Eve.That is, P E;i,j = δ ζ E (i),j .Then, we obtain the matrix In summary the topology and dynamics (operations on the intermediate nodes) of the network, including the places of attached edges decides the graph (V, E), the coefficients θ i,j , and functions ζ B , ζ E , uniquely gives the two matrices K B and K E .Subsection II-E will give an example for this model.Here, we emphasize that we do not assume the acyclic condition for the graph (V, E).We can use this relaxed condition because we have only one transmission in the current discussion.That is, due to the partial time-ordered condition for θ, we can uniquely define our matrices K B and K E , which is a similar way to [36, Section V-B]2 .However, when the graph has a cycle and we have n transmissions, there is a possibility of the correlation with the delayed information dependently of the time ordering.As a result, it is difficult to analyze secrecy for the cyclic network coding.

C. Construction of H B , H E from concrete network model
We identify the wiretap and addition model from a concrete network structure.We assume that Eve injects the noise in a part of edges E A ⊂ E as well as eavesdrops the edges E E .
The elements of the subset E A are expressed as E A = {e(η(1)), . . ., e(η(m 5 ))} by using a function η from {1, . . ., m 5 } to {1, . . ., m 1 }, where the function η is not necessarily monotonically increasing function.To give the matrices H B and H E , modifying the matrix M j , we define the new matrix M j as follows The j + m 3 -th row vector of the new matrix M j is defined by [θ j+m3,j + δ j+m3,j ] 1≤j ≤m1 .The remaining part of M j , i.e., the i-th row vector for i = j + m 3 is defined by expresses the information on edge e(j ) at time j, we have When Eve eavesdrops the edges E E ∩ E A , she obtains the information on E E ∩ E A before her noise injection.Hence, to express her obtained information on E E ∩ E A , we need to subtract her injected information on E E ∩E A .Hence, we need −I in the second term of ( 9).We introduce the projection P E,A (an m 1 × m 5 matrix) as P E,A;i,j = δ i,η(j) .Due to ( 8) and ( 9), the matrices 2) is called the wiretap and addition model determined by (V, E) and (E E , E A , θ), which expresses the topology and dynamics.

D. Strategy and order of communication
To discuss the active attack, we see how the causal condition for the subsets {w i } 1,...,m5 follows from the network topology in the wiretap and addition model.We choose the domain index subsets {w i } 1≤i≤m5 for α, i.e., Eve chooses the added error Z i on the edge e(η(i)) ∈ E A as a function α i of the vector [Y E,j ] j∈wi .Since the order of Eve's attack is characterized by the function η from {1, . . ., m 5 } to E A ⊂ {1, . . ., m 1 }, we discuss what condition for the pair (η, {w i } i ) guarantees the causal condition for the subsets {w i } i .
First, one may assume that the tail node of the edge e(j) sends the information to the edge e(j) after the head node of the edge e(j −1) receives the information to the edge e(j −1).Since this condition determines the order of Eve's attack, the function η must be a strictly increasing function from {1, . . ., m 5 } to {1, . . ., m 1 }.Also, due to this time ordering, the subset w i needs to be {j|η(i) ≥ ζ E (j)} or its subset.We call these two conditions the full time-ordered condition for the function η and the subsets {w i } i .Since the function η is strictly increasing, Condition (A2) for the causal condition holds.Since the relation (5) implies that M m7 • • • M 1 − I is a lower triangular matrix with zero diagonal elements, the strictly increasing property of η yield that which implies Condition (A1) for the causal condition.In this way, the full time-ordered condition for the function η and the subsets {w i } i satisfies the causal condition.However, the full time ordered condition does not hold in general even when we reorder the numbers assigned to the edges.That is, if the network is not well synchronized, Eve can make an attack across several channels, i.e., it is possible that Eve might intercept (i.e., wiretap and contaminate) the information of an edge before the head node of the previous edge receives the information on the edge.Hence, we consider the case when the partial time-ordered condition holds, but the full time-ordered condition does not necessarily hold 3 .That is, the function η from {1, . . ., m 5 } to E is injective but is not necessarily monotone increasing.Given the matrix θ, we define the function γ θ (j) := min j {j |θ j ,j = 0}.Here, when no index j satisfies the condition θ j ,j = 0, γ θ (j) is defined to be m 1 + 1.Then, we say that the function η and the subsets {w i } i are admissible under θ when {e(k)|k ∈ Im η} = E A , the subsets {w i } i satisfy Condition (A2) for the causal condition, and any element j ∈ w i satisfies Here, Im η expresses the image of the function η.The condition (11) and the condition (5) imply the following condition; For j ∈ w i , there is no sequence This condition implies Condition (A1) for the causal condition.Since the admissibility under θ is natural, even when the full time-ordered condition does not hold, the causal condition can be naturally derived.Given two admissible pairs (η, {w i } i ) and (η , {w i } i ), we say that the pair (η, {w i } i ) is superior to (η , {w i } i ) for Eve when w η −1 (j) ⊂ w η −1 (j) for any j ∈ E A .Now, we discuss the optimal choice of (η, {w i } i ) in this sense when E A is given.That is, we choose the subset w i as large as possible under the admissibility under θ.Then, we choose the bijective function η o from {1, . . ., m 5 } to E A such that γ θ • η o is monotone increasing.Then, we define w o,i := {j|ζ E (j) < γ θ (η o (i))}, which satisfies the admissibility under θ.Conditions (A1) and (A2) for the causal condition.Further, when the pair (η, {w i } i ) is admissible under θ, the condition (11) implies w η −1 (j) ⊂ w o,η −1 o (j) for j ∈ E A , i.e., w o,i is the largest subset under the admissibility under θ.Hence, we obtain the optimality of

E. Secrecy in concrete network model
In this subsection, as an example, we consider the network given in Figs. 1 and 2, which shows that our framework can be applied to the network without synchronization.Alice sends the variables X 1 , . . ., X 4 ∈ F q to nodes v(1), v(2), v(3), and v(4) via the edges e(1), e(2), e(3), and e(4), respectively.The edges e( 5), e(6), e(8), e(10) send the elements received from the edges e(1), e(5), e( 5), e (8), respectively.The edges e( 7), e (9), and e(11) send the sum of two elements received 3 For an example, we consider the following case.Eve gets the information on the first edge.Then, she gets the information on the second edge before she hands over the information on the first edge to the tail node of the first edge.In this case, she can change the information on the first edge based on the information on the first and second edges.Then, the time-ordered condition (10) does not hold.
We denote the observed information on the edges e(2), e( 5), e( 6), e (7), e (8) by 4 , Y E,5 .As Fig. 1, Eve adds Z 1 , Z 2 in edges e(2), e (5).Then, the matrices H B , K E , and H E are given as In this case, to keep the secrecy of the message to be transmitted, Alice and Bob can use coding as follows.When Alice's message is M ∈ F q , Alice prepares scramble random number L 1 , L 2 , L 3 ∈ F q .These variables are assumed to be subject to the uniform distribution independently.She encodes them as X i = L i for i = 1, . . ., 3 and As shown in the following, under this code, Eve cannot obtain any information for M even though she makes active attack.Due to Theorem 1, it is sufficient to show the secrecy when That is, her eavesdropping information is characterized by the vectors (0, 1, 0, 0), (1, 0, 0, 0), (1, 0, 0, 0) and (1, 1, 0, 0) and the message is by the vector (1, 1, 1, −1).Since these vectors are linearly independent, 4 , Y E,5 .Hence, the message is independent of her eavesdropping information.
Indeed, the above attack can be considered as the following.Eve can eavesdrop all edges connected to the intermediate node v (2) and contaminate all edges incoming to the intermediate node v(2).Hence, it is natural to assume that Eve similarly eavesdrops and contaminates at another intermediate node v(i).That is, Eve can eavesdrop all edges connected to the intermediate node v(i) and contaminate all edges incoming to the intermediate node v(i).For all node v(i), this code has the same secrecy against the above Eve's attack for node v(i).
Furthermore, the above code has the secrecy even when the following attack.
(B1) Eve eavesdrops one of three edges e( 7), e( 9), e (11) connected to the sink node, and eavesdrops and contaminates one of the remaining eight edges e(1), e(2), e(3), e(4), e( 5), e(6), e(8), e(10) that are not connected to the sink node.Indeed, the vector characterizing the transmission on any one of three edges e( 7), e( 9), e (11) has only two non-zero components, and the vector characterizing the transmission on any one of eight edges e(1), e(2), e(3), e(4), e( 5), e( 6), e(8), e (10) has only one non-zero component.Hence, any linear combination of the above two vectors has only three non-zero components at most.Therefore, the vector (1, 1, 1, −1) is not contained by the linear space spanned by the above two vectors.Thus, when the message is X 1 + X 2 + X 3 − X 4 , the secrecy holds under the above attack (A).

F. Problem in error detection in concrete network model
However, the network given in Figs. 1 and 2 has the problem for the detection of the error in the following meaning.When Eve makes an active attack, Bob's recovering message is different from the original message due to the contamination.Further, Bob cannot detect the existence of the error in this case.It is natural to require the detection of the existence of the error when the original message cannot be recovered as well as the secrecy.As a special attack model, we consider the following scenario with the attack (B1).
(B2) Our node operations are fixed to the way as Fig. 2. (B3) The message set M and all information on all edges are F 2 .(B4) The variables X 1 , X 2 , X 3 , X 4 are given as the output of the encoder.The encoder on the source node can be chosen, but is restricted to linear.It is allowed to use a scramble random number, which is an element of L := F k 2 with a certain integer k.Formally, the encoder is given as as a linear function from M × L to F 4  2 .(B5) The decoder on the sink node can be chosen dependently of the encoder and independently of Eve's attack.
Then, it is impossible to make a pair of an encoder and a decoder such that the secrecy holds and Bob can detect the existence of error.This fact can be shown as follows.In order to detect it, Alice needs to make an encoder such that the vector (Y B,1 , Y B,2 , Y B,3 ) belongs to a linear subspace because the detection can be done only by observing that the vector does not belongs to a certain linear subspace, which can be written as That is, the encoder needs to be constructed so that the relation In the third case (C3), the relation Y B,1 = Y B,2 + Y B,3 holds, i.e., (c 1 , c 2 , c 3 ) = (1, 1, 1).Then, the linearity of the code implies that the message has the form 3 .Hence, when it is Y B,1 , Eve can obtain the message by eavesdropping the edge e (7).In other cases, Eve can obtain the message in the same way.
To resolve this problem, we need to use this network multiple times.Hence, in the next section, we discuss the case with multiple transmission.

G. Wiretap and replacement model
In the above subsections, we have discussed the case when Eve injects the noise in the edges E A as well as eavesdrops the edges E E .In this subsection, we assume that E A ⊂ E E and Eve eavesdrops the edges E E and replaces the information on the edges E A by other information.While this assumption implies m 5 ≤ m 6 and the image of η is included in the image of ζ E , the function η does not necessarily equal the function ζ E because the order that Eve sends her replaced information to the heads of edges does not necessarily equal the order that Eve intercepts the information on the edges.Also, this case belongs to general wiretap and addition model (2) as follows.
Modifying the matrix M j , we define the new matrix M j as follows.When there is an index i such that ζ E (i) = j, the j + m 3 -th row vector of the new matrix M j is defined by [δ j+m3,j ] 1≤j ≤m1 and the remaining part of M j is defined as the identity matrix.Otherwise, M j is defined to be M j .Also, we define another matrix F as follows.The ζ E (i)-th row vector of the new matrix F is defined by [θ ζ E (i),j ] 1≤j ≤m1 and the remaining part of F is defined as the identity matrix.Hence, we have Then, we choose matrices K B , K E , H B , and and , which satisfy conditions (2) due to (17) and (18).This model (K B , K E , H B , H E ) is called the wiretap and replacement model determined by (V, E) and (E E , E A , θ, η).Notice that the projections P A , P B , and P E are defined in Section II-B.
Next, we discuss the strategy α under the matrices K B , K E , H B , and H E such that the added error Z i is given as a function α i of the vector [Y E,j ] j∈wi .Since the decision of the injected noise does not depend on the results of the decision, we impose the causal condition defined in Definition 4 for the subsets w i .
When the relation j ∈ w i holds with ζ E (j) = η(i), a strategy α on the wiretap and replacement model (K B , K E , H B , H E ) determined by (V, E) and (E E , θ) is written by another strategy α on the wiretap and addition model K B , K E , H B , and H E determined by (V, E) and (E E , θ), which is defined as In particular, due to the condition (5), the optimal choice η o , {w o,i } under the partial time-ordered condition satisfies the relation j ∈ w o,i holds with ζ E (j) = η o (i).That is, under the partial time-ordered condition, the strategy on the wiretap and replacement model can be written by another strategy on the wiretap and addition model.
However, if there is no synchronization among vertexes, Eve can inject the replaced information to the head of an edge before the tail of the edge sends the information to the edge.Then, the partial time-ordered condition does not hold.In this case, the relation j ∈ w i does not necessarily hold with ζ E (j) = η(i).Hence, a strategy α on the wiretap and replacement model (K B , K E , H B , H E ) cannot be necessarily written as another strategy on the wiretap and addition model (K B , K E , H B , H E ).
To see this fact, we discuss an example given in Section II-E.In this example, the network structure of the wiretap and replacement model is given by Fig. 3.

A. General model
Now, we consider the n-transmission setting, where Alice uses the same network n times to send a message to Bob.
Alice's input variable (Eve's added variable) is given as a matrix ), and Bob's (Eve's) received variable is given as a matrix ).Then, we consider the following model as whose realization in a concrete network will be discussed in Sections III-B and III-C.Notice that the relations ( 19) and (20) with H E = 0 (only the relation ( 19)) were treated as the starting point of the paper [21] (the papers [23], [24], [25]).
In this case, regarding n transmissions of one channel as n different edges, we consider the directed graph composed of nm 5 edges.Then, Eve's strategy α n is given as nm 5 functions {α i,l } 1≤i≤m5,1≤l≤n from Y n E to the respective components of Z n .In this case, we extend the uniqueness condition to the n-transmission version.Definition 3.For any value of K E x n , there uniquely exists y n ∈ F m6×n q such that This condition is called the n-uniqueness condition.
Since we have n transmissions on each channel, the matrix θ is given as an (nm 1 ) × (nm 1 ) matrix.In the following, we see how the matrix θ is given and how the n-uniqueness condition is satisfied in a more concrete setting.

B. Multiple transmission setting with sequential transmission
This section discusses how the model given in Section III-A can be realized in the case with sequential transmission as follows.Alice sends the first information X 1 .Then, Alice sends the second information X 2 .Alice sequentially sends the information X 3 , . . ., X n .Hence, when an injective function τ E from {1, . . ., m 1 } × {1, . . ., n} to {1, . . ., nm 1 } gives the time ordering of nm 1 edges, it satisfies the condition Here, we assume that the topology and dynamics of the network and the edge attacked by Eve do not change during n transmissions, which is called the stationary condition.All operations in intermediate nodes are linear.Also, we assume that the time ordering on the network flow does not cause any correlation with the delayed information like Fig. 1 unless Eve's injection is made, i.e., the l-th information Y B,l received by Bob is independent of X 1 , . . ., X l−1 , X l+1 , . . ., X n , which is called the independence condition.The independence condition means that there is no correlation with the delayed information.Due to the stationary and independence conditions, the (nm 1 ) × (nm 1 ) matrix θ satisfies that where θi,j := θ (i,1),(j,1) .When the m 1 × m 1 matrix θ satisfies the partial time-ordered condition ( 5), due to ( 22) and ( 23), the (nm 1 ) × (nm 1 ) matrix θ satisfies the partial time-ordered condition (5) with respect to the time ordering τ E .Since the stationary condition guarantees that the edges attacked by Eve do not change during n transmissions, the above condition for θ implies the model ( 19) and ( 20).This scenario is called the n-sequential transmission.
Since the independence condition is not so trivial, it is needed to discuss when it is satisfied.If the l-th transmission has no correlation with the delayed information of the previous transmissions for l = 2, . . ., n, the independence condition holds.In order to satisfy the above independence condition, the acyclic condition for the network graph is often imposed.This is because any causal time ordering on the network flow does not cause any correlation with the delayed information and achieves the max-flow if the network graph has no cycle [26].In other words, if the network graph has a cycle, there is a possibility that a good time ordering on the network flow that causes correlation with the delayed information.However, there is no relation between the relations ( 19) and ( 20) and the acyclic condition for the network graph, and the relations ( 19) and ( 20) directly depend on the time ordering on the network flow.That is, the acyclic condition for the network graph is not equivalent to the existence of the effect of delayed information.Indeed, if we employ breaking cycles on intermediate nodes [26,Example 3.1], even when the network graph has cycles, we can avoid any correlation with the delayed information 4 .Also, see the example given in Section III-E.
Further, when the pair (η , {w i,l } i,l ) is n-admissible under θ and τ E , the condition (24) implies w η −1 (j),l ⊂ w η,η −1 (j),l for j ∈ E A and l = 1, . . ., n, i.e., w η,i,l is the largest subset under the n admissibility under θ and τ E .Hence, we obtain the optimality of (η, {w η,i,l } i,l ) when θ, τ E , and E A are given.Although the choice of η is not unique, the choice of w η,η −1 (j),l for j ∈ E A and l = 1, . . ., n is unique when θ, τ E , and E A are given.
In the same way as Lemma 1, we find that the ncausal condition with sequential transmission guarantees the n-uniqueness condition as follows.
Lemma 2. When a strategy α for the n-sequential transmission has domain index subsets to satisfy the n-causal condition, the strategy α satisfies the n-uniqueness condition.

Proof:
Consider a big graph composed of nm 1 edges {e(i, l)} 1≤i≤m1,1≤l≤n and nm 2 vertecies {v(j, l)} 1≤j≤m2,1≤l≤n .In this big graph, the coefficient matrix is given in (23).We assign the nm 1 edges the number τ E (i, l).The n-causal and n-uniqueness conditions correspond to the causal and uniqueness conditions of this bog network, respectively.Hence, Lemma 1 implies Lemma 2.

C. Multiple transmission setting with simultaneous transmission
We consider anther scenario to realize the model given in Section III-A.Usually, we employ an error correcting code for the information transmission on the edges in our graph.For example, when the information transmission is done by wireless communication, an error correcting code is always applied.Now, we assume that the same error correcting code is used on all the edges.Then, we set the length n to be the same value as the transmitted information length of the error correcting code.In this case, n transmissions are done simultaneously in each edge.Each node makes the same node operation for n transmissions, which implies the condition (23) for the (nm 1 ) × (nm 1 ) matrix θ.Then, the relations ( 19) and ( 20) hold because the delayed information does not appear.This scenario is called the n-simultaneous transmission.
In fact, when we focus on the mathematical aspect, the nsimultaneous transmission can be regarded as a special case of the n-sequential transmission.In this case, the independence condition always holds even when the network has a cycle.
Further, the n-uniqueness condition can be derived in a simpler way without discussing the n-causal condition as follows.
In this scenario, given a function η from {1, . . ., m 5 } to E A ⊂ {1, . . ., m 1 }, Eve chooses the added errors (Z i,1 , . . ., Z i,n ) ∈ F n q on the edge e(η(i)) ∈ E A as a function α i of the vector [Y E,j ] j∈wi with subsets {w i } 1≤i≤m5 of {1, . . ., m 6 }.Hence, in the same way as the single transmission, domain index subsets for α are given as subsets w i ⊂ {1, . . ., m 6 } for i ∈ {1, . . ., m 5 }.In the same way as Lemma 1, we have the following lemma.Lemma 3. When a strategy α for the n-simultaneous transmission has domain index subsets to satisfy the causal condition, the strategy α satisfies the n-uniqueness condition.
In addition, the wiretap and replacement model in this setting can be introduced for the n-sequential transmission and the n-simultaneous transmission in the same way as Section II-G.

D. Non-local code and reduction theorem
Now, we assume only the model ( 19) and ( 20) and the nuniqueness condition.Since the model ( 19) and ( 20) is given, we manage only the encoder in the sender and the decoder in the receiver.Although the operations in the intermediate nodes are linear and operate only on a single transmission, the encoder and the decoder operate across several transmissions.Such a code is called a non-local code to distinguish operations over a single transmission.Here, we formulate a non-local code to discuss the secrecy.Let M and L be the message set and the set of values of the scramble random number, which is often called the private randomness.Then, an encoder is given as a function φ n from M × L to F m3×n q , and the decoder is given as ψ n from F m4×n q to M. That is, the decoder does not use the scramble random number L because it is not shared with the decoder.Our non-local code is the pair (φ n , ψ n ), and is denoted by Φ n .Then, we denote the message and the scramble random number as M and L. The cardinality of M is called the size of the code and is denoted by |Φ n |.More generally, when we focus on a sequence {l n } instead of {n}, an encoder φ n is a function from M × L to F m3×ln q , and the decoder ψ n is a function from F m4×ln q to M. Here, we treat K B , K E , H B , and H E as deterministic values, and denote the pairs (K B , K E ) and (H B , H E ) by K and H, respectively while Alice and Bob might not have the full information for K E , H B , and H E .Also, we assume that the matrices K and H are not changed during transmission.In the following, we fix Φ n , K, H, α n .As a measure of the leaked information, we adopt the mutual information I(M ; Y n E , Z n ) between M and Eve's information Y n E and Z n .Since the variable Z n is given as a function of Y n E , we have Since the leaked information is given as a function of Φ n , K, H, α n in this situation, we denote it by I(M ; Y n E )[Φ n , K, H, α n ].Definition 5. When we always choose Z n = 0, the attack is the same as the passive attack.This strategy is denoted by α n = 0.
When K, H are treated as random variables independent of M, L, the leaked information is given as the expectation of This probabilistic setting expresses the following situation.Eve cannot necessarily choose edges to be attacked by herself.But she knows the positions of the attacked edges, and chooses her strategy depending on the attacked edges.
Remark 1.It is better to remark that there are two kinds of formulations in network coding even when the network has only one sender and one receiver.Many papers [1], [8], [9], [27], [28] adopt the formulation, where the users can control the coding operation in intermediate nodes.However, this paper adopts another formulation, in which, the non-local coding operations are done only for the input variable X and the output variable Y B like the papers [7], [20], [21], [23], [24], [25].In contrast, all intermediate nodes make only linear operations over a single transmission, which is often called local encoding in [23], [24], [25].Since the linear operations in intermediate nodes cannot be controlled by the sender and the receiver, this formulation contains the case when a part of intermediate nodes do not work and output 0 always.
In the former setting, it is often allowed to employ the private randomness in intermediate nodes.However, we adopt the latter setting, i.e., no non-local coding operation is allowed in intermediate nodes, and each intermediate node is required to make the same linear operation on each alphabet.That is, the operations in intermediate nodes are linear and are not changed during n transmissions.The private randomness is not employed in intermediate nodes.

Now, we have the following reduction theorem.
Theorem 2 (Reduction Theorem).When the triplet (K, H, α n ) satisfies the uniqueness condition, Eve's information Y n E (α n ) with strategy α n can be calculated from Eve's information Y n E (0) with strategy 0 (the passive attack), and Y n E (0) is also calculated from Y n E (α n ).Hence, we have the equation ) Proof: Since the first equation follows from the definition, we show the second equation.We define two random variables , and H E , we have the opposite inequality.
Remark 2. Theorem 2 discusses the unicast case.It can be trivially extended to the multicast case because we do not discuss the decoder.It can also be extended to the multiple unicast case, whose network is composed of several pairs of sender and receiver.When there are k pairs in this setting, the messages M and the scramble random numbers L have the forms (M 1 , . . ., M k ) and (L 1 , . . ., L k ).Thus, we can apply Theorem 2 to the multiple unicast case.The detail discussion for this extension is discussed in the paper [30].
Remark 3. One may consider the following type of attack when Alice sends the i-th transmission after Bob receives the i − 1-th transmission.Eve changes the edge to be attacked in the i-th transmission dependently of the information that Eve obtains in the previous i−1 transmissions.Such an attack was discussed in [29] when there is no noise injection.Theorem 2 does not consider such a situation because it assumes that Eve attacks the same edges for each transmission.However, Theorem 2 can be applied to this kind of attack in the following way.That is, we find that Eve's information with noise injection can be simulated by Eve's information without noise injection even when the attacked edges are changed in the above way.
To see this reduction, we consider m transmissions over the network given by the direct graph (V, E).We define the big graph (V m , E m ), where V m := {(v, i)} v∈V,1≤i≤m and E m := {(e, i)} e∈E,1≤i≤m and (v, i) and (e, i) express the vertex v and the edge e on the i-th transmission, respectively.Then, we can apply Theorem 2 with n = 1 to the network given by the directed graph (V m , E m ) when the attacked edges are changed in the above way.Hence, we obtain the above reduction statement under the uniqueness condition for the network decided by the directed graph (V m , E m ).

E. Application to network model in Subsection II-E
We consider how to apply the multiple transmission setting with sequential transmission with n = 2 to the network given in Subsection II-E, i.e., we discuss the network given in Figs.
1 and 2 over the field F q with n = 2.Then, we analyze the secrecy by applying Theorem 2.
Assume that Eve eavesdrops edges e(2), e( 5), e(6), e (7), e (8) and contaminates edges e(2), e(5) as Fig. 1.Then, we set the function τ E from {1, . . ., 11} × {1, 2} to {1, . . ., 22} as Under the choice of η given in ( 14), the function τ E,η can be set in another way as However, when the function τ E is changed as τ E (i, l) = 5 + i + 6(l − 1) for i = 6, . . ., 11, w η,i,l has a different form as follows.Under the choice of η given in ( 14), while Eve can choose τ E,η in the same way We construct a code, in which, the secrecy holds and Bob can detect the existence of the error in this case.For this aim, we consider two cases; (i) There exists an element κ ∈ F q to satisfy the equation κ 2 = κ + 1. (ii) No element κ ∈ F q satisfies the equation κ 2 = κ + 1.Our code works even with n = 1 in the case (i).But, it requires n = 2 in the case (ii).For simplicity, we give our code with n = 2 even in the case (i).
Assume the case (i).Alice's message is M = (M 1 , M 2 ) ∈ F 2 q , and Alice prepares scramble random numbers L i = (L i,1 , L i,2 ) ∈ F 2 q with i = 1, 2. These variables are assumed to be subject to the uniform distribution independently.She encodes them as Then, since M = Y B,2 − Y B,3 , he recovers the message by using Y B,2 − Y B,3 .
Indeed, the above attack can be considered as the following.Eve can eavesdrop all edges connected to the intermediate node v(2) and contaminate all edges incoming to the intermediate node v(2).The above setting means that the intermediate node v( 2) is partially captured by Eve.As other settings, we consider the case when Eve attacks another node v(i) for i = 1, 3, 4. In this case, we allow a slightly stronger attack, i.e., Eve can eavesdrop and contaminate all edges connected to the intermediate node v(i).That is, Eve's attack is summarized as (B1') Eve can choose any one of nodes v(1), . . ., v(4).When v(2) is chosen, she eavesdrops all edges connected to v(2) and contaminates all edges incoming to v(2).When v(i) is chosen for i = 1, 3, 4, she eavesdrops and contaminates all edges connected to v(i).Under this attack, this code has the same secrecy as summarized in Table II.
In the case (ii), we set κ as the matrix 0 1 1 1 .Then, we introduce the algebraic extension F q [κ] of the field F q by using the element e to satisfy the equation κ 2 = κ + 1.
Then, we identify an element Hence, the multiplication of the matrix κ in F 2 q can be identified with the multiplication of κ in F q [κ].The above analysis works by identifying F 2 q with the algebraic extension F q [κ] in the case (ii).

F. Error detection
Next, we consider another type of security, i.e., the detectability of the existence of the error when n = 2 with the assumptions (B1'), (B2) and the following alternative assumption; (B3') The message set M is F 2 q , and all information on all edges per single use are F q .(B4') The encoder on the source node can be chosen, but is restricted to linear.It is allowed to use a scramble random number, which is an element of L := F k q with a certain integer k.Formally, the encoder is given as as a linear function from M × L to F 8 q .We employ the code given in Subsection III-E and consider that the contamination exists when Y B,1 − (Y B,3 + Y B,2 κ) is not zero.This code satisfies the secrecy and the detectability as follows.
In the case of v( 3 Similarly, in the case of v(1), we set η(1) = 1, η(2) = 5, η(3) = 10.If Bob knows that only the edges e(1), e(5), e (10) are contaminated, he can recover the message by the original method Y B,2 −Y B,3 because it equals L 1 +L 2 +M +Z 1 −(L 1 + L 2 + Z 1 ).In summary, when this type attack is done, Bob can detect the existence of the error.If he identifies the attacked node v(i) by another method, he can recover the message.

G. Solution of problem given in Subsection II-F
Next, we consider how to resolve the problem arisen in Subsection II-F.That is, we discuss another type of attack given as (B1), and study the secrecy and the detectability of the existence of the error under the above-explained code with the assumptions (B2), (B3'), (B4'), and (B5).
To discuss this problem, we divide this network into two layers.The lower layer consists of the edges e(7), e(9), e (11), which connected to the sink node.The upper layer does of the remaining edges.Eve eavesdrops and contaminates any one edge among the upper layer, and eavesdrops any one edge among the lower layer.

IV. CONCLUSION
We have discussed how sequential error injection affects the information leaked to Eve when node operations are linear.To discuss this problem, we have considered the possibility that the network does not have synchronization so that the information transmission on an edges starts before the end of the the information transmission on the previous edge.Hence, Eve might contaminate the information on several edges by using the original information of these edges.Also, we have discussed the multiple uses of the same network when the topology and the dynamics of the network does not changes and there is no correlation with the delayed information.
As a result, we have shown that there is no improvement by injecting an artificial noise on attacked edges.This result can be regarded as a kind of reduction theorem because the secrecy analysis with contamination can be reduced to that without contamination.Indeed, when the linearity is not imposed, there is a counterexample of this reduction theorem [32].
In addition, we have derived the matrix formulas ( 19) and (20) for the relation between the outputs of Alice and Bob and the inputs of Alice and Eve in the case with the multiple transmission.As the extension of Theorem 1, the similar reduction theorem (Theorem 2) holds even for the multiple transmission.In fact, as explained in Subsection III-G, this extension is essential because there exists an attack model over a network model such that the secrecy and the detectability of the error are possible with multiple uses of the same network while it is impossible with the single use of the network.Also, another paper will discuss the application of these results to the asymptotic setting [30].

Fig. 2 .
Fig. 2. Network of Subsection II-E with network flow 1).If we impose another linear condition, the transmitted information is restricted into a one-dimensional subspace, which means that the message M uniquely decides the vector (Y B,1 , Y B,2 , Y B,3 ).Hence, if Eve eavesdrops one suitable variable among three variables Y B,1 , Y B,2 , Y B,3 , Eve can infer the original message.In the first case (C1), one of three variables Y B,1 , Y B,2 , Y B,3 is zero unless Eve's injection is made.When Y B,1 = 0, i.e., (c 1 , c 2 , c 3 ) = (1, 0, 0), Bob can detect an error on the edge e(5) or e(2) because the error on e(5) or e(2) affects Y B,1 so that Y B,1 is not zero.However, Bob cannot detect any error on the edge e(4) because the error does not affect Y B,1 .The same fact can be applied to the case when Y B,2 = 0.When Y B,3 = 0, Bob cannot detect any error on the edge e(3) because the error does not affect Y B,3 .In the second case (C2), two of three variables Y B,1 , Y B,2 , Y B,3 have the same value unless Eve's injection is made.When Y B,1 = Y B,2 , i.e., (c 1 , c 2 , c 3 ) = (1, 1, 0), Bob can detect an error on the edge e(2) or e(3) because the error on e(2) or e(3) affects Y B,1 or Y B,2 so that Y B,1 + Y B,2 is not zero.However, Bob cannot detect any error on the edge e(4) because the error does not affect Y B,1 nor Y B,2 .Similarly, When Y B,2 = Y B,3 (Y B,1 = Y B,3 ), Bob cannot detect any error on the edge e(2) (e(3)).

Fig. 3 .
Fig. 3. Network of Section II-E with wiretap and replacement model.Eve injects the replaced information on the edges e (2) and e (5).
this value is not zero, Bob considers that there exists the contamination.Recovery expresses Bob's method that decodes the message M dependently of v(i).