## 70 Reputation

5 years, 256 days

## The output covers at least 60 percent of...

Is it possible that I request you to improve the procedure such that the output covers at least 60 percent of L-entries.

Sincerely yours

## @Carl Love No need to this procedur...

@Carl Love No need to this procedure and because of this I deleted the question. Thanks and happy new year.

## @Carl Love Let me to give an exampl...

@Carl Love Let me to give an example to understand this technique. Let G:=GF(2,8,x^8+x^4+x^3+x+1). Let alpha be a root of x^8+x^4+x^3+x+1. Then you can check that the following matrix is an MDS matrix over G:

```M:=Matrix(4, 4, {(1, 1) = alpha, (1, 2) = alpha+1, (1, 3) = 1, (1, 4) = 1, (2, 1) = 1, (2, 2) = alpha, (2, 3) = alpha+1, (2, 4) = 1, (3, 1) = 1, (3, 2) = 1, (3, 3) = alpha, (3, 4) = alpha+1, (4, 1) = alpha+1, (4, 2) = 1, (4, 3) = 1, (4, 4) = alpha})
```

The matrix M is called the diffusion layer of AES. Now consider the following 8x8 binary matrix

`r=Matrix(8, 8, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 1, (2, 1) = 1, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 1, (3, 1) = 0, (3, 2) = 1, (3, 3) = 0, (3, 4) = 0, (3, 5) = 0, (3, 6) = 0, (3, 7) = 0, (3, 8) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 1, (4, 4) = 0, (4, 5) = 0, (4, 6) = 0, (4, 7) = 0, (4, 8) = 1, (5, 1) = 0, (5, 2) = 0, (5, 3) = 0, (5, 4) = 1, (5, 5) = 0, (5, 6) = 0, (5, 7) = 0, (5, 8) = 1, (6, 1) = 0, (6, 2) = 0, (6, 3) = 0, (6, 4) = 0, (6, 5) = 1, (6, 6) = 0, (6, 7) = 0, (6, 8) = 0, (7, 1) = 0, (7, 2) = 0, (7, 3) = 0, (7, 4) = 0, (7, 5) = 0, (7, 6) = 1, (7, 7) = 0, (7, 8) = 0, (8, 1) = 0, (8, 2) = 0, (8, 3) = 0, (8, 4) = 0, (8, 5) = 0, (8, 6) = 0, (8, 7) = 1, (8, 8) = 0})`

You can verify that the characteristic polynomial of r over GF(2) is equal to x^8+x^4+x^3+x+1. Now, based on the matrix r, the binary format of M is in the following form

```B:=Matrix(32,32,
[[0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
[1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0],
[0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0],
[0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0],
[0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0],
[0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1],
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0],
[0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0],
[0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0],
[0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0],
[0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,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0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1],
[0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0],
[0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0],
[0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0]])```

For example, the submatrix B([1,2,3,4,5,6,7,8],[1,2,3,4,5,6,7,8]) corresponds to alpha or  B([1,2,3,4,5,6,7,8],[9,10,11,12,13,14,15,16]) corresponds to alpha+1.  I hope you can find your answer with this example.

## @Carl Love Thank you for your nice ...

@Carl Love Thank you for your nice and effient answer. Consider the following 80x80 binary matrix:

```Matrix(80,80,
[[0,0,1,0,1,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0],
[0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0],
[0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0],
[0,0,1,1,1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0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,0,1,0,1,0,1,0,1,1,0,1,1,1,0,0,0,1,1,1,1,1,0,1,1,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1]])```

Now by VV's procedure we have:

```st := time();
MDS(A, 8);
time()-st
IsMDS
40.296
```

and by Carl's procedure we get:

```st := time();
IsMDS(A, 8);
time()-st
true
35.578
```

I can produce an MDS matrix in the binary format in every dimension. Please tell me to present it. Thanks again.

## @Carl Love  I really appreciate yo...

I really appreciate you taking the time to help me.

Merry Christmas and a happy new year.
Best regards,

## @vv I would appreciate your help in...

@vv I would appreciate your help in this question.

## @vv My last question is that let A ...

@vv My last question is that let A be an 64x64 binary matrix and k be a large positive number. Then what is the fast command in Maple such that we can compute A^k in module 2. Thanks.

## @vv I checked it and it takes just ...

@vv I checked it and it takes just 2 seconds. Your procedure reduced computation from 453 seconds to 2 seconds. A million thanks to you.

## @vv Now it works. I appreciate...

@vv Now it works. I appreciate you taking the time to respond to my questions.

## @vv Now the code made the following...

@vv Now the code made the following error

```Error, (in LinearAlgebra:-Modular:-Copy) argument 2 has invalid datatype
```

Maybe it is because of I am using an old version of Maple. Thanks for your response.

## @vv Thank you so much for your nice...

@vv Thank you so much for your nice answer. The following error will appear when I run your code:

`Error, (in MDS) invalid input: LinearAlgebra:-SubMatrix expects its 2nd argument, r, to be of type MVIndex, but received [1 .. 2, 1 .. 2]*[]`

I use Maple 15. Thanks in advance

## @vv The matrix A is obtained over f...

@vv The matrix A is obtained over finite fields using algebraic structures such as Vandermonde and cauchy matrices. Then, we choose an rxr binary matrix M and based on the matrix M, we compute the binary form of A.

## @Carl LoveYou mentioned an interesting p...

@Carl LoveYou mentioned an interesting point. Thanks.

## @Carl Love You are right. I got it....

@Carl Love You are right. I got it. Thanks for your attention.

## @vv Assume G:=GF(2,n,f) where ...

@vv Assume G:=GF(2,n,f) where f is an irreducible polynomial over GF(2). Let x be a root of f. Now consider we have an element of G such as

`e=sum(a[i]*x^i, i = 0 .. n-1)`

where a[i]'s are binary numbers. Next, we want to obtain an nxn binary matrix B such that B corresponds to e.

Let M be an nxn binary matrix such that its characteristic polynomial over GF(2) be f. Then the following binary matrix B can be assumed as the binary format of e.

```B=sum(a[i]*M^i, i = 0 .. n-1) mod 2
```
 1 2 3 4 5 Page 1 of 5
﻿