Ticket #8379 (closed enhancement: fixed)
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
Change History
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: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: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...)

