انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة

Lecture5 of Information Security for Diploma 2018-2019

Share |
الكلية كلية العلوم للبنات     القسم قسم الحاسبات     المرحلة 7
أستاذ المادة محمد عبد الله ناصر الزبيدي       12/11/2018 06:42:13
Lecture 5 Title : Stream Ciphers

Lecture Outlines:
5.1 Operation of Stream Ciphers
5.2 Key Stream Generators
5.3 Stream Encryption Approaches
5.4 Nonlinear Shift Register
5.5 Measure of Randomness
5.6 Stream cipher Cryptanalysis
Objectives:
After studying this lecture, you will be able to discuss
? Operating principles of a stream cipher.
? An important stream cipher method RC4.
? Ways to generate random key stream.
? Randomness Measures of the key stream.

5.1 Operation of Stream Ciphers
A typical stream cipher encrypts plaintext one byte at a time; although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time. Figure (5.1) shows the operation of a stream cipher. In stream ciphers, a key is input to a pseudorandom bit generator that produces a stream of bit numbers that are apparently random. The output of the generator, called a key stream, is combined one byte at a time with the plaintext stream using the bitwise exclusive-OR (XOR) operation. For example, if the next byte generated by the generator is 10011100 and the next plaintext byte is 01001110, then the resulting cipher text byte is:











Figure 5.1 Stream cipher diagram

Decryption requires the use of the same pseudorandom sequence:

01001110 plain text
Therefore, it can be expressed mathematically as follows:
K M=C
C K=M K K=M
K 0 =k and K K K =0
Also, the following are some important design considerations for a stream cipher.
1. The encryption sequence should have a large period. Note that the XOR of same plain text block (blocks being small it is possible that blocks repeat very often) and the same key from the generator will result in identical cipher blocks. A pseudorandom number generator uses a function that produces a deterministic stream of bits that eventually repeats. The longer the period of repeat the more difficult it will be to do cryptanalysis. This is essentially the same consideration that was discussed, namely that the longer the keyword the more difficult the cryptanalysis.
2. It is desirable that the key stream should approximate the properties of a true random number stream as close as possible. For example, there should be an approximately equal number of 1s and 0s. If the key stream is treated as a stream of bytes, then all of the 256 possible byte values should appear approximately equally often. If the key stream is close truly random sequence, the more randomized will the cipher text be, making cryptanalysis more difficult.
3. The output of the pseudorandom number generator is conditioned on the value of the input key. To guard against brute-force attacks, the key needs to be sufficiently long. The same considerations that apply to block ciphers are valid here. Thus, with current technology, a key length of at least 128 bits is desirable.

For applications that require encryption/decryption of a stream of data, such as over a data communications channel or a browser/Web link, a stream cipher might be the better alternative. For applications that deal with blocks of data, such as file transfer, e-mail, and database, block ciphers may be more appropriate. However, either type of cipher can be used in virtually any application.
Ron Rivest, one of the authors of asymmetric encoding method RSA, is the designer
of RC4. The official name for this algorithm is “Rivest cipher 4”. However because of its ease of reference the name “RC4” has stuck. RC4 is widely used in Wired Equivalent Privacy (WEP) protocol and WPA (WiFi Protected Access) protocol. The reason for its wide deployment is its speed and simplicity. Both hardware and software implementations are possible. RC4 is a stream cipher designed in 1987 by Ron Rivest for RSA Security. It is a variable key size stream cipher with byte-oriented operations. The algorithm is based on the use of a random permutation. Analysis shows that the period of the cipher is overwhelmingly likely to be greater than 10100.


المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
الرجوع الى لوحة التحكم