Exam 02 Study Guide - CYBI 4365

Ace your homework & exams now with Quizwiz!

Know all the mathematical properties of XOR. Can you use these properties to prove an identity or a formula?

Commutative: a⊕b=b⊕a Assosiative: (a⊕b)⊕c=a⊕(b⊕c) Identity Element: a⊕0=a Self-Inverse: a⊕a=0 Complement: a⊕ā=1

What does the CIA stand for? Give an example of each of the three areas.

Confidentiality: Encryption of data before sending it over a network Integrity: Data validation through hash functions Availability: Implementing redundancy such as backup servers

What does DES stand for?

Data Encryption Standard

Who could be Alice and Bob in a real scenario?

You and me ;) or Web browser accessing my.utrgv.edu.

What are the allowed key lengths? What are the allowed number of number of rounds?

128-bit: 10 rounds 192-bit: 12 rounds 256-bit: 14 rounds

Why do we use only 56-key, although the key is 64-bits?

8 bits are used for parity check

Given an S-box with an input, can you calculate the output?

S-box: | 0 1 2 3 4 5 6 7 8 9 A B C D E F --+-------------------------------- 0 | E 4 D 1 2 F B 8 3 A 6 C 5 9 0 7 1 | 0 F 7 4 E 2 D 1 A 3 C 8 5 9 6 B 2 | 3 E 5 A 9 4 B 8 1 7 6 0 D 2 F C 3 | A 9 0 E 7 6 F 5 B 8 1 D 3 2 C 4 Input: 101101 (binary) Calculation: Split, so 10 ('2' in decimal) for row, 1101 ('D' in hex). Value in S-box: 2 Output: 2 (in hex) --> 0010 (in binary)

Know how the compression S-boxes are used. How many bits are in the input? How many bits are in the output?

S-boxes (Substitution boxes) are used within each round of encryption to provide non-linearity and confusion. They are used to transform a 48-bit input block into a 32-bit output block. Each 6-bit input is substituted with a 4-bit output according to a predefined lookup table. Each S-box has its own unique lookup table. Input Size: 6 bits per S-box (48 bits total divided into eight 6-bit chunks). Output Size: 4 bits per S-box (32 bits total).

What is the major weakness in the substitution cipher(shift cipher)?

Vulnerable to brute-force attacks and frequency analysis.

Know the general syntax of the openssl command used for different encryption/decryption.

openssl enc -aes-128-cbc -e -in input.txt -out encrypted.txt openssl enc -aes-128-cbc -d -in encrypted.txt -out decrypted.txt

Know the five ways you can provide authentication with.

1. Password 2. Biometric 3. 2FA 4. MFA 5. Single Sign-on (SSO)

What does the AES stand for?

Advanced Encryption Standard

Output Feedback (OFB)

Advantages: - No padding - Can prepare encryption and decryption in advance - Encryption/decryption use the same structure - Wrong blocks only affect current block Disadvantages: - No parallel support - Mallory can change some ciphertext damaged plaintext Suitable for real-time encryption and streaming data.

Know the three types of attacks related to plain and cipher text that can be used in breaking an encryption scheme. Give an example of each.

1. Ciphertext-Only Attack: Attacker only has access to the cipher text and not other information. (Ex. Frequency Analysis) 2. Known-Plaintext Attack: Attacker has access to the cipher text and some of the corresponding plaintext. (Ex. Linear Cryptanalysis) 3. Chosen-Plaintext Attack: Attacker can choose the plaintext and view its corresponding cipher text. (Adaptive Chosen-Plaintext Attack)

Know the exact steps of how the RSA creates the public/private key pair. What makes the public key and what makes the private one?

1. choose two large prime numbers p, q. (e.g., 1024 bits each) 2. compute n = pq, z = (p-1)(q-1) 3. choose e (with e<n) that has no common factors with z (e, z are "relatively prime"). 4. choose d such that ed-1 is exactly divisible by z. (in other words: ed mod z = 1 ). 5. public key is (n,e). private key is (n,d).

Know digital certificates. How are they created? Role of the CA. What does a CA do (conceptually) to a public certificate such as the one for amazon.com? What is the name of the standard? What are the types of CAs? What is a chain of trust?

A digital certificate certifies the ownership of a public key by the named subject of the certificate. A Certification Authority issues digital certificates and binds public key to particular entity. Root certificate authority: Issues the root certificates that are used to sign other CA certificates. As such, it is the root of trust for the entire PKI (public key infrastructure). Root certificates are self-signed certificates. Subordinate CA: Received its certificates from another CA and will typically be tasked with issuing certificates to users and resources.

Electronic Codebook (ECB)

Advantages: - Fast, simple - Supports parallel (encryption/decryption) Disadvantages: - Duplicate data in plaintext will be reflected in the ciphertext - Plaintext can be operated by deleting/replacing ciphertext - Damaged ciphertext packet will affect the plaintext. - Cannot resist replay attacks Requires padding and is not stream capable. Suitable for encrypting short messages or when random access to ciphertext blocks is required.

Propagating CBC (PCBC)

Advantages: - Improves error propagation compared to CBC. Disadvantages: - No support for parallel Requires padding and not stream capable. Similar to CBC, used in secure communication and file encryption.

Counter (CTR)

Advantages: - No padding - Can prepare encryption and decryption in advance - Encryption/decryption use the same structure - Support for parallel - Wrong blocks only affect current block Disadvantages: - Mallory can change some ciphertext damaged plaintext Widely used in disk encryption and secure communication. Suitable for streaming data.

Cipher Feedback (CFB)

Advantages: - No padding - Support for parallel (decryption) - Ability to decrypt any ciphertext packet - Can be prepared for encryption and decryption first Disadvantages: - No support for parallel (encryption) - No resistance to replay attacks - Wrong blocks affect following blocks Suitable for real-time encryption and streaming data.

Cipher Block Chaining (CBC)

Advantages: - Support for parallel (decryption) - Can decrypt any ciphertext packet - Duplicate data in plaintext will not be reflected in ciphertext Disadvantages: - No support for parallel (encryption) - Wrong blocks will affect all following blocks Requires padding and is not stream capable. Widely used in secure communication protocols and file encryption.

Know the fundamental relationship for each round in DES Li = Ri-1 Ri = Li-1⊕f(Ri-1, Ki) What are Li and Ri, and what are their sizes? What is the size of Ki?

Li = Ri-1: The left half of the current round is equal to the right half of the previous round. Ri = Li-1⊕f(Ri-1, Ki): The right half of the current round is equal to the XOR (⊕) of the left half of the previous round and the output of the round function (f) applied to the right half of the previous round and the round key (Ki). Li: The left half of the 64-bit input block, which is 32 bits in size. Ri: The right half of the 64-bit input block, also 32 bits in size. Ki: The round key for the i-th round, which is 48 bits in size.

What does symmetric key mean in terms of Alice and Bob? Is it the same key at the encryption as at the decryption? How would the same key do encryption and also decryption? Give an example with a simple alphabet substitution encryption. What is the major issue when using symmetric keys?

Alice and Bob agree on a key and encryption algorithm to exchange messages. The key used to encrypt, can the be used to do the reverse process and decrypt. Plaintext: "HELLO" Symmetric key: 3 (shift alphabet by 3) Encrypted message: "KHOOR" An issue with symmetric key encryption is the secure exchange of the key.

What is MFA? Can you give an example of how it is used at UTRGV?

Multi-Factor Authentication is a security mechanism that requires users to provide two or more authentication factors to verify their identity before being allowed access. UTRGV requires a code sent via text or found on the Authenticator app before it allows access to certain applications when the user is not on eduroam.

Know the difference between plaintext and cipher text.

Plaintext is a clear-text message. (Ex. "apple") Ciphertext is the encrypted version of the message. (Ex. "bqqmf")

Know how the expansion function is used. Given its table, can you calculate a few of the outputs?

The expansion function is a component used within the Feistel structure during each round of encryption. It takes a 32-bit input as its input and produces a 48-bit output. It's used to increase the amount of data processed by the subsequent round function, thereby increasing the diffusion and confusion in the encryption process. The expansion function is defined by the E-bit selection table, which specifies the positions of the bits in the input block that are duplicated and rearranged to form the output block. The table consists of 48 entries, each corresponding to the position of a bit in the output block. Example of an expansion function table: 32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1

What are Hashes used for in terms of communications and the CIA areas?

Used Alone - Fingerprint: file integrity verification, public key fingerprint - Password storage (one-way encryption) Combined with encryption functions - Hash based Message Authentication Code (HMAC): protects both a message's integrity and confidentiality - Digital signature: Ensuring Non-repudiation and Encrypt hash with private (signing) key and verify with public (verification) key

How does decryption differ from encryption for DES? Think in terms of the directions, formulas, and roles of each box type.

Decryption uses the same algorithm as encryption, except that the subkeys K1, K2, ...K16 are applied in reversed order

Know how the general Mono-alphabetical (Vigenere) uses multiple ciphers (n substitution ciphers with a cycling pattern) to overcome the weakness above.

Each letter is encrypted using a different Caesar Cipher, determined by the corresponding letter in the key. The key is applied in a cyclical pattern, meaning it starts back at the beginning after the last letter of the key is used.

How is the parity check computed? Should be able to create a parity given the bits.

Excluding the parity bit, count all the set bits. If the count is even, set the parity bit to 1. If odd, the parity bit is already 1.

HMAC (Hash-based Message Authentication Code)

HMAC can provide message authentication using a shared secret instead of using digital signatures with asymmetric cryptography. It trades off the need for a complex public key infrastructure by delegating the key exchange to the communicating parties, who are responsible for establishing and using a trusted channel to agree on the key prior to communication.

Know the basic property of hash functions. Know also the most famous two standards and their message digest length.

Hash functions is that they take an input (or message) of arbitrary length and produce a fixed-size output. The two most famous ones are MD5 (128-bit message digest) and SHA-1 (160-bit message digest).

How does the key compression table work?

Key compression table (PC-2) works by selecting 48 bits from the concatenated 56-bit intermediate key obtained after PC-1. PC-2 further shuffles and compresses the bits to generate a 48-bit round key specific to each round of DES encryption or decryption.

Should be able to draw a diagram of how a digital signature works for preserving the integrity of a transaction. Identify each stage of the transaction. Identify the overall bandwidth used in terms of the length of the message and what is actually sent to provide for integrity.

Message Creation: The sender creates a message to be transmitted to the receiver. Hashing: The sender applies a hash function to the message to generate a hash value. Digital Signature: The sender encrypts the hash value with their private key to create a digital signature. Digital Signature Verification: The receiver decrypts the digital signature using the sender's public key to obtain the original hash value. Hash Recalculation: The receiver recalculates the hash value from the received message. Integrity Check: The receiver compares the recalculated hash value with the original hash value obtained from the digital signature. If they match, the integrity of the transaction is verified. Bandwidth used for transmission is dependent on the length of the message itself. The digital signature is provided for integrity.

How does parity drop work?

Parity drop involves discarding the parity bits from the initial 64-bit key before further processing during key generation. This ensures that the key used in DES encryption or decryption consists of only the actual key bits, contributing to the cryptographic strength of the algorithm.

Make sure to be able to distinguish between Digital signature with public/private key vs shared secret

Security Model: - Asymmetric cryptography relies on the security of the private key, ensuring that only the sender can produce a valid signature. - Symmetric cryptography relies on the secrecy of the shared secret key, which must be securely shared between the sender and receiver. Key Management: - Asymmetric cryptography requires the management of public and private key pairs, with the private key kept secret. - Symmetric cryptography requires the secure distribution of a shared secret key between the sender and receiver. Non-repudiation: - Asymmetric digital signatures provide strong non-repudiation, as only the sender possesses the private key. - Symmetric digital signatures do not inherently provide non-repudiation, as both sender and receiver possess the shared secret key.

When using packets or digital data, we use Stream Cipher & Block Ciphers At what level of data do these ciphers work?

Stream ciphers work at the bit or byte level, while block ciphers work with fixed-size blocks of data.

Give an example of Authorization. How would authorization be enforced, say, for a company project?

An ACL defines the permissions of an individual or group for a resource or file. A project manager will set the permissions for individual members of a project based on their roles and tasks.

Give the authentication protocol that was derived in ap5.0 Draw the diagram for the system. How does it protect against playback? What is the flaw there? What is the name of the attack it gives rise for? How can it be mitigated?

Authentication Protocol 5.0 uses nonce and public key cryptography. Nonce is a number only used once-in-a-lifetime, meaning it can't be played back a second time. A man-in-the-middle attack is when the attacker poses as the client to the server and vice versa. Authentication through digital signatures may mitigate the vulnerability.

What does AAA stand for in security? Give an example of each of the areas.

Authentication: Username & password, biometrics, etc. Authorization: ACL, role-based access controls (RBAC) Accounting: Logging, reporting

Give an example of accounting related to communications. For example, bandwidth, features, roaming, etc.

Bandwidth usage is tracked by ISPs for the purpose of billing.

What is the block size, key size, and number of rounds for DES?

Block Size: 64 bits Key Size: 56 bits plus 8 bit for parity checking. Rounds: 16

Know the details of CBC as given in the homework.

Cipher Block Chaining is a mode for block ciphers. The IV is XORed with the first plaintext block before encryption. After the first plaintext block, each subsequent plaintext block is XORed with the ciphertext of the previous block before encryption. If the last plaintext block is not a full block size, padding is added to fill the block before encryption.

Difference between confusion and diffusion.

Confusion refers to making the relationship between the plaintext, the ciphertext, and the encryption key as complex and intricate as possible. This ensures that even a small change in the input results in significant changes in the output. Diffusion refers to spreading the influence of each plaintext symbol or bit over many ciphertext symbols or bits. This ensures that each bit of the plaintext affects many bits of the ciphertext, making it difficult for an attacker to identify patterns or redundancies.

Know the steps for key generation.

The initial 64-bit key undergoes a permutation operation known as PC-1 (Permutation Choice 1). PC-1 selects 56 bits from the original key while discarding 8 parity bits. The result is a 56-bit key, which is divided into two 28-bit halves: C0 and D0. Each of the 28-bit halves (C0 and D0) undergoes a series of left shifts. In each round, the shifts are as follows: Rounds 1, 2, 9, and 16: Shift 1 bit left. Other rounds: Shift 2 bits left. After the left shifts, the two halves are combined to form a 56-bit round key. This round key then undergoes a compression permutation operation known as PC-2 (Permutation Choice 2). PC-2 selects 48 bits from the 56-bit round key, discarding the remaining bits. The result is a 48-bit round key for the respective round. Steps 2 (shifts and PC-2) are repeated for each of the 16 rounds of DES. Each round produces a unique 48-bit round key. For the final round (Round 16), the round key is generated using the same process as other rounds. However, the final round key is not used in the main round function. It is used in the final permutation operation after the 16th round.

Know how the initial permutation is calculated. Given its table, can you calculate a few of the outputs?

The initial permutation (IP) in DES is a fixed permutation applied to the 64-bit input block before the main rounds of encryption or decryption. It rearranges the bits of the input block according to a predefined permutation table. For each entry in the initial permutation table, you move the bit from the corresponding position in the input block to the new position in the output block. Example of an initial permutation table: 58 50 42 34 26 18 10 2 60 52 44 36 28 20 12 4 62 54 46 38 30 22 14 6 64 56 48 40 32 24 16 8 57 49 41 33 25 17 9 1 59 51 43 35 27 19 11 3 61 53 45 37 29 21 13 5 63 55 47 39 31 23 15 7

Given a message, m, in general, how does encryption work, and how does decryption work? What is the nice property of RSA that is related to the order of applying encryption and decryption?

The sender computes the ciphertext c using the formula: c = m^e mod n The recipient computes the plaintext m using the formula: m = c^d mod n The nice property of RSA related to the order of applying encryption and decryption is that they are commutative. This means that applying encryption followed by decryption (or decryption followed by encryption) using the same key pair results in the original message.

How was DES improved? What is called? What are the different modes of the new improved DES? How does it maintain backward compatibility?

The successor to DES is 3DES Use three different keys Encrypt: C = EK3 [ DK2 [ EK1 [P] ] ] This is to allow for backward compatibility with the DES, while not affecting the three keys when they are different: Decrypt: P = DK1 [ EK2 [ DK3 [C] ] ] Reversing the order of applying the keys and the E/D. The standard specifies three keying options: Keying option 1: All three keys are independent. Most common, and C = EK3 [ DK2 [ EK1 [P] ] ] is the preferred way Rem: Decryption is essentially the same as encryption, only with different order of the subkey, which are derived from the same key Keying option 2: K1 and K2 are independent, and K3 = K1. Keying option 3: All three keys are identical, i.e. K1 = K2 = K3.

How does Public Key Cryptography differ from Symmetric Key? Number of keys? Which ones can be known by the public? Which one is faster? Which one is used for the actual encryption of data? Which one is used for signatures, digital certificates, and authentication?

There are two mathematically related keys: public and private. The public one is known by everybody. Symmetric key is faster. Symmetric key is used to actually encrypt data, while public key encryption is used to encrypt the symmetric keys. Public key is used for signatures, certificates and authentication.

What is the advantages of the following encryption modes: GCM (Galois/Counter Mode) CCM (Counter with CBC-MAC) OCB mode (Offset Codebook Mode

They combine message authentication and encryption.

Given a key such as K=17, can you encrypt or decrypt a message Remember: encryption and decryption are done Mod n where n is the size of the alphabet.

To be encrypted, a letter will be shifted by 17 positions. For example: "H" (7) + 17 = 24 --> "Y" "E" (4) + 17 = 21 --> "V" "Y" (24) + 17 = 41 mod 26 = 15 --> "P" *26 is the size of the English alphabet


Related study sets

Relias: Ethics and Corporate Compliance

View Set

ECON: Chpts 1-3 questions ( test)

View Set

Ch. 9 Common Causes of Medication Errors and Steps to Follow When a Medication Error Occurs

View Set

Human Diseases and Conditions Exam 1

View Set

Scripture ~ Calling the Disciples

View Set

Motivation & Emotions Review Quiz

View Set

Bio-L211 Exam 3 Quick Checks for Studying

View Set