Main Protocol

In the protocol, we will perform the RS coding and KZG process by dividing the data held in EZ into chunks. We will divide the block data into chunks in a way that each chunk represents a field element. The matrix representation of the data is as follows:

chunk.png

The length of each $data[i][j]$ value can be determined based on the finite field. Additionally, the row and column numbers used in the representation can be decided based on the size of the block data and the number of column nodes. In our protocol, we have $k$ pieces which include $\ell$ chunks each. To apply the 2d structure, we chose $\ell=k$ in the original data representation.

Using RS-coding, encode this blok data in the evaluation form. Assume that for every row $i$, we have a unique polynomial $f_i$ such that $data[i][j]=f_i(w^{j-1})$ for $i=1,...,k$ and $j=1,...,k$.

Also, assume that for every column $i$, we have a unique polynomial $f'_i$ such that $data[i][j]=f'_j(w^{i-1})$ for $i=1,...,k$ and $j=1,...,k$.

For redundancy, we can extend the blok data row-wise and column-wise such that we evaluate these polynomials at the new points $w^j$ where $i,j=k+1,k+2,\dots,n.$ Now, we have extended data as follows;

2d.png

Assume $n=2k$. In this design, we plan to distribute one column and one row to each node, different from each other**.** Therefore, initially, we calculate the commitment for the inputs of each column and row using KZG.

Each row and column contains $k$ chunks. Using Lagrange interpolation, we can calculate the unique polynomial defined by these chunks. Let's denote column polynomial as $\theta$ and row polynomial as $\theta'$ The commitment values for each column are calculated as follows:

$\theta_j=\text{Interpolate}(data[1][j],data[2][j],\dots,data[k][j])$

$C_j=com(\theta_j)$

The commitment values for each row are calculated as follows:

$\theta'_i=\text{Interpolate}(data[i][1],data[i][2],\dots,data[i][k])$

$R_i=com(\theta'_i)$

(Before expanding the data, these commitments can be calculated and then RS-encoding can be applied because KZG has homomorphic properties.)

In this protocol, we use elliptic curve as a group, thus the entries of $R_i's \text{ and } C_j$’s are also elliptic curve points. Let’s represent the $x$-coordinate of $C_j$ as $C_j^x$ and the $y$ -coordinate of $C_j$ as $C_1^y$. If you have just $C_j^x$ and one bit of $C_j^y$ then you can construct $C_j$. Therefore, there is no need to use both coordinates of $C_j$. However, for the sake of simplicity in the representation, we use only the value $C_j$ for now. (Same procedure can be applied also to $R_i$’s )

The position and value integrity of chunks in each column and row can be provided by commitments. Now, to link each column and each row to one another, we will calculate new commitment values. We can consider each $C_j$ as our new data and assume they are in evaluation form. In this case, we can calculate a new polynomial $\Phi$ and its commitment value as follows: