Hashing and Encryption Flashcards

1
Q

What is the purpose of a cryptographic hash function?

A

To take an input and produce a fixed-size string of bytes, typically a digest, that is unique to that input.

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

Fill in the blank: The output of a hash function is called a ______.

A

Digest or Hash.

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

What does SHA stand for in SHA-256?

A

Secure Hash Algorithm.

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

What is the key difference between symmetric and asymmetric encryption?

A

Symmetric encryption uses one key for both encryption and decryption, while asymmetric encryption uses a public and a private key.

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

Fill in the blank: RSA is an example of ______ encryption.

A

Asymmetric.

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

What is the length of the output of the SHA-256 hash function?

A

256 bits.

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

Name an encryption algorithm commonly used for symmetric encryption.

A

AES (Advanced Encryption Standard).

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

What does MD5 stand for in hashing algorithms?

A

Message Digest Algorithm 5.

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

True or False: MD5 is still considered secure for cryptographic use cases.

A

False. MD5 is considered broken and insecure for cryptographic use.

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

What is the primary purpose of the RSA algorithm?

A

To securely transmit data using public-key cryptography.

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

Fill in the blank: AES stands for ______.

A

Advanced Encryption Standard.

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

Which cryptographic hash function is commonly used in Bitcoin?

A

SHA-256.

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

What is the key size for AES-256 encryption?

A

256 bits.

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

True or False: Hash functions are reversible.

A

False. Hash functions are one-way and non-reversible.

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

Fill in the blank: In asymmetric encryption, the public key is used for ______, and the private key is used for ______.

A

encryption, decryption.

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

What is the primary function of a digital signature?

A

To verify the authenticity and integrity of a message or document.

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

Name an example of a hashing algorithm other than SHA-256.

A

MD5, SHA-1, or SHA-3.

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

Which algorithm is faster for encrypting large amounts of data, RSA or AES?

A

AES. RSA is slower and typically used for key exchange, not bulk data encryption.

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

True or False: In symmetric encryption, both parties use the same key.

A

True.

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

Fill in the blank: The process of converting plaintext into ciphertext is known as ______.

A

Encryption.

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

What is the primary weakness of the DES (Data Encryption Standard) algorithm?

A

Its key size is too small, making it vulnerable to brute-force attacks.

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

What is the difference between SHA-1 and SHA-256?

A

SHA-256 provides a longer output (256 bits) compared to SHA-1 (160 bits) and is more secure.

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

Name a common use case for hashing algorithms.

A

Data integrity checks, digital signatures, or password hashing.

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

Fill in the blank: The ______ algorithm is a standard for secure key exchange in public key cryptography.

A

Diffie-Hellman.

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

What is the size of an MD5 hash output?

A

128 bits.

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

Why is AES considered more secure than DES?

A

AES uses larger key sizes (128, 192, or 256 bits) compared to DES’s 56-bit key, making it more resistant to brute-force attacks.

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

What does the acronym ‘PGP’ stand for in encryption?

A

Pretty Good Privacy.

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

True or False: Cryptographic hashes are collision-resistant.

A

True, for strong cryptographic hash functions, but collisions are possible if vulnerabilities exist.

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

Fill in the blank: A ______ occurs when two different inputs produce the same hash value.

A

Collision.

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

What is the key length of RSA commonly used in modern encryption?

A

2048 bits or 4096 bits.

31
Q

What is a salt in password hashing?

A

A random value added to a password before hashing to prevent precomputed attacks like rainbow table attacks.

32
Q

Name an encryption algorithm that is no longer considered secure.

A

DES (Data Encryption Standard) or 3DES.

33
Q

What type of encryption is used in modern Wi-Fi networks?

A

WPA2 or WPA3, which use AES encryption.

34
Q

Fill in the blank: In encryption, ______ refers to the transformation of ciphertext back into plaintext.

A

Decryption.

35
Q

What is a brute-force attack in cryptography?

A

An attack that involves trying every possible key until the correct one is found.

36
Q

True or False: AES encryption is used in both hardware and software applications.

A

True.

37
Q

Fill in the blank: ______ encryption allows both parties to communicate securely using a shared key, while ______ encryption uses a key pair.

A

Symmetric, Asymmetric.

38
Q

What is the primary role of the Diffie-Hellman algorithm?

A

To securely exchange cryptographic keys over an insecure channel.

39
Q

Which algorithm is used to generate Bitcoin addresses?

A

SHA-256 and RIPEMD-160.

40
Q

True or False: SHA-1 is still recommended for secure applications.

A

False. SHA-1 is considered weak due to vulnerabilities.

41
Q

Fill in the blank: RSA relies on the mathematical difficulty of factoring large ______.

A

Prime numbers.

42
Q

What is a common weakness in older encryption algorithms like RC4?

A

They are vulnerable to various types of cryptographic attacks, including biases in their output.

43
Q

Which block cipher mode of operation is commonly used with AES?

A

CBC (Cipher Block Chaining) or GCM (Galois/Counter Mode).

44
Q

Fill in the blank: ______ refers to the process of encoding information to protect its confidentiality.

A

Encryption.

45
Q

Fill in the blank: The process of ensuring that data has not been altered during transmission is called ______.

A

Integrity.

46
Q

What type of attack aims to produce the same hash value from two different inputs?

A

Collision attack.

47
Q

Fill in the blank: The ______ property ensures that a small change in input produces a significantly different hash.

A

Avalanche effect.

48
Q

Which encryption algorithm is known for its speed in software implementations?

A

RC4 (though it is now considered insecure).

49
Q

What is the main advantage of elliptic curve cryptography (ECC) over RSA?

A

ECC provides the same level of security as RSA but with smaller key sizes, making it more efficient.

50
Q

True or False: A longer key size always means better security in encryption.

A

True, but it also depends on the algorithm’s structure and use.

51
Q

What is the output size of SHA-512?

A

512 bits.

52
Q

What is a digital certificate?

A

A digital document used to prove the ownership of a public key.

53
Q

Fill in the blank: A ______ attack involves the attacker attempting to decrypt a message by trying various keys systematically.

A

Brute-force attack.

54
Q

Which mode of AES is widely used for authenticated encryption?

A

GCM (Galois/Counter Mode).

55
Q

True or False: RSA encryption is often used for encrypting large data directly.

A

False. RSA is typically used to encrypt small pieces of data, such as symmetric keys.

56
Q

What are the key sizes supported by AES?

A

128, 192, and 256 bits.

57
Q

Fill in the blank: The ______ algorithm is used in TLS to negotiate secure communication keys.

A

Elliptic Curve Diffie-Hellman (ECDH).

58
Q

What is the purpose of padding in block ciphers like AES?

A

To make the plaintext a multiple of the block size.

59
Q

True or False: A hash function can be used for encryption.

A

False. A hash function is used for integrity, not for encrypting data.

60
Q

Fill in the blank: In cryptography, ______ refers to the unauthorized interception of data in transit.

A

Eavesdropping.

61
Q

Which hash function is recommended for password hashing?

A

bcrypt, scrypt, or Argon2.

62
Q

True or False: DES encryption uses 64-bit blocks and a 56-bit key.

A

True.

63
Q

Fill in the blank: In symmetric encryption, the ______ key is shared between the sender and the receiver.

A

Secret or shared.

64
Q

What is a side-channel attack?

A

An attack that exploits physical information (e.g., timing, power consumption) to break encryption.

65
Q

What does the term ‘forward secrecy’ mean?

A

It ensures that even if a private key is compromised, past communication remains secure.

66
Q

Fill in the blank: The ______ is the random value combined with plaintext to ensure that identical plaintexts produce different ciphertexts.

A

Initialization vector (IV).

67
Q

What is the purpose of public-key infrastructure (PKI)?

A

To manage and distribute digital certificates and public keys.

68
Q

Which encryption algorithm replaced DES due to its vulnerabilities?

A

AES (Advanced Encryption Standard).

69
Q

True or False: CBC mode encryption requires an initialization vector (IV) to start.

A

True.

70
Q

Fill in the blank: A ______ is an arbitrary number used only once in cryptographic communication.

A

Nonce.

71
Q

What is the primary vulnerability of the SHA-1 algorithm?

A

It is vulnerable to collision attacks.

72
Q

What is a hybrid encryption system?

A

A system that combines both symmetric and asymmetric encryption.

73
Q

Fill in the blank: ______ algorithms, like RSA, use two keys for encryption and decryption.

A

Asymmetric.

74
Q

What is the role of the HMAC (Hash-Based Message Authentication Code)?

A

To verify both the data integrity and the authenticity of a message.