Tutorial 4 – Computer Systems
Tutorial 4 – Computer Systems
Copyright By PowCoder代写 加微信 powcoder
Cryptography
1 Confidentiality: other people can’t
understand the message you’re sending
2 Authentication/verification: message
coming from who its claiming to come from
3 Integrity: data not altered along its
communication channel
Encryption: using a key to transform a plaintext message into a
cipher text
Decryption: recovering ciphertext into plaintext using same or
different key
Encryption and decryption
Introduction to
Cryptography
Cryptography is not always perfect since you can technically generate
every possibly key to decrypt the cipher text
A lot of security mechanisms are about making brute force attacks
take an unfeasible amount of time
enc(enc_key,
dec(dec_key,
Symmetric cryptography
Same key used for encryption and decryption, e.g. for full disk
encryption where key is maintained independently from computer’s CPU
AES (Advanced Encryption Standard) breaks data into blocks and uses a
block cipher encrypts those blocks
A block cipher is a deterministic algorithm that operates on a fixed-
length group of bits
Parallelisable, all blocks can be encrypted at the same time
Lacks diffusion, in cases may not provide confidentiality due to repeated
patterns in output
What is diffusion? A high dependency of the output bits on the input bits. So
high diffusion means that if we change a character of the plaintext, then
several characters of ciphertext should change
Each block of plaintext is XORed with the previous cipher text before being
encrypted. Notice that there is a dependence on the previous cipher text
Initialization Vector is not secret but should don’t be reused
Sequential encryption, parallel decryption. Why?
Note: a loss of a block or corrupt IV only prevents decryption of next block.
CBC vs EBC
encryption parallelisable
decryption parallelisable
random read access
Advantages EBC
Asymmetric cryptography
the size of the key
the operations themselves (exponentiation of large numbers, bitwise
manipulation)
In asymmetric cryptography, there are different keys for encrypting
and decrypting.
The public key and secret key are mathematically connected.
Asymmetric is slower than symmetric cryptography due to
Usually symmetric and asymmetric are used together
How are public keys and private keys used?
How can asymmetric and symmetric encryption be used together?
Diffie-Hellman key exchange 1) Provides perfect forward
secrecy: ONLY IF EPHEMERAL,
public variables must be
destroyed and not reused!!!
Session keys will not be
compromised
even if the private key is
compromised.
Just getting private key doesn’t
the attacker.
2) No authentication happening
3) Vulnerable to MITM attacks
MAC: Message
Authentication Code (tag)
Authenticates message: confirm
that it came from the actual
Integrity: makes sure that the
message has not been tampered
NOT confidentiality. the
message is sent in plaintext!
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com