Introduction to Cybersecurity: Cryptography

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary function of cryptography?

  • To prevent web transactions from being tracked
  • To ensure all data is accessible in case of system failure
  • To convert data into a readable format for public networks
  • To protect confidential data across networks (correct)

Which of the following is NOT an objective of cryptography?

  • Authentication
  • Confidentiality
  • Obfuscation (correct)
  • Integrity

In symmetric encryption, what key is used for both encryption and decryption?

  • A different key for each process
  • The same key (correct)
  • A public key
  • A combination of public and private keys

Which type of cryptography uses different keys for encryption and decryption?

<p>Asymmetric encryption (A)</p> Signup and view all the answers

What is the role of an algorithm in the context of ciphers?

<p>To define the steps for encryption and decryption (D)</p> Signup and view all the answers

In a substitution cipher, what process is used to replace plaintext with ciphertext?

<p>Substituting units according to a fixed system (B)</p> Signup and view all the answers

What is the key operation in a transposition cipher?

<p>Shifting the positions of the letters (B)</p> Signup and view all the answers

What is a significant weakness of monoalphabetic ciphers?

<p>They are vulnerable to frequency analysis. (B)</p> Signup and view all the answers

In cryptanalysis, what is assumed to be known in a 'ciphertext only' scenario?

<p>The ciphertext, but nothing else (D)</p> Signup and view all the answers

In a 'known plaintext' attack, what information does the cryptanalyst possess?

<p>Examples of ciphertext and corresponding decrypted plaintext (C)</p> Signup and view all the answers

What is a characteristic of a 'chosen plaintext' attack?

<p>The attacker can chooses a message to be encrypted. (C)</p> Signup and view all the answers

What is the key feature of polyalphabetic substitution?

<p>It uses multiple substitution ciphers. (A)</p> Signup and view all the answers

In a columnar transposition cipher, how is the message read after being written in rows?

<p>Column by column (C)</p> Signup and view all the answers

What is the primary function of 'cryptanalysis'?

<p>To study encrypted data and techniques to weaken them (B)</p> Signup and view all the answers

What is a block cipher?

<p>A cipher that processes plaintext in fixed-size blocks (B)</p> Signup and view all the answers

What is the Feistel structure primarily used for?

<p>Block ciphers (D)</p> Signup and view all the answers

Which of the following is a weakness of the Data Encryption Standard (DES)?

<p>Its key size. (D)</p> Signup and view all the answers

Why was Triple DES developed?

<p>To address security concerns with the DES algorithm (B)</p> Signup and view all the answers

What key sizes does AES support?

<p>128, 192, or 256 bits (D)</p> Signup and view all the answers

The Rijndael algorithm was selected as the standard for which?

<p>Advanced Encryption Standard (AES) (D)</p> Signup and view all the answers

What is a primary characteristic of stream ciphers?

<p>They encrypt plaintext one byte at a time (D)</p> Signup and view all the answers

What makes a pseudorandom stream suitable for use in stream ciphers?

<p>It must appear to be completely random (C)</p> Signup and view all the answers

What is the primary advantage of stream ciphers compared to block ciphers?

<p>Faster speed and less code (C)</p> Signup and view all the answers

In the context of cryptography, what is a 'mode of operation'?

<p>The method of encrypting multiple blocks using a block cipher (A)</p> Signup and view all the answers

Which of the following describes the electronic codebook (ECB) mode?

<p>Each block is encrypted independently using the same key. (C)</p> Signup and view all the answers

How does Cipher Block Chaining (CBC) mode propagate encryption?

<p>By XORing each plaintext block with the previous ciphertext block before encryption (B)</p> Signup and view all the answers

In Cipher Feedback (CFB) mode, what is fed back?

<p>Previous ciphertext (D)</p> Signup and view all the answers

In Output Feedback (OFB) mode, what must be ensured about the Initialization Vector (IV)?

<p>It must constitute a nonce, i.e. non-repeating. (C)</p> Signup and view all the answers

What is the purpose of 'padding' in block cipher encryption?

<p>To ensure last block matches cipher's block size. (A)</p> Signup and view all the answers

What is a key characteristic of Counter (CTR) mode?

<p>Encryption and decryption can be fully parallelized (B)</p> Signup and view all the answers

How is the key stream generated in Counter (CTR) mode?

<p>Using a counter that is incremented for each block (A)</p> Signup and view all the answers

What is the purpose of the 'nonce' in Counter (CTR) mode?

<p>To avoid reusing key streams (B)</p> Signup and view all the answers

Which of the following is a typical application of Electronic Codebook (ECB) mode?

<p>Transmitting single value keys (C)</p> Signup and view all the answers

What is the primary advantage of Output Feedback (OFB) mode for transmission?

<p>Compatibility across noisy channels (D)</p> Signup and view all the answers

Which of the following lists the correct order of steps in AES encryption?

<p>Substitute Bytes -&gt; Shift Rows -&gt; Mix Columns -&gt; Add Round Key (C)</p> Signup and view all the answers

What is the purpose of the 'Shift Rows' transformation in AES?

<p>To shift the rows of the state array cyclically (B)</p> Signup and view all the answers

What security parameter is added in modern symmetric cryptography to make the key more secure?

<p>Strong algorithm and key length (A)</p> Signup and view all the answers

If parties A and B have previously used a key, how can they transmit a new key securely?

<p>Transmit the new key encrypted using the old key (B)</p> Signup and view all the answers

In a Kerberos-like system for key distribution, what entity distributes session keys to hosts?

<p>The Key Distribution Center (KDC) (B)</p> Signup and view all the answers

Which of the following methods involves the use of different keys for the encryption and decryption processes?

<p>Asymmetric Encryption (D)</p> Signup and view all the answers

Which security goal of cryptography ensures that data remains unaltered from its original state?

<p>Integrity (B)</p> Signup and view all the answers

What cryptographic objective confirms the identity of the sender?

<p>Authentication (A)</p> Signup and view all the answers

In cryptography, what does 'non-repudiation' ensure?

<p>The sender cannot deny sending a message. (B)</p> Signup and view all the answers

Why is converting data into a scrambled code part of cryptography?

<p>To hide data content during transmission or storage (C)</p> Signup and view all the answers

Which of the following is an example of data suitable for cryptographic protection?

<p>Email messages (C)</p> Signup and view all the answers

What is used to decrypt a ciphertext?

<p>The key (B)</p> Signup and view all the answers

In symmetric encryption, also referred to as shared-key, what characteristic defines the keys?

<p>Same key is being used for encryption and decryption. (C)</p> Signup and view all the answers

What distinguishes asymmetric encryption from symmetric encryption?

<p>Asymmetric encryption uses different keys for encryption and decryption. (C)</p> Signup and view all the answers

In a substitution cipher, if 'A' is encrypted as 'D', 'B' as 'E', and 'C' as 'F', what would 'CAB' be encrypted as?

Signup and view all the answers

Which of the following statements is true about classical ciphers?

<p>They include both substitution and transposition techniques. (C)</p> Signup and view all the answers

If the plaintext 'HELLO' is encrypted to 'EHLLO' using a transposition cipher, what is the most likely method used?

<p>Swapping adjacent letters (C)</p> Signup and view all the answers

In ciphertext-only cryptanalysis, what does frequency analysis exploit?

<p>The recurring patterns of letters in the encrypted text (C)</p> Signup and view all the answers

In a known-plaintext attack, what is the advantage of an attacker knowing portions of the plaintext?

<p>It helps deduce the encryption key or algorithm. (A)</p> Signup and view all the answers

What is the key advantage of chosen-plaintext attacks over known-plaintext attacks in cryptanalysis?

<p>They allow for more control in selecting plaintext to encrypt. (C)</p> Signup and view all the answers

How does a polyalphabetic substitution cipher improve security compared to a monoalphabetic cipher?

<p>By using multiple substitution alphabets (B)</p> Signup and view all the answers

What characterizes the encryption key in polyalphabetic ciphers?

<p>Cyclic pattern and multiple substitution ciphers. (A)</p> Signup and view all the answers

In columnar transposition, if the key is '41523' and the message 'ATTACK', how are the columns ordered for encryption?

<p>In numerical order, '12345' (A)</p> Signup and view all the answers

In the context of modern cryptography, what is considered a significant weakness of DES regarding key length?

<p>Its relatively short key length (B)</p> Signup and view all the answers

Why was Triple DES (3DES) developed and implemented as a strategy?

<p>To increase the key length of DES to make it harder to crack (B)</p> Signup and view all the answers

How does the Advanced Encryption Standard (AES) improve upon the Data Encryption Standard (DES)?

<p>By supporting larger key sizes for enhanced security (A)</p> Signup and view all the answers

The Rijndael algorithm was selected as the standard for the AES due to several factors. What was one of the key criteria?

<p>Its resistance against known attacks (C)</p> Signup and view all the answers

What factor determines whether a pseudorandom stream generator is appropriate for stream cipher use?

<p>Whether the stream are unpredictable without knowing key. (A)</p> Signup and view all the answers

In what situation is a stream cipher best suited compared to a block cipher?

<p>Encrypting real-time, continuous data streams (D)</p> Signup and view all the answers

What is the definition of mode of operation?

<p>A way to use a block cipher repeatedly (C)</p> Signup and view all the answers

What is the electronic codebook (ECB) mode?

<p>Each plaintext block is encrypted independently. (A)</p> Signup and view all the answers

What is the biggest downside to ECB?

<p>Identical plaintext blocks result in identical ciphertext blocks. (D)</p> Signup and view all the answers

What is the main characteristic of CBC mode?

<p>Encryption can't be parallelized; decryption can be. (D)</p> Signup and view all the answers

True or false: In Cipher Feedback (CFB) mode, the Initialization Vector (IV) should be different for every encryption to improve security. Input is processed s-bits at a time (s=8), any block cipher can be turned into a stream cipher, it's ideal for encrypting real-time data, and no padding is required.

<p>True (B)</p> Signup and view all the answers

Input is processed s-bits, any block cipher turns into a stream cipher, for real-time encryption, and doesn't require padding for the last block. With the characteristics above, what mode is being described?

<p>Cipher Feedback (CFB) (C)</p> Signup and view all the answers

What is the primary purpose of padding in block cipher encryption?

<p>To ensure that the plaintext is an exact multiple of the block size (D)</p> Signup and view all the answers

Which of the following is a key feature of Counter (CTR) mode?

<p>Parallel encryption (C)</p> Signup and view all the answers

If block ciphers can be computationally intensive, what advantage does the output feedback mode provide during a noisy transmission?

<p>Over a noisy channel (C)</p> Signup and view all the answers

What must be ensured about the initialization vector (IV) on the output feedback?

<p>IV must never be repeated (A)</p> Signup and view all the answers

Padding and Input is processed s-bits are associated with what mode?

<p>CFB Cipher Feedback Mode (C)</p> Signup and view all the answers

What operation does a substitution box perform?

<p>Byte Substitution (C)</p> Signup and view all the answers

A shift transformation does what?

<p>Shifts rows (D)</p> Signup and view all the answers

Modern symmetric ciphers add a security parameter to the key to protect it. What is the primary security objective achieved by adding this parameter?

<p>Ensuring the key is long enough to prevent brute force (B)</p> Signup and view all the answers

If two parties have previously established a secure connection and used a key for encryption, how can they securely agree and transmit a new session key?

<p>By encrypting the new key using already shared key (D)</p> Signup and view all the answers

Automatic Key Distribution for Connection-Oriented Protocol describes the entities involved. Which entity distributes session keys to hosts?

<p>Key Distribution Center, KDC (B)</p> Signup and view all the answers

Flashcards

Cryptography

The conversion of data into a scrambled code that can be decrypted for secure transmission.

Confidentiality

Ensuring that data is accessible only to authorized parties.

Integrity

Ensuring the accuracy and completeness of data.

Authentication

Verifying the identity of a user, device, or entity.

Signup and view all the flashcards

Non-repudiation

Ensuring that actions or transactions cannot be denied by the entity that performed them.

Signup and view all the flashcards

Symmetric Encryption

Uses the same key for both encryption and decryption.

Signup and view all the flashcards

Asymmetric Encryption

Uses different keys for encryption and decryption (public and private).

Signup and view all the flashcards

Ciphers

Algorithms used to encrypt or decrypt data.

Signup and view all the flashcards

Substitution Cipher

A cipher where each unit of plaintext is replaced with ciphertext according to a fixed system.

Signup and view all the flashcards

Transposition Cipher

Shifting the letters of the plaintext to form the ciphertext.

Signup and view all the flashcards

Monoalphabetic Cipher

Each letter is consistently substituted with the same other letter.

Signup and view all the flashcards

Cryptanalysis

The study of ciphertext, ciphers, and cryptosystems with the aim of understanding how they can be defeated or weakened.

Signup and view all the flashcards

Ciphertext-Only Attack

When the cryptanalyst only has access to ciphertext.

Signup and view all the flashcards

Known-Plaintext Attack

The attacker has access to both plaintext and corresponding ciphertext.

Signup and view all the flashcards

Chosen-Plaintext Attack

The attacker can choose plaintext to be encrypted and obtain the corresponding ciphertext.

Signup and view all the flashcards

Polyalphabetic Cipher

Multiple substitution ciphers are used to encrypt a message, where each letter can map to different letters.

Signup and view all the flashcards

Cryptography

The mathematical techniques for encryption, secure communication, confidentiality, authenticity, integrity.

Signup and view all the flashcards

Electronic Codebook (ECB)

Simplest block cipher use the same key to encrypt each block.

Signup and view all the flashcards

Cipher Block Chaining (CBC)

Each block is XORed with the previous ciphertext block before encryption. An IV is used for the first block.

Signup and view all the flashcards

Initialization Vector (IV)

IV purpose is to ensure unique ciphertexts even w/ identical plaintexts.

Signup and view all the flashcards

Cipher Feedback (CFB)

This mode processes the input elements in s bits at a time.

Signup and view all the flashcards

Output Feedback (OFB)

This mode generates key stream blocks for each block

Signup and view all the flashcards

Counter (CTR)

This mode generates key stream blocks for each block to encrypt data

Signup and view all the flashcards

Computationally Secure Means

It must be used in two secure requirements.

Signup and view all the flashcards

Key Distribution

One of the requirements of secure use.

Signup and view all the flashcards

Study Notes

Introduction to Cybersecurity

  • Cryptography involves converting data into a scrambled code, which is then decrypted for secure transmission across networks.
  • Cryptography safeguards confidential information like emails, web transactions, and corporate data.

Objectives of Cryptography

  • Confidentiality: Ensuring data is accessible only to authorized parties.
  • Integrity: Maintaining the accuracy and completeness of data.
  • Authentication: Verifying the identity of users and devices.
  • Non-repudiation: Preventing senders from denying their actions.

Types of Cryptography

  • Symmetric encryption uses the same key for both encryption and decryption.
  • Asymmetric encryption employs different keys for encryption and decryption.

Symmetric Encryption

  • Symmetric encryption, also known as secret-key, shared-key, or private-key encryption, uses an identical key for both encryption and decryption processes.

Asymmetric Encryption

  • Asymmetric encryption, also known as public-key encryption, utilizes distinct keys for encryption and decryption, referred to as public and private keys.

Ciphers

  • Ciphers are algorithms that encrypt or decrypt data.
  • Classical ciphers involve substitution and transposition.
  • Modern ciphers are categorized by the type of key used (private or public) and the type of input data (block or stream).

Classical Ciphers

  • Classical ciphers include substitution ciphers and transposition ciphers.
  • Substitution ciphers replace blocks of plaintext with ciphertext.
  • Transposition ciphers shift plaintext letters to create a cryptogram.

Substitution Cipher

  • In cryptography, a substitution cipher is a method of encrypting by which units of plaintext are replaced with ciphertext, according to a fixed system.
  • The "units" in substitution ciphers can be single letters, pairs, triplets, or mixtures thereof.
  • Decryption involves inverse substitution by the receiver.

Monoalphabetic Cipher (Caesar Cipher Improvement)

  • Julius Caesar used a simple substitution system over 2,000 years ago for secure troop communication.
  • This involved substituting letters by shifting them a predetermined number of positions.
  • Caesar Cipher has 25 letter pairings.
  • Monoalphabetic Cipher has 26! or 10^26 possible pairings.

Breaking Monoalphabetic Substitution Cipher

  • Letter frequencies in ciphertext can be analyzed to decipher monoalphabetic substitution ciphers.
  • Bigram and trigram frequency analysis can be used to break monoalphabetic substitution ciphers.

Ciphertext Only Scenario

  • In ciphertext-only scenarios, the only available information is the ciphertext.
  • Approaches to break include brute-force and statistical analysis.
  • This scenario is difficult to break and easy to defend against, but weaker algorithms can be vulnerable.

Known Plaintext Scenario

  • Analysts capture plaintext messages and their corresponding encryptions.
  • Patterns, like standardized headers or placement of keywords, can help deduce the key.
  • Sophisticated algorithms can withstand known plaintext attacks.

Chosen Plaintext Scenario

  • An analyst inserts a chosen message into the system.
  • Deliberate patterns are picked to reveal the structure of the key.
  • Trudy might prompt Alice to send a specific message, like "The quick brown fox jumps over the lazy dog" to completely break the encryption scheme.

Polyalphabetic Cipher

  • Employs 'n' substitution ciphers (M1, M2, ..., Mn) mapping letters variably based on their position.
  • Cycling pattern use subsequent substitution patterns in a cyclic manner.
  • For example, with n=4 pattern could be M1,M3,M4, M3,M2.

Transposition Cipher

  • This method of encryption shifts the positions of plaintext units (characters or groups) based on a consistent system.
  • The ciphertext is a reordered version of the plaintext.

Columnar Transposition Cipher

  • The message is written in rows of fixed length and read out column by column in a scrambled order.
  • With the keyword ZEBRAS (length 6), the order of columns is defined by alphabetical order in the keyword

What is Cryptography?

  • Cryptography's core involves mathematical encryption and decryption techniques.
  • Its purpose is secure communication, even when adversaries are present.
  • It ensures confidentiality, authenticity, and integrity.

What is Cryptanalysis?

  • In cryptanalysis, ciphertext, ciphers, and cryptosystems are analyzed to understand their functionality.
  • Cryptanalysis aims to find ways to defeat or weaken these systems.

Simplified Model (Symmetric Cryptosystem)

  • In a symmetric cryptosystem, plaintext is input and encrypted using a secret key shared by the sender and the receiver.
  • The ciphertext is transmitted, then decrypted using the same secret key to produce the plaintext output.

Symmetric Encryption Types

  • Block ciphers process plaintext in fixed-size blocks.

Block Ciphers

  • Processes plaintext input in fixed-size blocks.
  • Generates an equal-sized ciphertext block for each plaintext block.
  • Have key size, use a number of rounds and algorithms for subkey generation and round function.
  • Mapping is permutation of all possible inputs.

Feistel Structure

  • Subkeys 1<K; < n is different from and derived from original key.
  • Round function the same structure for each round.
  • Used by all block ciphers.

Data Encryption Standard (DES)

  • DES used a 64-bit plaintext block and a 56-bit key.
  • DES is minor variation of Feistel network.
  • Concerns exist regarding algorithm strength and the use of a 56-bit key.
  • In July 1998, the Electronic Frontier Foundation (EFF) announced it had broken DES encryption.

Triple DES (3DES)

  • Repeats the DES algorithm three times using either two or three unique keys.
  • A 168-bit key length overcomes DES's vulnerability to brute-force attacks.
  • The underlying encryption algorithm is the same as DES.
  • Slower in software and uses a 64-bit block size.

Advanced Encryption Standard (AES)

  • Was needed as a replacement for 3DES.
  • NIST called for proposals for a new AES in 1997 that.
  • Rijndael in 1997 should have a security strength equal to or better than 3DES.
  • Must increase significantly improved efficiency and use Symmetric block cipher.
  • Symmetric block cipher with 128 bit data and 128/192/256 bit keys.

AES Steps

  • AES steps include Add round key, Substitute bytes, Shift rows and Mix columns.

AES

  • Substitute bytes transformation uses constructed properties of finite-fields.

Key Size and Brute Force

  • Time required to break algorithms, DES 56 bits, 1 hour compared to AES with 256 is orders of magnitudes greater.

AES Other Finalists

  • Other AES finalists include, Serpent, Twofish, RC6 and MARS.

Stream Ciphers

  • Processes input elements continuously.
  • Stream ciphers produce output one element at a time.
  • Typically, encrypts plaintext 1 byte at a time (but may be designed to operate on one bit)
  • Pseudorandom stream that is unpredictable without knowledge of the input key and appears random.

Encryption decription stream

  • Plaintext and key stream creates ciphertext throught encryption.
  • Ciphertext and key stream creates plaintext through encryption.

Stream Cipher

  • Stream ciphers can be as secure as block ciphers with comparable key length (128-bit).
  • Faster and use less code, so can be used in browser over the web.
  • But is vulnerable to cryptanalysis if the same key is used.
  • Better alternative for encrypting a stream of data over communication channels, browser/Web-link.

RC4

Speed comparisons

  • The fastest cipers on Pentiums are RC4, and then AES.
  • The slowest are 3DES and DES.

Electronic Codebook (ECB)

  • ECB is the simplest mode, handling plaintext 'b' bits at a time and encrypting each block with the same key.
  • Have unique ciphertext value for each plaintext block, creating a "codebook".
  • Not secure for long messages since repeated plainttext can be seen.
  • Can be used for the secure transmission of a single values.
  • It's necessary to repeatedly produce different ciphertext blocks from the same plaintext block.

Cipher Block Chaining (CBC)

  • The main purpose of IV is to ensure that even if two plaintexts are identical, their ciphertexts are still different, because different IVs will be used.
  • IV known to sender and receiver in plaintext.
  • IV known be well protected as with the key.
  • Decryption can be parallized.
  • Encryption cannont be parallized
  • Is Useful for general purpose block-oriented transmission and authentication.

Cipher Feedback (CFB)

  • Input processed s-bits (s=8) at time.
  • Any block cipher can be turned inco stream cipher.
  • Ideal for encryping real-time data.
  • Padding not required for the last block.
  • Decryption can be parallized, encryption will be sequential.

Padding

  • Block cipher encryption modes divide plaintext, and are used to make the last part conform.
  • Last block of the plaintext needs padding i.e. before encryption, to ensure the original cypher can be decrypted.
  • The padding schemes need to clearly mark where the padding starts so that the decryption works.

Output Feedback (OFB)

  • Similar to CFB, but operates on blocks rather than s-bit subset.
  • Stream oriented transmisison over a noisy chanel.
  • IV must be nonce i.e. unique to each execution of encryption operation
  • IV should not repeat.
  • IV should nor be predictable.

Counter Mode (CTR)

  • A counter is used to generate key streams.
  • No key stream can be reused, so the counter value for each is preprended with a nonce.
  • Nonce serves that same role as IV's.
  • Used in protocols such as, Asynchronous Transfer Mode and IPSec and Secure Real-Time Transport Protocol(VoIP).
  • Both encryption and decryption can be parallized.

Symmetric Encryption Devices Location of encryption

  • Link encryption.
  • End-to-end encryption.

Computationally secure requirements

  • Strong encryption algorithm.
  • Sender and receiver must have copies of key.

Key Distribution

  • Key distribution can work by:
    • Key selected by one party and transferred to another party
    • Third party delivers key to 2 parties
    • Keys uses for communication or transmission of newly encryped key
    • Third party communication between parties is use to send a secured key

Key design

  • Automated keys can be created and distributed between hosts to facilitate key generation and management.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser