1/55
Looks like no tags are added yet.
Symmetric encryption versus public-key encryption
Symmetric encryption uses the same key for encryption and decryption
Public key encryption uses different mathematically related public/private keys for encryption and decryption
What is the main disadvantage of public key encryption
Greater computational cost due to mathematics involved with generating keys, and authentication requirement for public keys
How many keys are needed in a symmetric encryption system
n(n-1)/2 where n is number of users in the network
How many keys are needed in public key encryption
2n, where each n user gets a public and private key
Symmetric key properties
Must be easy to generate and kept private to only authorized parties
Public/private key properties
It must be practical to generate a pair
Operations on keys ust be efficient
Cannot derive private key from public key
Cannot derive private key from messages
How can public/private key systems be used
RSA for confidentiality through large prime numbers
Diffie-Hellman for secure key exchange
Digital Signature Standard for authentication
Why is RSA hard to break?
Since the n value is calculated from p and q, two large prime numbers, it is computationally hard to recover p and q from n
What are the security assumptions of RSA
Requires large and properly generated keys, with private keys protected
What is modular arithmetic?
Arithmetic done within a set of digits, with any results of numbers outside of the set needing to be mod n to get the proper result, where n is the number of numbers in the set
What are the encryption and decryption equations in RSA?
C = P^e mod n
P = C^d mod n
How is n calculated in RSA?
n is the product of two very large prime numbers, p and q
How do we calculate eulers totient for RSA?
phi(n) = (p-1)(q-1)
How do we calculate the public key for RSA?
Choose some e within 1 and phi(n), such that the gcd of e and phi(n) = 1
Public key is (n,e)
How do we calculate the private key for RSA?
Choose some d such that e x d mod n = 1
Private key is (n,d)
d can also be found as ed = 1 + n(phi)
Why might symmetric encryption still be needed?
Since operations using public/private keys are often much slower due to the reliance of arithmetic and exponentiation. Symmetric encryption uses bitwise operations which are a lot faster.
Symmetric encryption also protects large data streams efficiently
How is confidentiality maintained with public key encryption?
Sender encrypts plaintext with recipient's private key, and recipient can decrypt with their corresponding private key.
This does not enforce integrity or authentication
How is authentication and integrity maintained with public key encryption?
Sender encrypts plaintext with their own private key, and recipient can decrypt with the sender's public key to ensure the message is coming from them.
This does not enforce confidentiality since anyone can use the sender's pubilc key
How do you enforce both authentication and confidentiality with public key encryption?
First, sender encrypts plaintext with their own private key, then encrypts the result with the receiver's public key.
Receiver will decrypt with their own private key, then decrypt again with the sender's public key.
What is a passive attack
A passive attack is when an attacker observes communication without any action, like reading traffic and looking at confidential material
What is active attack?
An active attack is when an attacker takes action by intercepting, reordering, or replaying messages from a channel
What does message authentication check?
Both integrity, that the message has not been altered, and origin authentication, that the message is coming from the right place
What is a message authentication tag?
It is a value/code thats paired with a message, that the receiver can use for integrity and origin verification.
How is a message authentication code generated?
A sender and receiver share a secret K key. The tag is produced from a function that uses both the message and this key. A sender will send the message and key pair.
How does the receiver use the MAC to verify integrity and origin?
The receiver puts the message into the same function with the shared key. If the produced code is the same, then they know the message hasn't changed, and the message came from the same person who shares their key.
What is the purpose of using the hash function?
A hash function produces a hash, or message digest, which is used for integrity
How is a hash function used to enforce integrity?
Sender produces a message digest from the hash function, then sends the hash and message pair to the recipient. Recipient can run the message through the function themselves, and compare if the hashes are the same
Does a hash function enforce authentication?
No, a hash function does not enforce authentication because anybody can use the hash function
What is MD5?
Hash function that produces a 128-bit result.
What is SHA-1?
Hashing algorithm that creates a 160-bit message digest.
What is SHA-2?
Family of algorithms that include SHA- 224, SHA- 256, SHA- 348, and SHA- 512, based on the bit length of the digest created
What is HAVAL?
Hash function that produces digests of variable length, from 128, 160, 192, 224 or 256 bits.
How can we use hashing and ensure confidentiality
Encrypt the message hash pair, such that the recipient can decrypt the pair, and then hash the message to ensure that the resulting hash matches what was sent
What are check sums?
Checksums are k bits that are added to a string of n bits for the receiver to check for error or tampering
How do odd/even parity check sums work?
A 1 bit checksum is added to the end of data, which makes the total number of 1s odd or even (Declared by sender). Such that the recipient can compare the actual number of 1s or 0s in the data to the checksum, to see if data was edited.
What is a disadvantage of odd/even parity check sums?
It cannot detect errors if an even number of bits were flipped
What is a file checksum and how does it work?
A sender calculates a checksum is from every bit of a file and stores it with the message, and a receiver calculates the checksum themselves and compares the two values. If they are different, the file may have been tampered with.
What is the issue with symmetric key sharing?
There needs to be a secure way to exchange shared keys in order for them to be used. But encrypting it symmetrically needs another shared key itself
How can private keys be used for symmetric key sharing?
They can be used by the sender to encrypt the symmetric key and by the recipient to decrypt it.
They can enforce both authentication and confidentiality by doing two rounds of encryption using the recipients public key and the sender's private key
What are digital signatures?
Digital signatures is a way to enforce authentication and non-repudiation by tying data to a particular person via their private key. This is verified with their corresponding public key
What is signature notation?
Sg(S,M)
This means a signature from sender S is on message M, and a signature message pair (M,Sg(S,M)) is sent
What are the 5 properties of a signature?
A signature must not be forgeable
A signature must be verifiable via public key
A signature must not be valid if the message is changed
A signature must be able to be traced to the signer
A signature is unique to one message only
Why are digital signature's non-repudiation better than shared key authentication? (Through MAC)
Since both parties know the shared key, they could generate the same tag through the MAC function. One party can't prove to a third party who generated the key. In digital signatures, this is possible
How do you maintain confidentiality using digital signatures?
Encrypt the message to get C, then sign Sg to get Sg(S,C), then send the (C,Sg) pair
Why do we normally sign hashes instead of the message?
It is more efficient to sign the hash and attach it to a message
How are hashes signed?
A hash/digest is calculated by putting M through a hash function, then H is signed to get Sg(S,H), and the (M,Sg) pair is sent
What is the downside to encrypt-then-sign over sign-then-encrypt?
In encrypt-then-sign, the signature message package is not encrypted. So an attacker could check the ciphertext's signature without decrypting it
What is the man in the middle attack?
When an attacker intercepts a communication channel between two parties, and convinces them that they are using the other party's public key, when they are using the attackers.
So why doesn't public key encryption alone establish identity or authentication?
Since public keys can be generated by attackers and falsely labelled as belonging to a trusted party
What is a certificate?
An identity and public key pair, which is signed by a TTP to verify that this public key belongs to this individual.
What is the benefit of using a certificate?
Certificates have public information, which cannot be changed by an attacker and cannot be recreated by an attacker
What is a registration authority?
An RA takes a certificate request and checks their identity, and forwards to the certificate authority
What is a certificate authority?
A CA issues and signs certificates
What is a validation authority?
A VA supplies certificate status and validation information regarding certificates
What is a certificate revocation list?
An issuer-signed list which identifies certificates that have been revoked due to expiration or revocation
How can certificates counter forged public-keys?
Certificates verify public keys through a trusted party's signature