1/22
Comprehensive practice flashcards on lossy and lossless compression, dictionary coding, run length encoding, symmetric and asymmetric encryption, and hashing.
What is encryption as defined in the lecture?
The process of encoding a message so it can be read only by the sender and the intended recipient.
How does a Caesar cipher operate, and what is its "key"?
It replaces each letter of the alphabet with another letter a fixed distance away from the original; the key is the number of places the alphabet has been shifted.
What is symmetric encryption and what are its primary security risks?
An encryption method where a single key is used to both encrypt and decrypt the message; risks include interception of the key or duplication of the key production process.
What is asymmetric encryption?
An encryption method that uses a key pair consisting of two different keys (a public key and a private key), where data encrypted with one key is decrypted with the other and it is virtually impossible to derive one key from the other.
What are key safes?
Secure servers in the cloud where public keys are often stored.
In asymmetric encryption, how does a sender transmit a private message to a recipient?
The sender encrypts the message using the recipient's public key; the recipient then decrypts it using their own private key.
What is the purpose of a sender encrypting a message using their private key?
To authenticate the message; since it can be decrypted using the sender's public key, it confirms the message originated from that sender and not someone else.
What four guarantees are established when using a combined encryption key (sender's private key and recipient's public key)?
What is a 256-bit encryption key physically, and how many possible combinations does it possess?
It is a sequence of alphanumeric characters (often represented in hexadecimal) with 2256 possible combinations (a 78-digit number).
What is a hashing function?
A function that transforms a string of characters into a fixed-length value or key that represents the original input string.
Which two popular hashing algorithms are highlighted in the lecture?
SHA-1 and MD5.
What is the fundamental difference between hashing and encryption?
Hashing is a one-way process; it is impossible to recover the original value from the hashed value even if you have access to the original hashing algorithm.
How does hashing protect passwords during login verification?
The system applies the hashing function to the user-entered password and compares the result to the stored hash value, preventing the plain text password from ever being transmitted or stored.
What is the average time complexity provided by hashing for searching, inserting, and deleting items in data structures?
An average constant time complexity of O(1).
Which file types are best suited for dictionary coding versus run length encoding?
Dictionary coding is ideal for text-based documents, whereas run length encoding is ideal for bitmap images.
What two components comprise a file compressed using dictionary coding?
The dictionary index and the sequence of occurrences needed to recreate the original file.
In the lecture's dictionary coding example, how was the text compressed from 840 bits down to 230 bits?
The original text had 105 characters at 8 bits per character (840 bits). The compressed version used 46 numbers (values 1 to 17, requiring 5 bits each), totaling 230 bits or 27% of its original size.
How does run length encoding store repeating pixel data in bitmap images?
It stores data in frequency-data pairs (for example, "22 0" represents 22 contiguous white pixels).
What are the four primary purposes of compressing files?
To reduce file size, reduce download times, reduce storage requirements on secondary media, and make best use of available bandwidth when transmitting data.
What is color depth in bitmap images?
The number of bits required for each pixel to store combinations of colors (e.g., 1 bit for 2 colors, 2 bits for 4 colors, and 3 bits for 8 colors).
What two lossy compression techniques can reduce the file size of an image?
Storing a lower number of colors or storing larger areas of pixels as a single color.
Why must text documents and executable program files use lossless compression rather than lossy compression?
They cannot lose any data during compression without becoming corrupted or unusable, meaning the original file must be reconstructed in its entirety.
Why is run length encoding effective for vector-style images but ineffective for full-color photographs?
Vector-style images (cartoons, logos, icons) contain large areas of continuous repeating color, whereas full-color photographs have very few blocks of continuous repeating color.