#5665: Bug in ShrinkingGeneratorCipher
--------------------------+-------------------------------------------------
Reporter: sbulygin | Owner: kohel
Type: defect | Status: new
Priority: minor | Milestone:
Component: cryptography | Keywords: stream cipher, shrinking generator
--------------------------+-------------------------------------------------
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.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5665>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---