Information Security Textbook
Information Security Textbook
Meryem Benammar
3 février 2022
Résumé
In the present textbook, we briefly touch on basic notions on cryptography, and
more specifically, on stream ciphers. The aim is to give an intuitive understanding of
the complexity of designing practical security scheme, and to motivate the tremendous
undertaken by the cryptography community in order to develop feasible and practi-
cal algorithms. A nice introduction on cryptography can be found in Understanding
Cryptography by Christof Paar (link on the course page)
The rationale behind this order of blocks is as follows. If we perform security prior
to image compression, then the compression scheme would be useless since the informa-
tion security algorithms in general destroy any apparent structure of the data, which is
elementary for compression. If on the contrary encryption is performed after error correc-
tion, then any loss of a single bit of the encrypted message would be detrimental for the
decryption process (as will become clearer later).
Hence, naturally, information security is handled after information compression and
before error correction.
where P(Û k 6= U k ) measures the reliability of the communication, and I(U k ; C n ) measures
the so-called information leakage to an eavesdropper which observes only the encrypted
message cn .
Any scheme which satisfies these conditions is termed a perfectly secure communication
scheme. Perfect secrecy implies that an eavesdropper who observes only the encrypted
message does have a full uncertainty about the transmitted message, as if it needed to
guess it at random.
The one-time pad principle is the most perfect source of secrecy that one can achieve
from a mathematical point of view. It consists in the following :
• A key (or cipher) v k of k bits which is know perfectly to both communication parties
• An encryption (ciphering) function which produces the following message ck given
by
ck = uk ⊕ v k (5)
• A decryption (deciphering) which combines the key v k and the received message ck
to produce the following
uk = ck ⊕ v k (6)
Shannon proved in 1949 that this scheme is perfectly secure as follows. If you measure
the information leakage which occurs between the original message and the encrypted
message, which can be measured by the mutual information I(U k ; C k ), then you can show
that this leakage is zero if and only if a few conditions are satisfied :
• The key must be at least as long (in bits) as the message (if it is longer, we pad
the message with zero bits)
• The key must be a perfectly uniformly distributed binary stream (it cannot stem
from a pseudo random generator)
• The key must never be reused in whole or in part
• The key must be kept completely secret from any undesired node
In this course, our aim is to highlight the importance of these assumptions and show
that, if one of them is violated, the scheme is no longer secure.
Although one cannot recover uk1 and uk2 separately, one can have information on the
difference of both messages uk1 ⊕ uk2 , which might leak some useful information and
reduce the search space for both uk1 and uk2 .
5
• Prior information on the key : if the key was generated using a certain predictable
process (as for instance the output of a pseudo-random number generator) then, the
eavesdropper can reverse engineer or even try to guess the key and hence, decipher
part of the transmitted message.
In this course, we show how using the same key twice, or leaking the seed, is detrimental
to the one-time pad security.
In this course, we will be interested in a specific PRNG called the Lagged Fibonacci
Shift Register (LFSR), which is not a CS-PRNG, and thus, presents some security
issues which will be highlighted in this course.
An example of the outputs of the LFSR at times from i = 17 upwards are given by
The LFSR being a PRNG, the values output by it will eventually loop again to an initial
value, after a certain number of bits called the period P . For an LFSR of memory m,
it can be shown that the maximum value of the period P = 2m , however, this value
is not achieved unless the LFSR is a so-called maximal LFSR, which is allowed by the
state equation. A maximal LFSR presents also the advantage of having the same period
whatever the initial seed. A list of all maximal LFSR can be found in Wikipedia for a
given memory m, and the LFSR selected here is one of those best LFSR.