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
for the first time. Together with the paper, SageMath can be a companion
educational tool for introducing the concept of linear and differential
cryptanalysis. In that respect i think its more beneficial to change its
description in the documentation rather than changing the function.

Regards,
Rusydi

On 16-02-18 15:55, Friedrich Wiemer wrote:
> I recently stumbled across the fact that the implementation of
> SBox().linear_approximation_matrix() returns /scaled/ Fourier
> coefficients.
> While the documentation says exactly this, i.e., "[the matrix] encodes
> the bias[es]", my personal intuition is that this matrix should
> contain the actual Fourier coefficients.
> In fact, the matrix is computed using the Fourier-Walsh transform for
> each component function and then scales the resulting matrix
> accordingly. On the other side, this scaling is then for other methods
> reversed (e.g. in the `nonlinearity` and `linearity` method).
>
> Of course, my argument is basically only personal taste, but my
> feeling is that containing the /unscaled/ Fourier coefficients is,
> what one would assume when only looking at the API and not at the
> documentation.
> So, I propose to change this, but would like to hear your opinions on
> this?
> -- 
> 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 sage-devel+unsubscr...@googlegroups.com
> <mailto:sage-devel+unsubscr...@googlegroups.com>.
> To post to this group, send email to sage-devel@googlegroups.com
> <mailto:sage-devel@googlegroups.com>.
> Visit this group at https://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to