Ticket #8379 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

add arithmetic for Boolean functions

Reported by: ylchapuy Owned by: mvngu
Priority: minor Milestone: sage-4.4.4
Component: cryptography Keywords:
Cc: malb Work issues:
Report Upstream: N/A Reviewers: Martin Albrecht
Authors: Yann Laigle-Chapuy Merged in: sage-4.4.4.alpha0
Dependencies: Stopgaps:

Description

we define:

  • ~ : returns the complement Boolean function
  • +,* : corresponds to the same op. on the ANFs
  • | : concatenate the truth tables ( used for various constructions, e.g.  http://eprint.iacr.org/2009/134.pdf )

Attachments

trac_8379.patch Download (9.7 KB) - added by ylchapuy 3 years ago.
trac_8379_v2.patch Download (8.4 KB) - added by ylchapuy 3 years ago.
apply only this one

Change History

Changed 3 years ago by ylchapuy

comment:1 Changed 3 years ago by ylchapuy

  • Cc malb added
  • Status changed from new to needs_review
  • Authors set to Yann Laigle-Chapuy

The provided patch also correct a bug in the computation of the algebraic immunity.

comment:2 Changed 3 years ago by ylchapuy

  • Milestone set to sage-4.3.4

comment:3 Changed 3 years ago by malb

The patch looks good (I'll run doctests once my update is done) but we usually do not implement __iadd__ and __imul__ since objects in Sage are generally supposed to be immutable. There are some exceptions like matrices where this wouldn't make any sense.

comment:4 Changed 3 years ago by malb

Doctests pass. Thust for a positive review from me all that's needed would be to either remove __iadd__ or to give a justification why this class should be an exception.

comment:5 Changed 3 years ago by wdj

  • Status changed from needs_review to needs_info

ylchapuy?

Changed 3 years ago by ylchapuy

apply only this one

comment:6 Changed 3 years ago by ylchapuy

  • Status changed from needs_info to needs_review

Patch updated. I removed the inplace versions __iadd__ and __imul__.

Apply only the last patch.

(and sorry for the delay, I'm quite busy those days...)

comment:7 Changed 3 years ago by malb

  • Status changed from needs_review to positive_review
  • Reviewers set to Martin Albrecht

Patch looks good, applies cleanly, doctests pass on sage.math

comment:8 Changed 3 years ago by mhansen

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.4.4.alpha0
Note: See TracTickets for help on using tickets.