1.3.1) Compression, Encryption and Hashing Flashcards
Why do we use compression?
- Cheaper
- Quicker transmission
- Faster loading times
- Reduces buffering
What does Lossy Compression do?
- Removes non-essential data
- reduces quality
- most effective
What happens in Lossless Compression?
- Reduce file size without loss of data
- Records patters in data to reassemble the data
- Used when all data in file is essential
- Results in a larger file than lossy compression.
What is Run Length encoding?
- A type of lossless compression
- Replaces sequences of repeated characters with a flag character, the character the number of times it is repeated.
What is dictionary based compression?
- A type of lossless compression
- A dictionary of common words/characters is created
- sequences in the text are replaced with pointers
- References are shorter than the sequence so file size is reduced.
What is encryption?
Encryption transforms data from one form to another to prevent an unauthorized third party from understanding it.
What is the caeser cipher?
A cipher in which the alphabet is coordinated with other letters, being shifted by a certain amount, defined by the key.
What is the vernam cipher?
- The only cipher with perfect security
- A “true random” key of equal or greater lengtht than the plaintext is generated.
- An XOR is applied to generate the cipher text.
Vernam Cipher: Pros
- The only cipher with perfect security
- There is a very very low chance that the key can be randomly discovered.
Vernam Cipher: Cons
- Perfect random is hard to achieve.
- Its hard to enforce a secure key
- If key discovered can be easily deciphered.
What are the two types of encryption?
Symmetric and Asymmetric
What is Symmetric Encryption?
- The same key is used to encrypt and decrypt data
- The key is transferred with the ciphertext
- Poor security
What is Asymmetric Encryption?
- Uses two seperate but related keys (public and private)
- Possible for a malicious third party to use public key and impersonate a legitimate sender
What is a public key?
A public key so others can encrypt data to be sent to reciever.
What is a private key?
Known only to the reciever and used to decrypt a message.
Governments sometimes demand copies of encryption keys in order to decrypt messages if necessary. What reasons are there for governments doing this?
- Illegal activities can legally be intercepted and used towards evidence
- It can improve counterterrorism
- Data protection- in case of loss or corruption of data encryption keys help to retrieve this.
- Illegal transactions such as fraudulent money exchange can be monitored and deterred
Governments sometimes demand copies of encryption keys in order to decrypt messages if necessary. What reasons are there against governments doing this?
- International law can create controversy (eg is the receiver of the message from a different country)
- Loss of trust for the government
- People will find illegal ways to communicate without encryption.
- Abuse of power- use of keys for own personal gain
- If theres a mass database, if breached leaves large scale vulnerabilities
- Risk of bias
What is hashing?
A hashing algorithm distorts data, making it completely unreadable
Why do we need hashing algorithms to store data?
Any external access doesn’t comprimise the data’s integrity
Benefits of Hashing?
- Secure
- Cannot get to the original value
- Small changes produces a completely different value
What is a digital signature?
An electronic, encrypted stamp of authentication on digital information such as email messages.
How do they help keep encryted data secure?
Verifies the identity of a message sender or website, issued by an official certificate authority.
What does a digital signature include?
Serial number, expiry date, name and public key.
Uses of hashing:
- Prevents passwords and pins being read by a hacker
- Quick searching, insertion and deletion of data structures.
How does hashing prevent passwords from being read?
- hashed value is stored
- if accessed it cannot be reversed
- a user input will be hashed using the same algortihm and it will be compared to the hashed value.
How can hashing be used to search quickly?
- Instead of assigning each value a random address, the hashed value can be used
- when searching the value can be hashed to find the location.