1

I want to find the minimum number of active Sboxes for AES circulant matrix circ(2,3,1,1) in Galois field GF(2^8) using pulp library from Python. Since I am a beginner, I am hoping if I can get the code somewhere. Kindly share any link that could help me with the python code. Thank you in advance.

1 Answers1

1

I am not a python expert or even user. So caveat emptor (buyer beware). But have a look at https://pypi.org/project/cryptanalysis/

It seems to use a random Sbox and a random Pbox but you should be able to adapt to your needs. The settings include:

sbox_size = 6 # bits pbox_size = sbox_size * 16 # 16 sboxes num_rounds = 4

and then, for example

d_c = cryptanalysis.differential_cryptanalysis.DifferentialCryptanalysis( sbox, pbox, num_rounds+1)

Edit: Minimum number of active sboxes are discussed in this question. It's related to MDS codes and determine the branch number. For the MDS code used in AES, the code length is $n=8$ bytes (that's the symbol alphabet used, essentially $GF(2^8)$) and has dimension $k=4,$ so the minimum weight which is the same as the minimum number of active Sboxes is $n-k+1=5.$ Here is another related question and answer.

kodlu
  • 25,146
  • 2
  • 30
  • 63