**2.9 Lock the vault**

Polynomial is generated by using the code results from encoding a polynomial coefficient called secret that is a secret value using RS. Every EEG feature is projected onto the polynomial. Then it creates the chaff points using the proposed tent chaff points. Then shuffling the two point sets, to produce the vault. As the following algorithm:

```
Input: Parameters k, t, and r where k ≤ n ≤ r≤ q. A Pre-select Secret S∈F . A locking set A=f g ai n
                                                                                                   i¼1 where
ai F .
                          � � � � r
                                                       ∈F
```

```
Output: A set R of points xi, yi
                                     i¼1 such that xi, yi
Variables :CH chaff points
```
*X,R ϕ poly* ð Þ *x* **RSENCODE**ðS,*k*) for *i*=1 to n do **x***i*; **y***<sup>i</sup>* � � **<sup>a</sup>***i*; *poly* ð Þ **<sup>a</sup>***<sup>i</sup>* � �; CH **x***i*; **y***<sup>i</sup>* � � chaff **<sup>x</sup>***i*; **<sup>y</sup>***<sup>i</sup>* � �; *X sortxi R* CH **x***i*; **y***<sup>i</sup>* � �<sup>⋃</sup> *xi*, *yi* � � output *R*

*S*: a secret key intended to protect.

poly (*x*): a polynomial of degree less than k.

*<sup>A</sup>* <sup>¼</sup> f g *ai <sup>n</sup> <sup>i</sup>*¼1: a locking set containing *n* elements.

**F** : finite field.

*q*: the number of finite field *F elements*.

*n*: the number of real points.

*r*: the total number of real points and chaff points.

**Figure 5** illustrates feature projection on polynomial produced by encoding the secret *s* using RS, *xi* is the feature*ai*, and *yi* is the projection on polynomial poly(*ai*).
