I read a paper about a nonlinear invariant attack that is "Nonlinear Invariant Attack: Practical Attack on Full SCREAM, iSCREAM, and Midori64"
And I've found a website of sagemath : https://trac.sagemath.org/ticket/21252 where they have a code to find nonlinear invariant for any S-box. But it's not official so it's not included in sagemath. Does anyone know how to do it? I want to write a code in C++ to find nonlinear invariant, but I don't get the idea of the author. Thank you