Are the weaknesses of my s-boxes attackable?
The strengths and weaknesses of an S-Box can be determined by analysis of the commonly agreed within the cryptanalytic community S-Box properties.
The following list of properties have been described in a 2014 paper &quot;Study of S-box properties in block cipher&quot; by Kamsiah Mohamed and colleagues: Robustness, Balancing, Strict Avalance Criterion, Nonlinearity, Differential Uniformity, Linear Approximation, Algebraic Complexity, Fp/OFp, Bit Independence criterion. There may be other important properties as well.
Practical aspects of strong S-Box generation, considering these properties, have been described by Waqar Ahmad Khan and colleagues in a 2011 article &quot;Construction of Cryptographically Strong 8x8 S-boxes&quot;.
A toolbox for S-Box analysis have been described by Stjepan Picek and colleagues in a 2016 paper.
Your question was whether we can find a way to attack the encryption scheme based on your S-Boxes, but from the description that you gave, on how you use them, they are not actually S-Boxes, but the keys. In cryptography, the S-box (substitution box) is the basic component of the symmetric key algorithm that performs replacement. In block ciphers, S-Boxes are usually applied to conceal the relationship between the key and the ciphertext to satisfy the Shannon's property of confusion. This property refers to making the relationship between ciphertext and symmetric key as complicated and involved as possible. S-boxes need to be strong, in terms of the properties above mentioned, but they are not necessarily need to be secret. To the contrary, in a Russian GOST 28147-89 (RFC 5830), developed in the 1970s, S-Boxes are secret, and are called &quot;long-term&quot; keys, in addition to &quot;session&quot; keys, so both &quot;long-term&quot; and &quot;session&quot; keys comprise the key. This approach has its drawbacks because the &quot;long-term&quot; key, i.e. the S-Box should be thoroughly analyzed to comply to the properties above mentioned. What you call &quot;S-Box&quot; in your algorithm is actually a key. If what you call &quot;S-Box&quot; is actually a one-time pad, i.e. a truly random key used only once, then it is a completely different matter. The one-time pad was first described by Frank Miller in 1882 and was reinvented in 1917 by Gilbert Vernam who in 1919 was granted an US Patent 1,310,719 for the encrypted XOR operation of one-time pads. So, if what you call &quot;S-Boxes&quot; fit the definition of one-time pads, than you've got the perfect secrecy. But this is unlikely that you meant that. Thus, I would recommend to analyze your S-Boxes according to the properties above described.