Ticket #5665 (closed defect: fixed)
[with patch, positive review] Bug in ShrinkingGeneratorCipher
| Reported by: | sbulygin | Owned by: | kohel |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-4.1 |
| Component: | cryptography | Keywords: | stream cipher, shrinking generator |
| Cc: | Author(s): | Stanislav Bulygin | |
| Report Upstream: | Reviewer(s): | Minh Van Nguyen | |
| Merged in: | sage-4.1.rc0 | Work issues: |
Description
In class ShrinkingGeneratorCipher?, function __call__ the initialization and update of the initial states is buggy. Namely in the peace of code
g1 = e1.connection_polynomial() n1 = g1.degree() IS_1 = e1.initial_state() g2 = e2.connection_polynomial() n2 = g2.degree() IS_2 = e1.initial_state()
the last line 'IS_2 = e1.initial_state()' should be 'IS_2 = e2.initial_state()'. Also at the end in
IS_1 = KStream[r-n-1:r-n+n1] IS_2 = KStream[r-n-1:r-n+n2]
the last line should be 'IS_2 = DStream[r-n-1:r-n+n2]' The corrected file is attached.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

