1

I'm working with cipher Kalyna.

Kalyna — like AES — has MDS tables in its MixColumns step. But Kalyna's documentation doesn't list these MDS tables.

Could you give me a hint where to find proper documentation or the particular MDS tables?

kelalaka
  • 49,797
  • 12
  • 123
  • 211
Roman S.
  • 23
  • 2

1 Answers1

3

The Kalyna paper does contain the elements on page 6, but it is not formatted in the familiar table manner, rather it describes it via mathematical formula and rotations, as the matrix is circulant:

$w_{i,j} = (υ \ggg i) ⊗ G_j $

$ υ = (0x01,0x01,0x05,0x01,0x08,0x06,0x07,0x04)$

Where $G$ is the input matrix and $W = (w_{i,j})$ is the output matrix

Additionally, the finite field is reduced modulo $x^8 + x^4 + x^3 + x^2 + 1$ or $0x11D$, which is the same field as the whirlpool hash function.

The familiar matrix format for $v$ would be as follows:

$$ \begin{bmatrix} 1& 1& 5& 1& 8& 6& 7& 4 \\ 4& 1& 1& 5& 1& 8& 6& 7 \\ 7& 4& 1& 1& 5& 1& 8& 6 \\ 6& 7& 4& 1& 1& 5& 1& 8 \\ 8& 6& 7& 4& 1& 1& 5& 1 \\ 1& 8& 6& 7& 4& 1& 1& 5 \\ 5& 1& 8& 6& 7& 4& 1& 1 \\ 1& 5& 1& 8& 6& 7& 4& 1 \\ \end{bmatrix}$$

I believe the inverse matrix is as follows:

$$ \begin{bmatrix} AD& 95& 76& A8& 2F& 49& D7& CA \\ CA& AD& 95& 76& A8& 2F& 49& D7 \\ D7& CA& AD& 95& 76& A8& 2F& 49 \\ 49& D7& CA& AD& 95& 76& A8& 2F \\ 2F& 49& D7& CA& AD& 95& 76& A8 \\ A8& 2F& 49& D7& CA& AD& 95& 76 \\ 76& A8& 2F& 49& D7& CA& AD& 95 \\ 95& 76& A8& 2F& 49& D7& CA& AD \\ \end{bmatrix}$$

Richie Frame
  • 13,278
  • 1
  • 26
  • 42