Foundations of Cryptography (CYS 602) : Lecture #2 Stream Ciphers
Foundations of Cryptography (CYS 602) : Lecture #2 Stream Ciphers
CRYPTOGRAPHY
(CYS 602)
LECTURE #2 STREAM CIPHERS
STREAM CIPHERS AND BLOCK CIPHERS
• Block ciphers encrypt an entire block of plaintext bits at a time with the same key.
• The encryption of any plaintext bit in a given block depends on every other plaintext bit
in the same block.
• Some block ciphers have a block length of 128 bits (16 bytes) such as the advanced
encryption standard (AES).
• Other block ciphers have a block length of 64 bits (8 bytes) such as the data encryption
standard (DES) or triple DES (3DES) algorithm.
STREAM CIPHERS VS. BLOCK CIPHERS
• for encrypting computer communication on the Internet, block ciphers are used more often than stream ciphers,
except for the stream cipher RC4 .
• stream ciphers are small and fast, therefore they are used for applications with little computational resources.
• It was assumed that stream ciphers encrypt more efficiently than block ciphers.
they need fewer processor instructions (or processor cycles)
they need fewer gates (or smaller chip area)
• However, modern block ciphers such as AES are also very efficient in
• software.
• Moreover, for hardware, there are also highly efficient block ciphers, such as PRESENT, which are as efficient as
very compact stream ciphers.
ENCRYPTION AND DECRYPTION WITH STREAM
CIPHERS
• For example if each bit xi is encrypted by adding a secret key stream bit si modulo 2.
• the encryption by Alice turns the uppercase A into the lower case letter m.
• Oscar, the attacker who eavesdrops on the channel, only sees the ciphertext letter m.
• Decryption by Bob with the same key stream reproduces the plaintext A again.
THE KEY STREAM
• True random number generators (TRNGs) are characterized by the fact that their output
cannot be reproduced.
• TRNGs are based on physical processes.
• TRNGs are needed for generating session keys.
(GENERAL) PSEUDORANDOM NUMBER
GENERATORS (PRNG)
• Pseudorandom number generators (PRNGs) generate sequences which are computed
from an initial seed value.
• A common requirement of PRNGs is that they possess good statistical properties.
• Their output approximates a sequence of true random numbers.
CRYPTOGRAPHICALLY SECURE
PSEUDORANDOM NUMBER GENERATORS
(CSPRNG)
• Cryptographically secure pseudorandom number generators (CSPRNGs) are a special
type of PRNG which is unpredictable.
• this means that given n output bits of the key stream si, si+1, . . . , si+n−1, where n is
some integer, it is computationally impossible to compute the subsequent bits si+n,
si+n+1, . . ..
THE ONE-TIME PAD
• Stream ciphers are less popular than block ciphers in most domains such as Internet
security except for the stream cipher RC4.
• Stream ciphers sometimes require fewer resources, e.g., code size or chip area, for
implementation than block ciphers, and therefore they are used in cell phones.
• The One-Time Pad is a provable secure symmetric cipher.
• However, it is highly impractical for most applications because the key length has to
equal the message length