Stream Cipher and
Block Cipher
Learning Objectives
• By the end of this session, students will be able to:
• Define stream ciphers and block ciphers
• Explain how each cipher works
• Compare security and performance
• Identify suitable cloud use cases
• Justify cipher selection in assignments
What is a Cipher?
• A cipher is a cryptographic algorithm
• Converts plaintext → ciphertext
• Uses a secret key
• Ensures confidentiality of data
• Core component of encryption systems
Why Ciphers are important in Cloud
• Cloud data is stored remotely
• Shared infrastructure risks
• Data travels across networks
• Encryption protects data at:
• Rest
• Transit
• Processing
Classification of Ciphers
• Ciphers are classified based on:
• Data processing method
• Size of data units
• Encryption workflow
• Two main types:
1. Stream Cipher
2.Block Cipher
Stream Cipher
• Encrypts data bit-by-bit or byte-by-byte
• Uses a keystream
• Encryption uses XOR operation
• Formula:
Ciphertext = Plaintext Keystream
⊕
Stream Cipher Working
1.Secret key is provided
2.Keystream generator produces pseudo-random bits
3.Each plaintext bit is XORed
4.Ciphertext is generated
5.Same process used for decryption
Stream Cipher Examples
• RC4 ❌ (broken, insecure)
• Salsa20
• ChaCha20 ✅ (modern & secure)
• SNOW 3G (mobile networks)
Advantages Of Stream Ciphers
• Very fast encryption
• Low memory usage
• No padding required
• Suitable for real-time data
• Low latency
Disadvantages Of Stream Ciphers
• Keystream reuse causes total compromise
• Weak randomness breaks security
• Difficult to detect misuse
• Older algorithms are broken
Stream Cipher Cloud Use Cases
• Video/audio streaming
• VPN tunnels
• Secure messaging
• IoT cloud communication
Block Cipher
• Encrypts data in fixed-size blocks
• Common block size: 128 bits
• Same key encrypts each block
• Padding added if needed
Block Cipher Working
1.Plaintext divided into blocks
2.Each block encrypted using the key
3.Ciphertext blocks combined
4.Padding applied if required
Block Cipher Examples
• AES (industry standard)
• DES ❌ (insecure)
• 3DES ❌ (deprecated)
• Blowfish
Modes Of Operation
• Block ciphers require modes:
• ECB ❌ (insecure)
• CBC
• CTR
• GCM ✅ (cloud standard)
Why ECB is Insecure
• Same plaintext → same ciphertext
• Reveals patterns
• No randomness
• Not allowed in cloud systems
AES-GCM
(CLOUD STANDARD)
Provides:
• Confidentiality
• Integrity
• Authentication
Used in:
• AWS
• Azure
• Google Cloud
Advantages Of Block Ciphers
• Strong security guarantees
• Well-studied algorithms
• Resistant to cryptanalysis
• Ideal for data storage
Disadvantages Of Block Ciphers
• Slower than stream ciphers
• Requires padding
• More processing overhead
• Complex configuration
STREAM vs BLOCK
(COMPARISON TABLE)
Feature Stream Cipher Block Cipher
Data Unit Bit/Byte Fixed block
Speed Very Fast Moderate
Padding No Yes
Security Key Dependent Mode Dependent
Cloud Usage Limited Widely Used
Security Comparison
• Stream cipher security depends on keystream
randomness
• Block cipher security depends on mode of operation
• AES-GCM provides strongest cloud security
• Misconfiguration = insecure system
Common Misconfigurations
• Using ECB mode
• Reusing keys
• Weak key lengths
• No integrity protection
Student Activity
• Identify the correct cipher:
1.Cloud database encryption
2.Live video streaming
3.VPN communication
Practical Task
• Encrypt a file using AES-GCM
• Observe:
• Encryption time
• File size
• Ciphertext randomness
Summary
• Stream ciphers → speed & real-time
• Block ciphers → security & storage
• AES-GCM dominates cloud security
• Correct configuration is critical

Encrption Ciphers in Applied Cyptrography in Cloud

  • 1.
  • 2.
    Learning Objectives • Bythe end of this session, students will be able to: • Define stream ciphers and block ciphers • Explain how each cipher works • Compare security and performance • Identify suitable cloud use cases • Justify cipher selection in assignments
  • 3.
    What is aCipher? • A cipher is a cryptographic algorithm • Converts plaintext → ciphertext • Uses a secret key • Ensures confidentiality of data • Core component of encryption systems
  • 4.
    Why Ciphers areimportant in Cloud • Cloud data is stored remotely • Shared infrastructure risks • Data travels across networks • Encryption protects data at: • Rest • Transit • Processing
  • 5.
    Classification of Ciphers •Ciphers are classified based on: • Data processing method • Size of data units • Encryption workflow • Two main types: 1. Stream Cipher 2.Block Cipher
  • 6.
    Stream Cipher • Encryptsdata bit-by-bit or byte-by-byte • Uses a keystream • Encryption uses XOR operation • Formula: Ciphertext = Plaintext Keystream ⊕
  • 7.
    Stream Cipher Working 1.Secretkey is provided 2.Keystream generator produces pseudo-random bits 3.Each plaintext bit is XORed 4.Ciphertext is generated 5.Same process used for decryption
  • 8.
    Stream Cipher Examples •RC4 ❌ (broken, insecure) • Salsa20 • ChaCha20 ✅ (modern & secure) • SNOW 3G (mobile networks)
  • 9.
    Advantages Of StreamCiphers • Very fast encryption • Low memory usage • No padding required • Suitable for real-time data • Low latency
  • 10.
    Disadvantages Of StreamCiphers • Keystream reuse causes total compromise • Weak randomness breaks security • Difficult to detect misuse • Older algorithms are broken
  • 11.
    Stream Cipher CloudUse Cases • Video/audio streaming • VPN tunnels • Secure messaging • IoT cloud communication
  • 12.
    Block Cipher • Encryptsdata in fixed-size blocks • Common block size: 128 bits • Same key encrypts each block • Padding added if needed
  • 13.
    Block Cipher Working 1.Plaintextdivided into blocks 2.Each block encrypted using the key 3.Ciphertext blocks combined 4.Padding applied if required
  • 14.
    Block Cipher Examples •AES (industry standard) • DES ❌ (insecure) • 3DES ❌ (deprecated) • Blowfish
  • 15.
    Modes Of Operation •Block ciphers require modes: • ECB ❌ (insecure) • CBC • CTR • GCM ✅ (cloud standard)
  • 16.
    Why ECB isInsecure • Same plaintext → same ciphertext • Reveals patterns • No randomness • Not allowed in cloud systems
  • 17.
    AES-GCM (CLOUD STANDARD) Provides: • Confidentiality •Integrity • Authentication Used in: • AWS • Azure • Google Cloud
  • 18.
    Advantages Of BlockCiphers • Strong security guarantees • Well-studied algorithms • Resistant to cryptanalysis • Ideal for data storage
  • 19.
    Disadvantages Of BlockCiphers • Slower than stream ciphers • Requires padding • More processing overhead • Complex configuration
  • 20.
    STREAM vs BLOCK (COMPARISONTABLE) Feature Stream Cipher Block Cipher Data Unit Bit/Byte Fixed block Speed Very Fast Moderate Padding No Yes Security Key Dependent Mode Dependent Cloud Usage Limited Widely Used
  • 21.
    Security Comparison • Streamcipher security depends on keystream randomness • Block cipher security depends on mode of operation • AES-GCM provides strongest cloud security • Misconfiguration = insecure system
  • 22.
    Common Misconfigurations • UsingECB mode • Reusing keys • Weak key lengths • No integrity protection
  • 23.
    Student Activity • Identifythe correct cipher: 1.Cloud database encryption 2.Live video streaming 3.VPN communication
  • 24.
    Practical Task • Encrypta file using AES-GCM • Observe: • Encryption time • File size • Ciphertext randomness
  • 25.
    Summary • Stream ciphers→ speed & real-time • Block ciphers → security & storage • AES-GCM dominates cloud security • Correct configuration is critical