# Rank error-correcting code

In coding theory, **rank codes** (also called **Gabidulin codes**) are non-binary linear error-correcting codes over not Hamming but *rank* metric. They described a systematic way of building codes that could detect and correct multiple random *rank* errors. By adding redundancy with coding *k*-symbol word to a *n*-symbol word, a rank code can correct any errors of rank up to *t* = ⌊ (*d* − 1) / 2 ⌋, where *d* is a code distance. As an erasure code, it can correct up to *d* − 1 known erasures.

A **rank code** is an algebraic linear code over the finite field <math>GF(q^N)</math> similar to Reed–Solomon code.

The rank of the vector over <math>GF(q^N)</math> is the maximum number of linearly independent components over <math>GF(q)</math>. The rank distance between two vectors over <math>GF(q^N)</math> is the rank of the difference of these vectors.

The rank code corrects all errors with rank of the error vector not greater than *t*.

## Contents

## Rank metric[edit]

Let <math>X^n</math> be an *n*-dimensional vector space over the finite field <math>GF\left( {q^N } \right)</math>, where <math>q</math> is a power of a prime, <math>N</math> is an integer and <math>\left(u_1, u_2, \dots, u_N\right)</math> with <math>u_i \in GF(q)</math> is a base of the vector space over the field <math>GF\left( {q} \right)</math>.

Every element <math>x_i \in GF\left( {q^N } \right)</math> can be represented as <math>x_i = a_{1i}u_1 + a_{2i}u_2 + \dots + a_{Ni}u_N</math>. Hence, every vector <math>\vec x = \left( {x_1, x_2, \dots, x_n } \right)</math> over <math>GF\left( {q^N } \right)</math> can be written as matrix:

- <math>

\vec x = \left\| {\begin{array}{*{20}c}

a_{1,1} & a_{1,2} & \ldots & a_{1,n} \\ a_{2,1} & a_{2,2} & \ldots & a_{2,n} \\ \ldots & \ldots & \ldots & \ldots \\ a_{N,1} & a_{N,2} & \ldots & a_{N,n}

\end{array}} \right\| </math>

*Rank of the vector* <math>\vec x</math> over the field <math>GF\left( {q^N} \right)</math> is a rank of the corresponding matrix <math>A\left( {\vec x} \right)</math> over the field <math>GF\left( {q} \right)</math> denoted by <math>r\left( {\vec x; q} \right)</math>.

The set of all vectors <math>\vec x</math> is a space <math>X^n = A_N^n</math>. The map <math>\vec x \to r\left( \vec x; q \right)</math>) defines a norm over <math>X^n</math> and a *rank metric*:

- <math>

d\left( {\vec x;\vec y} \right) = r\left( {\vec x - \vec y;q} \right)

</math>

## Rank code[edit]

A set <math>\{x_1, x_2, \dots, x_n\}</math> of vectors from <math>X^n</math> is called a code with code distance <math>d = \min d\left( x_i ,x_j \right)</math> and a *k*-dimensional subspace of <math>X^n</math> – a linear (*n*, *k*)-code with distance <math>d \leq n - k + 1</math>.

## Generating matrix[edit]

There is known the only construction of rank code, which is a *maximum rank distance* MRD-code with *d* = *n* − *k* + 1.

Let's define a Frobenius power <math>[i]</math> of the element <math>x \in GF(q^N)</math> as

- <math>

x^{[i]} = x^{q^{i \mod N}}. \, </math>

Then, every vector <math>\vec g = (g_1, g_2, \dots, g_n), ~ g_i \in GF(q^N), ~ n \leq N</math>, linearly independent over <math>GF(q)</math>, defines a generating matrix of the MRD (*n*, *k*, *d* = *n* − *k* + 1)-code.

- <math>

G = \left\| {\begin{array}{*{20}c}

g_1 & g_2 & \dots & g_n \\ g_1^{[m]} & g_2^{[m]} & \dots & g_n^{[m]} \\ g_1^{[2 m]} & g_2^{[2 m]} & \dots & g_n^{[2 m]} \\ \dots & \dots & \dots & \dots \\ g_1^{[k m]} & g_2^{[k m]} & \dots & g_n^{[k m]}

\end{array}} \right\|, </math>

where <math>\gcd(m,N) = 1</math>.

## Applications[edit]

There are several proposals for public-key cryptosystems based on rank codes. However, most of them have been proven insecure (see e.g. Journal of Cryptology, April 2008).

Rank codes are also useful for error and erasure correction in network coding.

## See Also on BitcoinWiki[edit]

## Notes[edit]

## Source[edit]