Summarize the challenges of key management
If we need enough entropy for a 16-byte key, why should we hash a 20-byte (or larger) passphrase?
We should hash a 20-byte (or larger) passphrase to generate a key that needs 16 bytes of entropy is primarily to maximize the entropy derived from user-selected text and ensure the resulting key is highly random and resistant to dictionary attacks, while meeting the fixed size requirement of the encryption algorithm.
Explain the reused key stream problem
The reused key stream problem occurs when the same key stream is used to encrypt multiple messages in a stream cipher. By XORing the resulting ciphertexts, an attacker can remove the key stream and expose parts of the original messages, making decryption much easier.
Describe the role of the nonce in preventing reused key streams when using the same passphrase to encrypt different files
A nonce prevents reused key streams by ensuring a unique internal key is created each time a file is encrypted, even with the same passphrase. The program combines the passphrase with a newly generated nonce and hashes them together to form a different key for each encryption. This way, attackers cannot exploit repeated key streams across files
Describe how key wrapping may be applied to file encryption
Key wrapping uses two separate and unrelated keys to encrypt the file.
We encrypt the actual data in the file with the content encryption key (CEK).
We must generate a new, truly random CEK whenever we encrypt the file.
We then use the passphrase to produce a key encrypting key (KEK).
We produce the wrapped key by encrypting the CEK with the KEK.
(Paragraph form ni ha not bullet, just did this para easy to memorize xD)
What is the difference between key splitting and key wrapping
Key wrapping protects an encryption key (the content encryption key, or CEK) by encrypting it with another key called the key encryption key (KEK). This lets each file have its own random CEK while the passphrase only protects the wrapped key.
Key splitting, on the other hand, is a simpler form of key wrapping that uses XOR to combine the CEK and KEK. Both keys come from truly random sources, and XORing them “splits” the key so it can be safely shared or stored separately.
Summarize the reasons for rekeying an encrypted file
The more data we encrypt, the more vulnerable our keys become to cryptanalysis. We rekey periodically to reduce the risk.
Describe the different categories of asymmetric encryption algorithms and how they are used in practice
What information must be shared to implement Diffie-Hellman key sharing? Whst is the result?
both participants must have a public/private key pair. Each one multiplies their own private key by the other’s public key to compute the shared secret.
What information must be shared to exchange a wrapped key using RSA?
Only the recipient’s RSA public key needs to be shared to exchange a wrapped key securely
What information must be shared to validate a digital signature using RSA?
To validate a digital signature using RSA, the signer’s public key (e, N) must be shared, where e is the public exponent and N is the modulus.
What information must be available to validate a chain of certificates?
Describe the differences between a hierarchical PKI and one that relies on a web of trust
Hierarchical structure: the most common
- the “root” certificate is distributed widely
- other certificates are verified against it
Web of trust
- an alternative based on personal trust in other certificate signers
Explain how one might establish trust in a self-signed certificate
Checklist for Key Handling
Memorization trade-offs
Explain Separation of Duty
Dividing up a task so that it requires two or more people to do it. Reduces risks because a malicious worker will need the others to cooperate
Explain the two public-key cryptography
(Techniques to share secret uinformation without sharing a secret ahead of time)
Techniques are named for their inventors:
Difference of public and private keys
Public/private key belongs to a single entity
- Public keys can be shared with attackers
- Private keys are kept secret by the owner
RSA is the product of mathematical tricks, so, of course, mathematical tricks can bring it down. In other words, RSA is vulnerable to mathematical attack if we use it in certain unfortunate ways: (RSA ATTACKS)