Re: [sage-devel] [Crypto] S-box Linear Approximation Matrix scaling

2018-02-22 Thread Friedrich Wiemer
I opened a ticket for this: #24819 -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [sage-devel] [Crypto] S-box Linear Approximation Matrix scaling

2018-02-17 Thread Friedrich Wiemer
Ah, thats a very good idea! Then I would suggest to extend this scaled argument to the following: "bias" - return actual biases that is in [-0.5, 0.5] "correlation" - return correlations, so in [-1, 1] "absolute bias" - return biases*2^n (default) "fourier coefficient" - return fourier

Re: [sage-devel] [Crypto] S-box Linear Approximation Matrix scaling

2018-02-16 Thread Samuel Lelievre
How about adding an optional argument "scaled", defaulting to True: Then if S is an S-box, for instance sage: from sage.crypto.sbox import SBox sage: S = SBox(7,6,0,4,2,5,1,3) one could call sage: S.linear_approximation_matrix() or sage:

Re: [sage-devel] [Crypto] S-box Linear Approximation Matrix scaling

2018-02-16 Thread Rusydi H. Makarim
Hi Friedrich, The way it is defined in the code is consistent with the paper mentioned in the documentation (H. Heys paper on tutorial of differential and linear cryptanalysis) which, I believe, is used by many cryptanalysis researchers or students to learn differential and linear cryptanalysis