Basic Encryption and Decryption

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following best describes the function of cryptographic algorithms in the context of data security?

  • They primarily focus on securing physical storage devices.
  • They are used to transform data to ensure information and network security. (correct)
  • They facilitate the decryption of previously secured communications without a key.
  • They manage access control lists within operating systems.

How do two-key cryptographic algorithms differ from single-key cryptographic algorithms?

  • Two-key algorithms employ different, but related, keys for encryption and decryption, whereas single-key algorithms use only one key. (correct)
  • Two-key algorithms use the same key for both encryption and decryption, adding an extra layer of security.
  • Single-key algorithms use public and private keys, whereas two-key algorithms use only one key.
  • Single-key algorithms split the key into two parts, distributed between sender and receiver for enhanced security.

In the context of cryptography, what is the primary difference between 'encryption' and 'decryption'?

  • Encryption involves creating a cryptographic key, while decryption involves destroying it.
  • Encryption is used for securing network communications, while decryption applies to data storage.
  • Encryption converts plaintext to ciphertext, while decryption restores the plaintext from ciphertext. (correct)
  • Encryption restores the original message from ciphertext; decryption converts plaintext to ciphertext.

What is the main goal of cryptanalysis?

<p>To decipher messages without prior knowledge of the encryption details. (D)</p>
Signup and view all the answers

Why is a cryptographic hash function considered a 'one-way' algorithm?

<p>It cannot be reversed to reveal the original data. (D)</p>
Signup and view all the answers

What are the two key requirements for the secure use of conventional (symmetric) encryption?

<p>A strong encryption algorithm and secure management of the secret key. (D)</p>
Signup and view all the answers

Which characteristic is NOT typically associated with a secure cryptographic hash algorithm?

<p>Reversibility, allowing the original data to be recovered from the hash. (A)</p>
Signup and view all the answers

What is the primary objective of a brute-force attack on an encrypted system?

<p>To recover the encryption key. (B)</p>
Signup and view all the answers

In the context of encryption scheme security, what does it mean for an encryption scheme to be 'computationally secure'?

<p>The cost or time to break the cipher exceeds the value or useful lifetime of the encrypted information. (D)</p>
Signup and view all the answers

What is a key property of 'strong encryption'?

<p>Compromising the encrypted data is impractically difficult for unauthorized entities. (D)</p>
Signup and view all the answers

In cryptography, what is the difference between 'encoding' and 'enciphering'?

<p>Encoding translates entire words or phrases, whereas enciphering translates letters or symbols individually. (D)</p>
Signup and view all the answers

What is a major disadvantage of the Caesar cipher?

<p>It is vulnerable to frequency analysis and has a limited number of possible keys. (A)</p>
Signup and view all the answers

What is the mathematical operation used to encrypt a message using the Caesar Cipher algorithm?

<p>Addition of the key to the numerical equivalent of each letter, modulo 26. (D)</p>
Signup and view all the answers

What is the result of applying a Caesar cipher with a key of 3 to the letter 'x'?

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

In cryptanalysis, why is frequency analysis effective against simple substitution ciphers?

<p>Certain letters in any language occur more frequently than others. (A)</p>
Signup and view all the answers

Why does a key phrase substitution generally have the same strength as previous simple substitution ciphers?

<p>It still uses a monoalphabetic substitution. (C)</p>
Signup and view all the answers

Which property must a key phrase have for substitution ciphers?

<p>It must contain unique letters to avoid redundancy in the substitution. (A)</p>
Signup and view all the answers

Why are certain numbers omitted when picking a key for a multiplicative cipher?

<p>They are not relatively prime to the size of the alphabet, so one can not guarentee that the cipher wil produce a set of residue letters. (E)</p>
Signup and view all the answers

What is one weakness of monoalphabetic ciphers?

<p>Their frequency distributions reflect the underlying alphabet. (A)</p>
Signup and view all the answers

What makes Polyalphabetic Substitution Ciphers more secure?

<p>That they lack distrubtion. (B)</p>
Signup and view all the answers

Cryptography is a branch of mathematics dealing with data transformation.

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

Cryptographic algorithms are exclusively used in visual data processing.

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

Cryptography secures data storage, transmission, and interaction between parties.

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

Keyless cryptographic algorithms use keys during transformations.

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

A cryptographic hash function is a keyless algorithm.

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

Single-key algorithms use two distinct keys: a private and a public key.

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

In two-key algorithms, the keys used are unrelated to each other.

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

Plaintext refers to the encrypted message.

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

Ciphertext is the original message.

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

Encryption converts ciphertext back into plaintext.

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

Decryption is also called Enciphering.

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

Cryptology includes both cryptography and cryptanalysis.

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

A one-way hash algorithm can be reversed to find the original data.

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

Hashing is mainly for encrypting data for secure transmission.

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

Symmetric encryption uses two different keys for encryption and decryption.

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

In a brute-force attack, the attacker needs knowledge of the algorithm.

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

The goal of attacking an encryption system is often to recover the key.

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

A Substitution technique replaces plaintext bits with ciphertext bits.

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

The Caesar cipher involves moving each letter in the alphabet one place further down.

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

Stream ciphers process data in blocks.

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

Flashcards

Cryptography

A branch of mathematics dealing with the transformation of data.

Cryptographic algorithms

Algorithms used in information and network security.

Keyless Cryptography

Does not use keys during cryptographic transformations.

Single-key encryption

uses a single key for encryption and decryption

Signup and view all the flashcards

Secret Key

Uses a key that is shared between the sender and receiver.

Signup and view all the flashcards

Two-key encryption

Uses two different but related keys for encryption/decryption.

Signup and view all the flashcards

Plaintext

The original message before encryption.

Signup and view all the flashcards

Ciphertext

The coded message after encryption.

Signup and view all the flashcards

Encryption

The process of converting plaintext to ciphertext.

Signup and view all the flashcards

Decryption

Restoring plaintext from ciphertext.

Signup and view all the flashcards

Cryptography

Study of encryption and decryption schemes.

Signup and view all the flashcards

Cryptographic System

A scheme for encryption and decryption.

Signup and view all the flashcards

Cryptanalysis

Deciphering without enciphering knowledge.

Signup and view all the flashcards

Cryptology

The areas of cryptography and cryptanalysis.

Signup and view all the flashcards

Cryptographic Hash Function

Most basic type of cryptographic algorithm.

Signup and view all the flashcards

Hash Algorithm

A one-way algorithm.

Signup and view all the flashcards

Brute-force attack

Attacker tries every possible key.

Signup and view all the flashcards

Cryptanalysis attack

Attack based on algorithm flaws and known plaintext.

Signup and view all the flashcards

Plaintext

The original message before encryption.

Signup and view all the flashcards

Ciphertext

The coded message.

Signup and view all the flashcards

Keyless

Do not use any keys during cryptographic transformations.

Signup and view all the flashcards

Single-key

The result of a transformation is a function of the input data and a single key, known as a secret key.

Signup and view all the flashcards

Two-key

At various stages of the calculation, two different but related keys are used, referred to as a private key and a public key.

Signup and view all the flashcards

Strong Encryption

refers to encryption schemes that make it impractically difficult for unauthorized persons or systems to gain access to plaintext that has been encrypted

Signup and view all the flashcards

recover the key

The objective of attacking an encryption system is to recover the key rather than recovering the plaintext.

Signup and view all the flashcards

Study Notes

### Basic Encryption and Decryption
- Cryptography is a branch of mathematics dealing with data transformation.
- Cryptographic algorithms are used in information and network security.
- Cryptography is essential for secure data storage, transmission and interaction.

### Cryptographic Algorithms
- These can be keyless, single-key, or two-key.
- Keyless algorithms do not use keys during cryptographic transformations such as Cryptographic Hash Functions.
- Single-key algorithms use a single key, known as a secret key.
- Two-key algorithms use two different but related keys: a private key and a public key.
- This chapter covers single-key algorithms, such as symmetric or conventional encryption.

### Definitions in Cryptography
- Encryption encodes a message to make its meaning not obvious.
- Plaintext is the original message.
- Ciphertext is the coded message.
- Encryption is converting plaintext to ciphertext, also called enciphering.
- Decryption restores plaintext from ciphertext, also called deciphering.
- Cryptography is the study of encryption schemes.
- A cryptographic system (or cipher) is a scheme for encryption and decryption.
- Cryptanalysis uses techniques for deciphering a message without knowledge of the enciphering details.
- A person practicing cryptanalysis is called a cryptanalyst.
- Cryptology includes the areas of cryptography and cryptanalysis.

### Cryptographic Hash Function
- Cryptographic Hash Functions are basic cryptographic algorithm that is one-way.
- Hash algorithms create a unique "digital fingerprint," called hashing.
- A digest (or message digest/hash) represents the contents of the data.
- Hashing algorithms do NOT create ciphertext that can later be decrypted.
- Hashing is "one-way", where the contents can't be used to reveal the original data.
- Hashing is used for comparison purposes.
- A secure hash that is created from a set of data cannot be reversed.
- A secure hashing algorithm is fixed size, unique, original, and secure.

### Simplified Symmetric Encryption Model
- There are two requirements for secure conventional encryption: a strong encryption algorithm and having the sender and receiver obtain copies of the secret key in a secure fashion, keeping it secure.

### Cryptographic Systems
- Cryptographic Systems can be characterized along three independent dimensions: the type of operations used for transforming plaintext to ciphertext, the number of keys used, and the way in which the plaintext is processed
- The type of operations used for transforming plaintext to ciphertext are substitution, transposition, and product.
- Number of Keys can be symmetric (i.e., single-key, secret-key, conventional encryption ) or asymmetric encryption (i.e. two-key, or public-key encryption).
- The way Plaintext is processed can be via block cipher (processes the input one block of elements at a time, producing an output block for each input block) or stream cipher (processes the input elements continuously, producing output one element at a time, as it goes along).

### Cryptanalysis and Brute-Force Attack
- The objective of attacking an encryption system is to recover the key rather than recovering the plaintext with two general approaches: Cryptanalysis or Brute-force attack.
- Cryptanalysis relies on the nature of the algorithm plus some knowledge of the characteristics of the plaintext.
- The brute-force attack tries every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained with half of all possible keys being tried to achieve success.

### Types of Attacks
- Ciphertext Only Attack requires the Cryptanalyst to know the Encryption algorithm and Ciphertext.
- Known Plaintext Attack requires the Cryptanalyst to know the Encryption algorithm, Ciphertext and there’s One or more plaintext-ciphertext pairs formed with the secret key.
- Chosen Plaintext Attack requires the Cryptanalyst to know the Encryption algorithm, Ciphertext and possesses a Plaintext message, together with its corresponding ciphertext generated with the secret key
- Chosen Ciphertext Attack requires the Cryptanalyst to know the Encryption algorithm, Ciphertext and requires a Ciphertext chosen with it's corresponding decrypted plaintext generated with the secret key
- Chosen Text Attack requires the Cryptanalyst to know the Encryption algorithm, Ciphertext and possesses a Plaintext message together with its corresponding ciphertext generated with the secret key, plus having a Ciphertext chosen by cryptanalyst together with its corresponding decrypted plaintext generated with the secret key

### Encryption Scheme Security
- Unconditionally secure encryption can't be decrypted even if an opponent has lots of time.
- Computationally secure encryption means the cost of breaking the cipher exceeds the value of the encrypted information and the time required to break the cipher exceeds the useful lifetime of the information.

### Brute-Force Attack Details
- The brute-force attack involves trying every possible key of ciphertext into plaintext to try to get a intelligible message.
- Half of all possible keys must be tried to achieve success.
- Some degree knowledge about the expected plaintext, and some means of automatically distinguishing plaintext from garble may supplement this attack.

### Strong Encryption
- Strong Encryption makes it difficult for persons or systems to gain access to plaintext that has been encrypted and there are several properties that increase algorithm strength: appropriate choice of cryptographic algorithm, sufficiently long key lengths, choice of protocols, engineered implementation and absense of hidden flaws

### Encryption Algorithm Types
- Encoding translates entire words or phrases to other words or phrases.
- Enciphering translates letters or symbols individually.
- Encryption is the group of term that covers both encoding and enciphering.
- Symmetric Encryption uses the same key for encryption and decryption, following C = E(P, K) for encryption and P = D (E(P,K), K) for decryption.
- Asymmetric Encryption uses different keys for encryption and decryption, following  C = E (P, KE) for encryption and P = D (E (P, KE), KD) for decryption.

### Substitution Technique
- The Substitution Technique replaces letters of plaintext with other letters or by numbers or symbols.
- If the plaintext is viewed as a sequence of bits, it substitutes plaintext bit patterns with ciphertext bit patterns.

### Caesar Cipher
- Caesar Cipher is a substitution cipher and replaces each letter with the letter standing three places further down the alphabet, wrapping around so the letter following Z is A.
- Benefit: easy to remember.
- Disadvantage: easy to predict pattern of encryption.

### Caesar Cipher Algorithm
- Letters can be defined as numbers, starting with A assigned to 0.
- The shift may be of any amount, so the general Caesar algorithm is: "C = E(k, p ) = (p + k ) mod 26". "k" takes a value in the range of 1 to 25.
- The decryption algorithm is: "p = D(k, C ) = (C − k ) mod 26".

### Caesar Cipher - Decryption
- Decryption can be performed by following "p = D(k, C ) = (C − k ) mod 26"

### Brute-Force Cryptanalysis of the Caesar Cipher
- Has only 25 possible ciphers being that maps A to B,C,...,Z.
- This cipher could be simply tried to search until an intelligible translation into plaintext is obtained.
- Cipher Analysis is a given ciphertext where one has to just try all shifts of letters and do be need to recognize when have plaintext,
- This can be used to break ciphertext.

### Monoalphabetic Cipher
- With only 25 possible keys, the Caesar cipher isn't secure.
- Substitution achieves dramatic key space increase, like permutations of the alphabet.
- The permutation of a finite set S is an ordered sequence of all elements of that set, with each element appearing exactly once.
- If there are n! permutations of a set of n elements then it follows with n, there are over twenty six factorial possible keys.
- This approach is referred to as a monoalphabetic substitution cipher because a single cipher alphabet is used per message which always uses the same letter of the alphabet for the ciphertext letter.

### Cryptanalysis Based on Relative Frequencies
- Arabic author Qalqashandi wrote down a technique to solve ciphers which is used today.
- The line of attack is based on characteristics of the plaintext.
- The ciphertext letters are written down and counted to get the frequency of each symbol.
- The average frequency of each letter of language has plaintext which can be written out.
- Ciphertext can thus be solved.

### Key Phrase Substitution
- A Key Phrase, which is a keyword, is a simple substitution cipher, monoalphabetic cipher that mixes the letters using key phrase to generate the cipher alphabet.
- The plaintext retaining word divisions happens with each letter substituted by the letter in given key phrase.
- Key Phrase must contain unique letters and its redundancies removed before encrypting.
- Key phrase substitutions the same strength as the previous simple substitution ciphers.

### Key Phrase/Matrix Substitution
- To strengthen a key phrase substitution, apply a matrix to help identify which columns and rows will be used for its remaining sets of letters which fill order in said rows below.

### Multiplicative Ciphers
- In these ciphers, encryption uses f(a) = a*k mod n, where k and n are relatively prime so the letters of the alphabet produced a complete set of residues.
- If k and n are not relatively prime, several plaintext will encrypt to the same ciphertext letter and not all letter will appear in the ciphertext alphabet and e.g. if k = 12 and n =26.
- Decryption requires the ciphertext number to be multiplied by the multiplicative inverse of the key mod 26.
- Only 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, and 25 have multiplicative inverses mod26
- Here you can identify the numbers and Multiplicative inverses in this scenario:
    - 1=>1, 3=>9, 5=>21, 7=>15, 9=>3, 11=>19, 15=>7 , 17=>23, 19=>11, 21=>5, 23=>17, 25=>25

### Caesar Cipher Analysis
- Weaknesses: Blank translates to itself, English has relatively few short words, known short words can be subbed, repetition of patterns exposed.

### Polyalphabetic Substitution Ciphers
- They flatten the the frequency of the cypher alphabet where E1 (T) = a and E2 (T) = b and E1 (X) = a and E2 (X) = b.
- They combine two distributions by using two separate encryption alphabets.
- The first applies to all characters in odd positions while the second applies to even positions.

Studying That Suits You

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

Quiz Team

Related Documents

More Like This

Encryption and Decryption Techniques Quiz
5 questions
Encryption and Decryption Quiz
5 questions
RSA Cryptography: Encryption and Decryption
17 questions
Introduction to Cryptography
38 questions
Use Quizgecko on...
Browser
Browser