# [PERSON] Coding-Based Medical Image Data Hiding Method against Salt and Pepper Noise
## 2 [PERSON] Coding  
The Reed Solomon (RS) coding [24] used in this study is the decimal class of BCH codes used for non-binary coefficients. In RS coding, the amplitude of the error varies according to the Galois field used and may be a decimal value. RS codes are defined in the Galois field \(GF(2^{m})\), where m denotes the number of bits in a symbol. The symbols for \(GF(2^{m})\) are \(\{0,\ 1,\ 2,\ldots(2^{m}-1)\}\). When an information message with the symbol number k is encoded with the RS code, together with the parity symbols added, a codeword with the symbol \(n=(2^{m}-1)=k+2t\) is obtained, and denoted by RS(n, k) [25; 26]. When the parity symbol length is accepted as \(2t\), up to \(t\) incorrect symbols can be corrected in the RS(n, k) code. For information with symbol length \(k\), the information polynomial is as follows:  
\[b(x)=b_{k-1}x^{k-1}+\ldots+b_{1}x+b_{0} \tag{1}\]  
\(b(x)\) is the element of Galois field and all \(b_{i}\) coefficients are created with the help of minimal polynomial systematic RS(n, k) code, that can be given as in Equation (2). \[c(x)=b(x)x^{n-k}+p(x) \tag{2}\]  
\(p(x)\) denotes the parity polynomial, and refers to the \((n-k-1)\) degrees remainder after division of \((n-k)\) times shifted information polynomial to the generator polynomial \(g(x)\). \[p(x)=\Big{[}b(x)x^{n-k}\Big{]}mod\ g(x) \tag{3}\] \[g(x)=\Big{(}x+\alpha^{1}\Big{)}+\Big{(}x+\alpha^{2}\Big{)}+\ldots+ \Big{(}x+\alpha^{2t}\Big{)} \tag{4}\]  
The \((n-k)\) degree \(g(x)\) polynomial has coefficients within \(GF(2^{m})\) and is fully divided by \(x^{n-1}\). The RS(n, k) codeword, which is formed as in Equation (5); the symbols are elements of \(GF(2^{m})\)  
\[c=\big{(}c_{n-1},\ c_{n-2}\,\ldots,\ c_{2},\ c_{1},\ c_{0}\big{)} \tag{5}\]  
The \(c\) codeword is sent to the receiver from the communication channel. Subject to noise or distortion in the channel such as \(e(x)\), the new codeword is taken by the receiver as \(r(x)\) in Equation (6). \[r(x)=c(x)+e(x) \tag{6}\]  
RS decoding consists of the error detection and correction process from the data transmitted through the noisy channel. The decoding process, which is more complex than the encoding process, will be briefly summarized here. See [25] and [26] for more information. With RS decoding, the corrected codeword of \(\hat{c}(x)\) is recovered, by trying to correct the incorrect symbols in the \(r(x)\) message. To find the error in the message, the syndrome (error indicator) of the received signal is calculated first. \[ \begin{array}{l}S\Big{(}\alpha^{1}\Big{)}=r\Big{(}\alpha^{1}\Big{)}=e_{p1} \Big{(}\alpha^{1}\Big{)}^{p1}+e_{p2}\Big{(}\alpha^{1}\Big{)}^{p2}+\ldots+e_{ pt}\Big{(}\alpha^{1}\Big{)}^{pt}\\ S\Big{(}\alpha^{2}\Big{)}=r\Big{(}\alpha^{2}\Big{)}=e_{p1}\Big{(}\alpha^{2} \Big{)}^{p1}+e_{p2}\Big{(}\alpha^{2}\Big{)}^{p2}+\ldots+e_{pt}\Big{(}\alpha^{2 }\Big{)}^{pt}\\ \ldots\\ S\Big{(}\alpha^{2t}\Big{)}=r\Big{(}\alpha^{2t}\Big{)}=e_{p1}\Big{(}\alpha^{2 t}\Big{)}^{p1}+e_{p2}\Big{(}\alpha^{2t}\Big{)}^{p2}+\ldots+e_{pt}\Big{(}\alpha^{2 t}\Big{)}^{pt}\end{array}  \tag{7}\]  
The syndrome has 2t terms, such as \(S\Big{(}\alpha^{1}\Big{)},\ S\Big{(}\alpha^{2}\Big{)},\ \ldots\,\ S\Big{(}\alpha^{2t}\Big{)}\). The \(e_{pu}\) variable in the syndrome represents the amplitude of the error at the \(p_{u}\) position, and \(\Big{(}\alpha^{i}\Big{)}^{pu}\) indicates the location of the error. The number of error, \(u\) and variable \(i\) are defined as \(1\leq u\leq t\) and \(1\leq i\leq 2t\), respectively. If the \(2t\) pieces of \(S\Big{(}\alpha^{i}\Big{)}\) terms in the syndrome are all equal to zero, then there is no error. So, there is no need for a correction. However, if one or more \(S\Big{(}\alpha^{i}\Big{)}\) terms are nonzero, error location polynomials must be found. Error location polynomial for \(x=\alpha^{i}\) is shown as,  
\[\Delta(x)=\Delta_{0}+\Delta_{1}x+\ldots+\Delta_{u-1}x^{u-1} \tag{8}\]  
The Berlekamp-Massey algorithm is the best known method to create error location polynomial in RS coding.