1.3.1 Compression, Encryption and Hashing Flashcards
The needs of compression (3)
- Reduce the size of file
- Makes files quicker to transfer
- Files take up less space in storage
Descibe what is meant by the term ‘‘Lossy compression”
- An algorithm that makes a file size smaller
- …but with which information is lost in the process
Features of Lossy compression
- some data is lost when the file is compressed
- Slightly reduces quality but significantly reduces file size
- suitable for images, audio and video
Features of Lossless compression (3)
- None of the original data is lost
- The original file can be recreated when it is uncompressed
- Suitable for executable files and documents
What is run length encoding
Compress a file by recording its value and the number of times it repeats
What is dictionary-based compression techniques
some times called dictionary encoding
Using a dictionary table to write words into their value accordingly.
What is encryption
The process of transformation that can keep data secure and only accessible to authorised parties.
Two types of encryption techniques with their features.
Symmetric encryption
- use the same key to encrypt and decrypt data
- key exchange may cause security problem
** Asymmetric encryption**
- Others use public key to encrypt
- I use pricate key to encrypt/decrypt
- Benefits: more secure and the message is authenticated by the sender with private key.
Essay question example
Discuss the impact of modern encryption on society. You should refer to:
* The importance of asymmetric encryption and how it differs from symmetric encryption.
* Different circumstances in which symmetric and asymmetric encryption may be used.
Encryption is critical to protect people from data misuse in today’s digital society. It’s a fundamental aspect of secret communications, e-commerce, and the protection of personal information.
Asymmetric encryption uses a pair of keys: a public key for encryption and a private key for decryption. This solves a crucial issue in key distribution, as the public key can be openly shared without compromising the secure private key. Asymmetric encryption forms the backbone of secure online transactions and communications, enabling features like digital signatures and secure key exchange.
Unlike asymmetric encryption, symmetric encryption uses a single key for both encryption and decryption. While it’s usually faster and more efficient for handling large data, it poses a challenge in securely sharing the key between parties. Asymmetric encryption, though generally slower, alleviates this issue by using a public-private key pair, adding an extra layer of security.
Symmetric encryption is ideal for quick scenarios, such as encrypting large files or databases within a secure network where key distribution is not an issue. Asymmetric encryption is preferred in situations demanding high security, like secure email communications or online banking, where a compromise in key distribution can lead to significant risks.
Using symmetric and asymmetric encryption profoundly impacts society, enabling secure data transmission, enhancing online commerce, and protecting individual privacy. However, the consequences of providing individuals with highly secure methods of communication mean that regular users can communicate for nefarious reasons, such as organised crime. For situations where an individual must choose between the two methods, they should consider if the data transfer needs to happen quickly or securely.
1.Start with an introduction outlining the importance of modern encryption in society. Consider some scenarios where private data is being transferred, such as at school or the workplace.
2.Discuss the key features of asymmetric encryption, emphasising its significance and how it resolves key distribution issues.
3.Compare asymmetric and symmetric encryption, pointing out the differences and mentioning the single key used in the latter.
4.Provide examples of scenarios where symmetric and asymmetric encryption are most suitable, discussing the pros and cons of each.
5.Conclude by summarising the overall impact of both types of encryption on society, including data security, online transactions, and individual privacy.
What is Hashing
The process in which an input is turned out a fixed length size value (called hash total or digest)
State the feature of hashing
- Cannot reversed
- Output is smaller than input
- Sensitive to data changes
- Same input always produces the same output
Explain whether lossless of lossy compression would be most appropriate to store the photographs of digital camera to take picture of parcels. (3)
Lossy.
- Some loss of detail is acceptable
- loss of details are unlikely to be noticable
- Will make the file size smaller than lossless.
Justify - give valid reasons or evidence to support your chioce
State an advantage to the website’s user of file being compressed. (1)
注意受益对象!
Download quicker.
Explain why a text file sould use lossless and not lossy compression.(3)
- Lossy removes some data.
- Lossless preserves all data.
- With text, the loss of small amounts of information will make it unreadable.
A company decides to release a duplicate file finder.
Every time the program encounters a file it takes a hash of the file and checks it against a list.
Explain two characteristics you would look for in a hashing algorithm for this purpose.
- low chance of collision … to reduce the rick of different files being marked as the same
- Quick to calculate … as lots of files need to be hashed
- Provide a smaller outpus than input, so quicker to compare hashed than original data.