In this paper we introduce a general class of stream and block ciphers that
are defined by means of systems of (ordinary) explicit difference equations
over a finite field. We call this class "difference ciphers". Many important
ciphers such as systems of LFSRs, Trivium/Bivium and Keeloq are difference
ciphers. To the purpose of studying their underlying explicit difference
systems, we introduce key notions as state transition endomorphisms and show
conditions for their invertibility. Reducible and periodic systems are also
considered. We then propose general algebraic attacks to difference ciphers
which are experimented by means of Bivium and Keeloq.Comment: 22 page