3.1 Compression, Encryption & Hashing (OCR A Level Computer Science) Flashcards

Exam code: H446

1/32

0Still learning

Know0

Cards in this collection (32)

  • Define compression.

    Compression is the process of reducing file size to allow for more efficient data transfer and storage.

  • Define lossy compression.

    Lossy compression is a method of reducing file size by permanently removing some data from the file, which cannot be recovered.

  • Define lossless compression.

    Lossless compression is a method of reducing file size without losing any original data, so the file can be perfectly restored.

  • Why is compression important in data transfer over the Internet?

    Compression is important because it reduces file size which allows for faster transmission and less bandwidth consumption.

  • There are two main types of compression:       and         .

    There are two main types of compression: lossy and lossless.

  • True or False?

    Lossless compression discards some data to reduce file size.

    False.

    Lossless compression keeps all original data and does not discard anything.

  • Lossy compression is suitable for            streaming, but not suitable for        storage.

    Lossy compression is suitable for media streaming, but not suitable for archival storage.

  • Which type of compression should be recommended when data integrity is essential, and why?

    Lossless compression should be recommended because it maintains original data without any loss, ensuring data integrity.

  • Define run length encoding (RLE).

    Run length encoding (RLE) is a data compression method that replaces consecutive identical elements with a single value and a count.

  • In run length encoding, a sequence like AAAABBBCCDAA is compressed to        .

    In run length encoding, a sequence like AAAABBBCCDAA is compressed to 4A3B2C1D2A.

  • True or False?

    Run length encoding is most effective when data has long runs of repeated elements.

    True.

    Run length encoding works best when there are long sequences of repeated values, as it can significantly reduce the amount of data stored.

  • What does the run length encoded sequence 3C3M4C decompress to?

    The sequence 3C3M4C decompresses to CCCMMMCCCC.

  • Define dictionary coding.

    Dictionary coding is a data compression technique that replaces recurring sequences with shorter, unique codes stored in a dictionary.

  • Dictionary coding is effective for both      and        data.

    Dictionary coding is effective for both text and binary data.

  • What is the main advantage of using dictionary coding over run length encoding?

    Dictionary coding is more versatile and can compress a wider range of data types, as it replaces recurring sequences with unique codes, not just repeated elements.

  • Compress the sequence CCCCOLLLCCCCCMOCCCCC using run length encoding.

    The compressed sequence is 4C1O3L5C1M1O5C.

  • Define encryption.

    Encryption is the process of converting readable data into an unreadable format to secure it from unauthorised access.

  • What is the primary aim of encryption?

    The primary aim of encryption is to secure data from unauthorised access.

  • Symmetric encryption uses the        key for both encryption and decryption.

    Symmetric encryption uses the same key for both encryption and decryption.

  • What is the main disadvantage of symmetric encryption?

    The main disadvantage of symmetric encryption is the challenge of securely sharing the key; if someone intercepts the key, they can decrypt all messages transmitted.

  • Asymmetric encryption uses a       key for encryption and a        key for decryption.

    Asymmetric encryption uses a public key for encryption and a private key for decryption.

  • True or False?

    Asymmetric encryption is generally faster than symmetric encryption.

    False.

    Asymmetric encryption is typically slower than symmetric encryption, and is usually used for smaller, more secure data transfers.

  • Give one example of when symmetric encryption is most suitable.

    Symmetric encryption is most suitable for encrypting large files or databases, such as when backing up data within a secure system.

  • Why has modern encryption become a fundamental part of online communication?

    Modern encryption is essential for protecting private data during online communication, defending against cyber-attacks and data breaches, and enabling secure transactions such as online banking and shopping.

  • Define hashing.

    Hashing is a method to convert any data into a fixed-size string of characters, known as a digest, using a hash function.

  • What is a hash digest?

    A hash digest is the fixed-size output string produced by a hashing algorithm from any input data.

  • A good hash function provides         to data changes, producing very different outputs even for small changes in input.

    A good hash function provides sensitivity to data changes, producing very different outputs even for small changes in input.

  • True or False?

    Hashing algorithms like SHA-256 always produce the same output for the same input.

    True.

    Hashing is consistent; the same input will always produce the same hash digest with the same algorithm.

  • Define collision attack.

    A collision attack is when two different inputs produce the same hash digest, compromising hash function security.

  • Explain the main difference between encryption and hashing.

    Encryption is reversible, allowing data to be decrypted, while hashing is a one-way process and cannot be reversed to the original data.

  • Hashing is commonly used for         storage to increase security and prevent exposure of raw text.

    Hashing is commonly used for password storage to increase security and prevent exposure of raw text.

  • Why is hashing considered efficient for data retrieval in databases?

    Hashing is efficient for data retrieval because hash digests have a fixed length, making comparisons faster and allowing uniform distribution across hash tables.

Sign up to unlock flashcards

or