I am trying to implement the D-XOR and S-XOR count in python but despite reading multiple articles on how to perform the calculation I have failed to understand the process used. I would appreciate it if someone could demonstrate the process using an example. Below I have included some of the references that detail the process.


MDS=[[2, 3, 1, 1],
    [1, 2, 3, 1],
    [1, 1, 2, 3],
    [3, 1, 1, 2]]

enter image description here

Generator Coefficients=100011011
Generator Polynomial = x^8 + x^4 + x^3 + x^1 + 1


https://tosc.iacr.org/index.php/ToSC/article/view/806/760 https://eprint.iacr.org/2016/422.pdf https://eprint.iacr.org/2016/422.pdf https://ieeexplore.ieee.org/document/8409223 https://eprint.iacr.org/2017/1084.pdf https://eprint.iacr.org/2019/1090.pdf

  • $\begingroup$ That MDS matrix looks wrong; it should have 4 4's, not only 2 of them. And, no MDS matrix has a 2x2 submatrix of only 1's $\endgroup$ – poncho Nov 5 '20 at 18:56
  • $\begingroup$ @poncho you were right about the 2x2 submatrix of 1's. I reviewed my code and noticed that the sliding window mechanism had a step size of 2 which would cause issues when filtering out invalid MDS matrices. Thank you for your comment!!! $\endgroup$ – X_Novichok_X Nov 5 '20 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.