#20336: Add more features to mq.SBox
-------------------------------------+-------------------------------------
Reporter: ruhm | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.2
Component: cryptography | Resolution:
Keywords: SBox, | Merged in:
cryptography | Reviewers:
Authors: Rusydi H. Makarim | Work issues:
Report Upstream: N/A | Commit:
Branch: | 38b627e25ee6525ec6ffd83d55ecbeea574ea155
u/ruhm/improved_sbox | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by ruhm):
Hi,
Thanks, I have updated it according to the initial comment. And yes, this
is my first contribution to SAGE.
-- Rusydi
Replying to [comment:4 tscrim]:
> I can't comment to much on the code itself since it is outside of my
expertise. However, I can make some comments on formatting:
>
> - Instead of {{{$}}} for latex, you should use {{{`}}}. (We do support
the former, but it is not as well-supported as the latter.)
> - Instead of `\mathbb{F}_2`, you should use the macro `\GF{2}` for
consistency with the rest of Sage.
> - Error statements are not sentences, and as such, should not start with
a uppercase letter nor have a period. This is also to be consistent with
Python.
> - The input block should be formatted like this:
> {{{
> - ``b`` -- either an integer or a tuple of `\GF{2}` elements of
> length ``self.n``
> }}}
> - Remove the unnecessary parentheses here: `return
(self.differential_uniformity() == 2)`.
> - It is better to use `\mathrm{wt}` or `\operatorname{wt}` instead of
`\text{wt}` (this is a latex thing having to do with spacing rules).
> - You should use `.. MATH::` and have the equation indented on a
separate line (with a blank line inbetween).
> - Try to keep lines less than 80 characters long
> - `autocorrelation_matrix` should be a `@cached_method`. Also make sure
it returns an immutable matrix.
> - All parentheses are extraneous here: `if ((m & 1) == 0):`. At least
the outer ones are.
> - I prefer `EXAMPLES::` even when there is only one example; more maybe
added later and this is for consistency.
> - In the doc, do {{{``TypeError``}}}.
>
> Otherwise the doc and coding style looks good. I could try to review the
code if no one else steps forward.
>
> Also is this your first contribution to Sage?
--
Ticket URL: <http://trac.sagemath.org/ticket/20336#comment:7>
Sage <http://www.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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.