1.3.1 Flashcards
compression
Compression is the process used to reduce the overall size of a file, meaning you can store more files with the same amount of storage space.
methods of compression
lossy
lossy compression reduces the size of a file while also removing some of its information (quality). This could result in a more pixelated image or less clear audio recording.
lossyless
lossless compression reduces the size of a file without losing any information.
lossy vs lossyless
lossless compression types
dictionary coding
Frequently occurring pieces of data are replaced by symbols (smaller groups of characters).
A dictionary is then used to say which matches the frequently occurring data to an index. The
original data can then be restored using the dictionary. Works by creating an index visualised as a table.
When decompressed the dictionary is used to replace the tokens with the original text.
Now consists of
- dictionary index
- sequence of occurrences needed to recreate the file.
run length coding
Ideal for compressing bitmap images, RLE, is a method of lossless compression in which repeated values are removed and replaced with one occurrence of the data followed by the number of times it should be repeated.
For example, the string AAAAAABBBBBCCC could be represented as A6B5C3.
In order to work well, run length encoding relies on consecutive pieces of data being the
same - if there’s little repetition, run length encoding doesn’t offer a great reduction in file size.
encryption
Encryption is used to keep data secure when it’s being transmitted., the process of encoding a message so it can only be read by the sender and the intended recipient.
key
to decrypt the message, the recipient needs to know how many places the alphabet has been sifted by (key). If they know the key, they can decrypt it, aim of encryption is to make the original message impossible to crack without the key.
symmetric encryption
A single key is used for both encrypting and decrypting a message, both the sender and receiver share the same private key, which they distribute to each other in a process called a key exchange. Both need to keep it secret.
The same key can be used multiple times. A unique key can be generated each time in an attempt to make it harder to crack.
However there is a danger that a message can be cracked by either the interception of the key, duplication of the key production process to acquire a copy of the key.
asymmetric encryption
Used when sending/receiving sensitive info like card details as it’s more secure.
Two different keys are used, starting with the un-encrypted message and encrypt it with the first key. Then when sent, the recipient decrypts the message with the second key.
Virtually impossible to derive one key from another, which is why its more secure for encryption.
Keys are generated so anything encrypted with one of the keys can be decrypted with the other = key pairs. One being public and second, private.
The public key can be published anywhere, free for the world to see, often stored in secure servers (key safes), so anyone can access it while the private key must be kept secret.
How does the public/private key make encryption more secure
First thing that happens is the sender and recipient exchange copies of public key. If the recipient want to communicate privately, they will use the senders public key to encrypt her message, then the sender would use the private key to decrypt it. No one can intercept the massage as they can’t decrypt it without the private key.
Another advantage is the sender can encrypt their message with their private key, and as their public key can be accessed by anyone, anyone can decrpyt it. This means the message can only be decypted if it’s originally encrypted with their private key, confirming the message is authentic.
If the sender wants to send a message, they would sue their private key and the recipients public key (combined encryption key). Using the CEK to encrypt a message and send it. To decrypt it the recipient would use their private key and their copy of the senders public key.
advantages to asymmetric encryption
No one else will be able to read the senders message
The recipient knows no one else can read the senders message
Can be sure the message is authentic
Can be sure the message hasn’t been modified.
difference between symmetric and symmetrical encryption
In contrast to symmetric encryption, a single key cannot be used to both encrypt and decrypt communication. Instead, messages encrypted with the recipient’s public key can only be decrypted with the recipient’s private key, which should only be in the possession
of the recipient.