\newpage
\section{RS(255,k) encoding parameters and examples}
\label{rs}

dvdisaster uses a standard, non-shortened Reed-Solomon code
with the following commonly used parameters: \smallskip

The Galois field tables are generated by the field
generator polynomial 0x187 ($1 + X + X^2 + X^7 + X^8$).
The Reed-Solomon code generator polynomial is created using element 
0x70 as first consecutive root and the primitive element 0x0b. \medskip

As a starting point for testing your own implementation, some 
values and tables are shown below. The logarithm
and anti-logarithm tables in the Galois field are shown in tables
\ref{log-table} and \ref{anti-log-table}. Please note that there is no need for hard-coding
these tables as their contents can be enumerated by using
the field generator polynomial. \medskip

When encoding for 32 roots, the RS code generator polynomial will be:

{\small 01 5b 7f 56 10 1e 0d eb 61 a5 08 2a 36 56 ab 20 71 20 ab 56 36 2a 08 a5 61 eb 0d 1e 10 56 7f 5b 01}

or in index form:

{\small 00 f9 3b 42 04 2b 7e fb 61 1e 03 d5 32 42 aa 05 18 05 aa 42 32 d5 03 1e 61 fb 7e 2b 04 42 3b f9 00} \medskip

Using the above generator polynomial for encoding the data byte
sequence $\{0,1,\ldots,222\}$ produces the following parity bytes:

{\small 2f bd 4f b4 74 84 94 b9 ac d5 54 62 72 12 ee b3 eb ed 41 19 1d e1 d3 63 20 ea 49 29 0b 25 ab cf}

\newpage

\begin{table}
\begin{center}
\begin{tabular}{|l||c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
&  00 & 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 0a & 0b & 0c & 0d & 0e & 0f \\
\hline
\hline
00 &  ff & 00 & 01 & 63 & 02 & c6 & 64 & 6a & 03 & cd & c7 & bc & 65 & 7e & 6b & 2a \\
\hline
10 &  04 & 8d & ce & 4e & c8 & d4 & bd & e1 & 66 & dd & 7f & 31 & 6c & 20 & 2b & f3 \\
\hline
20 &  05 & 57 & 8e & e8 & cf & ac & 4f & 83 & c9 & d9 & d5 & 41 & be & 94 & e2 & b4 \\
\hline
30 &  67 & 27 & de & f0 & 80 & b1 & 32 & 35 & 6d & 45 & 21 & 12 & 2c & 0d & f4 & 38 \\
\hline
40 &  06 & 9b & 58 & 1a & 8f & 79 & e9 & 70 & d0 & c2 & ad & a8 & 50 & 75 & 84 & 48 \\
\hline
50 &  ca & fc & da & 8a & d6 & 54 & 42 & 24 & bf & 98 & 95 & f9 & e3 & 5e & b5 & 15 \\
\hline
60 &  68 & 61 & 28 & ba & df & 4c & f1 & 2f & 81 & e6 & b2 & 3f & 33 & ee & 36 & 10 \\
\hline
70 &  6e & 18 & 46 & a6 & 22 & 88 & 13 & f7 & 2d & b8 & 0e & 3d & f5 & a4 & 39 & 3b \\
\hline
80 &  07 & 9e & 9c & 9d & 59 & 9f & 1b & 08 & 90 & 09 & 7a & 1c & ea & a0 & 71 & 5a \\
\hline
90 &  d1 & 1d & c3 & 7b & ae & 0a & a9 & 91 & 51 & 5b & 76 & 72 & 85 & a1 & 49 & eb \\
\hline
a0 &  cb & 7c & fd & c4 & db & 1e & 8b & d2 & d7 & 92 & 55 & aa & 43 & 0b & 25 & af \\
\hline
b0 &  c0 & 73 & 99 & 77 & 96 & 5c & fa & 52 & e4 & ec & 5f & 4a & b6 & a2 & 16 & 86 \\
\hline
c0 &  69 & c5 & 62 & fe & 29 & 7d & bb & cc & e0 & d3 & 4d & 8c & f2 & 1f & 30 & dc \\
\hline
d0 &  82 & ab & e7 & 56 & b3 & 93 & 40 & d8 & 34 & b0 & ef & 26 & 37 & 0c & 11 & 44 \\
\hline
e0 &  6f & 78 & 19 & 9a & 47 & 74 & a7 & c1 & 23 & 53 & 89 & fb & 14 & 5d & f8 & 97 \\
\hline
f0 &  2e & 4b & b9 & 60 & 0f & ed & 3e & e5 & f6 & 87 & a5 & 17 & 3a & a3 & 3c & b7 \\
\hline
\end{tabular}
\end{center}
\caption{Galois field logarithm table}
\label{log-table}
\end{table}

\bigskip

\begin{table}
\begin{center}
\begin{tabular}{|l||c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
&  00 & 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 0a & 0b & 0c & 0d & 0e & 0f \\
\hline
\hline
00 &  01 & 02 & 04 & 08 & 10 & 20 & 40 & 80 & 87 & 89 & 95 & ad & dd & 3d & 7a & f4 \\
\hline
10 &  6f & de & 3b & 76 & ec & 5f & be & fb & 71 & e2 & 43 & 86 & 8b & 91 & a5 & cd \\
\hline
20 &  1d & 3a & 74 & e8 & 57 & ae & db & 31 & 62 & c4 & 0f & 1e & 3c & 78 & f0 & 67 \\
\hline
30 &  ce & 1b & 36 & 6c & d8 & 37 & 6e & dc & 3f & 7e & fc & 7f & fe & 7b & f6 & 6b \\
\hline
40 &  d6 & 2b & 56 & ac & df & 39 & 72 & e4 & 4f & 9e & bb & f1 & 65 & ca & 13 & 26 \\
\hline
50 &  4c & 98 & b7 & e9 & 55 & aa & d3 & 21 & 42 & 84 & 8f & 99 & b5 & ed & 5d & ba \\
\hline
60 &  f3 & 61 & c2 & 03 & 06 & 0c & 18 & 30 & 60 & c0 & 07 & 0e & 1c & 38 & 70 & e0 \\
\hline
70 &  47 & 8e & 9b & b1 & e5 & 4d & 9a & b3 & e1 & 45 & 8a & 93 & a1 & c5 & 0d & 1a \\
\hline
80 &  34 & 68 & d0 & 27 & 4e & 9c & bf & f9 & 75 & ea & 53 & a6 & cb & 11 & 22 & 44 \\
\hline
90 &  88 & 97 & a9 & d5 & 2d & 5a & b4 & ef & 59 & b2 & e3 & 41 & 82 & 83 & 81 & 85 \\
\hline
a0 &  8d & 9d & bd & fd & 7d & fa & 73 & e6 & 4b & 96 & ab & d1 & 25 & 4a & 94 & af \\
\hline
b0 &  d9 & 35 & 6a & d4 & 2f & 5e & bc & ff & 79 & f2 & 63 & c6 & 0b & 16 & 2c & 58 \\
\hline
c0 &  b0 & e7 & 49 & 92 & a3 & c1 & 05 & 0a & 14 & 28 & 50 & a0 & c7 & 09 & 12 & 24 \\
\hline
d0 &  48 & 90 & a7 & c9 & 15 & 2a & 54 & a8 & d7 & 29 & 52 & a4 & cf & 19 & 32 & 64 \\
\hline
e0 &  c8 & 17 & 2e & 5c & b8 & f7 & 69 & d2 & 23 & 46 & 8c & 9f & b9 & f5 & 6d & da \\
\hline
f0 &  33 & 66 & cc & 1f & 3e & 7c & f8 & 77 & ee & 5b & b6 & eb & 51 & a2 & c3 & 00 \\
\hline
\end{tabular}
\end{center}
\caption{Galois field anti-logarithm table}
\label{anti-log-table}
\label{LastPage}
\end{table}
