#6454: [with patch, needs work] improve sbox linear and differences matrices
computation
--------------------------+-------------------------------------------------
Reporter: ylchapuy | Owner: somebody
Type: enhancement | Status: new
Priority: minor | Milestone: sage-4.1.1
Component: cryptography | Keywords:
Reviewer: | Author: Yann Laigle-Chapuy
Merged: |
--------------------------+-------------------------------------------------
Comment(by malb):
Hi there, it is embarrassing how bad my naive original code was. Here's a
comparison (for the release tour)
**Old***
{{{
sage: S = mq.SR(1,4,4,8).sbox()
sage: %time _ = S.difference_distribution_matrix()
CPU times: user 82.14 s, sys: 0.01 s, total: 82.15 s
Wall time: 82.15 s
sage: %time _ = S.linear_approximation_matrix()
CPU times: user 145.10 s, sys: 0.02 s, total: 145.12 s
Wall time: 145.12 s
}}}
***New***
{{{
sage: S = mq.SR(1,4,4,8).sbox()
sage: %time _ = S.difference_distribution_matrix()
CPU times: user 0.32 s, sys: 0.00 s, total: 0.32 s
Wall time: 0.32 s
sage: %time _ = S.linear_approximation_matrix()
CPU times: user 1.10 s, sys: 0.00 s, total: 1.10 s
Wall time: 1.10 s
}}}
The code looks good, doctests pass.
The only issue: the {{{sage -coverage}}} script will pick up
{{{_walsh_transform}}} and complain that it isn't documented and
doctested.
Of course it is impossible to doctest this inner function directly, but
the keyword {{{# indirect doctest}}} will do the trick.
This is a positive review except for the missing documentation.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6454#comment:2>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---