ChatGPT Chapter 2 - Cryptography Flashcards

1
Q

What is cryptography used for?

A

Ensures
1. Confidentiality: only authorized people can read information
2. Authentication: Verifies sender’s identity
3. Integrity: Protect data from unauthorized modification
4. Anonymity: Hides user identities during communication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two basic operations in cryptography?

A
  1. Encryption: Convert plaintext into ciphertext
  2. Decryption: Convert ciphertext back to plaintext
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is cipher?

A

Algorithm used to encrypt and decrypt data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a key in cryptography?

A

A piece of information that works with the cipher to encrypt and decrypt messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the Caesar Cipher?

A

Substitution cipher where each letter is shifted by a fixed number of positions

Ex: A becomes D (shift of 3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How can the Caesar Cipher be attacked?

A
  1. Brute Force: Trying all possible keys
  2. Cryptoanalysis: Using letter frequency analysis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is symmetric key encryption?

A

Encryption where the same key is used for both encrypting and decrypting data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the key distribution problem?

A

If both sender and reciever use the same key then how do you share the key without someone intercepting it?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the requirements for secure symmetric encryption?

A
  1. A strong encryption algorithm
  2. Secure key exchange and storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are common attacks on symmetric encryption?

A

Brute Force and Cryptoanalysis (exploit algorithm weaknesses)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Examples of symmetric encryption algorithms

A
  1. DES: Weak and outdated (56-bit key)
  2. 3DES: Encrypt 3 times with DES (stronger but slower)
  3. AES: Fast and secure (128, 192 or 256 bit keys)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between block and stream ciphers?

A

Block: Encrypt data in fixed-size blocks (AES)
Stream: Encrypt byte by byte, faster and lightweight

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Message Authentication Code (MAC)?

A

Short piece of data that verifies the authenticity (who) and integrity (unchanged) of a message

Uses a key and a MAC algorithm

Don’t confuse with MAC address used to locate device on network

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

HMAC

A

Hash-based Message Authentication Code, verify that a message hasn’t been tampered with, if the hash value of the received message matches the expected value, it is intact

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Example of MAC use

A

When you make a payment online, the bank can use HMAC to verify that the payment details weren’t altered during transmission.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why are hash values efficient?

A

Instead of comparing large amounts of data for verification, systems compare smaller hash values

17
Q

What are the 6 properties of secure hash functions?

A
  1. Any size input
  2. Fixed-size output
  3. Easy to compute
  4. One-way (preimage resistant) Starting with hash, can’t find it’s input
  5. Second preimage resistant Starting with known input and hash, can’t find another input with the same hash
  6. Collision resistant can’t find two inputs with same hash

second preimage like collision with headstart-at u least know one input

18
Q

What is public-key encryption?

A

Encryption method using two keys:
1. Public Key: Available to everyone
2. Private Key: Kept secret
Encryption with one key can only be decrypted with the other

19
Q

Why is public-key available to everyone?

A

So anyone can send an encrypted message for the key owner. (secure communication for parties who have never met)

Let others know how to encrypt a message for YOU specifically… the public key is the customization of an already used algorithm (RSA, ECC)

I understand this, but why is it the KEY that is public and not the algorithm or the cipher? — **Answer: ** The cipher is the algorithm, and the key is the specific variable used to customize it. (Should be random). We can know how a combination lock works, but we will keep the numbers secret. We can understand the concept of shifting letters, but not tell how many to shift by. It allows the public to determine how robust the algorithm is and think hmmm maybe I won’t use this… Also why WINDOWS SUCKS they keep shit private we don’t know if it’s good!!!

20
Q

What are digital signatures used for?

A

To authenticate the sender and ensure data integrity

21
Q

What is a public-key certificate?

A

Verifies ownership of public key, issued by a trusted Certificate Authority (CA).

22
Q

What is a digital envelope?

A

A hybrid method combining symmetric encryption for data and public-key encryption for the symmetric key

23
Q

Why are random numbers important in cryptography?

A

Used for generating keys, session keys, and preventing replay attacks.

24
Q

Replay Attack

A

Attacker intercepts a legitimate message and resends it to trick the recipient into believing it’s valid.

25
Q

What is the difference between true random and pseudo-random numbers?

A

True Random: Generated from unpredictable natural processes
Pseudo-random: Deterministic but passes statistical randomness tests