Am Mittwoch, 10. Mai 2017 15:32:17 UTC+2 schrieb Rusydi H. Makarim: > > Hi Friedrich, > > On 10-05-17 15:04, Friedrich Wiemer wrote: > > Martin Albrecht commented on issue 20336 ( > https://trac.sagemath.org/ticket/20336#comment:10) that the SBox code > should be moved from crypto.mq.SBox to some other place. I think that this > is a simple enough issue to get started contributing to the sage > development, so I'd like to work on this. Do you have any opinion, where > the code should go to? My suggestion would be crypto.sbox. > > > Agree, crypto.sbox makes the most sense to me. A change would also be > required for other modules that depend mq.SBox, such as mq.SR in mq/sr.py > (This is the only module that I am aware of). Could you please open a > ticket for this issue ? >
I opened https://trac.sagemath.org/ticket/22986 and commited the corresponding changes. There were also some changes in miniaes and sdes and in the documentation necessary. If I build it correctly on my system, all doctests are passing (I'm not 100% sure, as my system wide sage installation interfered a bit with the developing version, but that seems to be fine now). > Another nice thing would be, to have common sboxes available in this > module, like the AES sbox etc. I have a list of SBoxes from a colleague > that I could add. But again, I have no idea, what the best structure would > be. Maybe a dictionary of the form: > sboxes['AES'] = SBox([...]) > sboxes['PRESENT'] = SBox([...]) > sboxes['Skinny'] = SBox([...]) > ? > > > There will be a long list of S-Boxes in this case. My suggestion is to put > them in a separate module, say crypto.sboxes, and then create instance of > SBox for each sbox, e.g. > > AES = SBox([...]) > PRESENT = SBox([...]) > > OK that sounds like a reasonable design. I'll take a look at this. Cheers, Friedrich -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.
