Cryptography Lab Flashcards

1
Q

What is the primary use of OpenSSL?

A. To manage public-key infrastructures.
B. To implement cryptographic functions.
C. To compress encrypted files.
D. To store cryptographic keys securely.

A

B

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

Which command generates a private key using OpenSSL?

A. openssl genrsa
B. openssl enc
C. openssl sign
D. openssl x509

A

A

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

Which library is a fork of OpenSSL?

A. BoringSSL
B. GnuPG
C. LibreSSL
D. Crypto++

A

C

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

What is the main characteristic of symmetric cryptography?

A. It uses a public and private key pair.
B. It uses the same key for encryption and decryption.
C. It only works on plaintext.
D. It requires a Certificate Authority (CA).

A

B

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

Which command encrypts a file using AES in OpenSSL?

A. openssl genrsa
B. openssl dgst
C. openssl enc
D. openssl hash

A

C

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

Which of the following is a symmetric encryption algorithm?

A. RSA
B. AES
C. ECC
D. Diffie-Hellman

A

B

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

What is a key feature of asymmetric cryptography?

A. Uses the same key for encryption and decryption.
B. Requires no keys for encryption.
C. Uses a public and private key pair.
D. Encrypts only small amounts of data.

A

C

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

Which algorithm is commonly used in asymmetric cryptography?

A. AES
B. RSA
C. DES
D. MD5

A

B

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

What does the openssl rsautl command do?

A. Generates RSA keys.
B. Signs a message using RSA.
C. Encrypts or decrypts data using RSA.
D. Creates a self-signed certificate.

A

C

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

What is the primary purpose of a hash function?

A. To compress data.
B. To verify data integrity.
C. To encrypt data.
D. To generate keys.

A

B

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

Which of these is a common cryptographic hash algorithm?

A. RSA
B. AES
C. SHA-256
D. Diffie-Hellman

A

C

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

What does the openssl dgst command do?

A. Encrypts a file.
B. Generates a hash.
C. Creates a private key.
D. Validates a digital certificate.

A

B

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

What is the primary advantage of ECC over RSA?

A. Faster encryption.
B. Requires shorter keys for equivalent security.
C. Uses symmetric encryption.
D. Supports larger ciphertexts.

A

B

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

What type of cryptography is ECC classified as?

A. Symmetric
B. Asymmetric
C. Hash-based
D. Quantum-resistant

A

B

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

Which command is used to generate an ECC key pair in OpenSSL?

A. openssl genrsa
B. openssl ecparam
C. openssl enc
D. openssl sign

A

B

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

What is the primary purpose of Diffie-Hellman?

A. Encrypting data.
B. Hashing data.
C. Secure key exchange.
D. Creating digital signatures.

A

C

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

What mathematical problem underpins Diffie-Hellman?

A. Factoring large primes.
B. Solving discrete logarithms.
C. Modular addition.
D. Matrix multiplication.

A

B

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

Which OpenSSL command generates Diffie-Hellman parameters?

A. openssl genrsa
B. openssl dhparam
C. openssl enc
D. openssl x509

A

B

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

What is a primary purpose of a digital signature?

A. Compressing data.
B. Ensuring data integrity and authenticity.
C. Encrypting data.
D. Performing key exchanges.

A

B

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

Which algorithm is commonly used for creating digital signatures?

A. SHA-256
B. AES
C. RSA
D. MD5

A

C

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

What does the openssl dgst -sign command do?

A. Verifies a digital signature.
B. Signs data using a private key.
C. Encrypts data.
D. Generates a key pair.

22
Q

What is the primary role of a digital certificate?

A. To encrypt files.
B. To verify the identity of a public key holder.
C. To hash data for verification.
D. To generate symmetric keys.

23
Q

What is a Certificate Authority (CA)?

A. An organization that issues digital certificates.
B. A tool for encrypting data.
C. A private key generator.
D. A type of digital signature.

24
Q

Which command creates a self-signed certificate in OpenSSL?

A. openssl enc
B. openssl req -x509
C. openssl dhparam
D. openssl rsautl

25
What is the primary use of S/MIME? A. Encrypting files on disk. B. Securing email communication. C. Generating private keys. D. Signing digital certificates.
B
26
What type of cryptography does S/MIME primarily use? A. Symmetric encryption. B. Asymmetric encryption. C. Hashing algorithms. D. Steganography.
B
27
Which command encrypts an email using OpenSSL? A. openssl enc B. openssl smime C. openssl sign D. openssl dhparam
B
28
What is the primary function of SSL/TLS? A. Encrypting network communication. B. Hashing passwords for storage. C. Generating symmetric keys. D. Compressing large files.
A
29
Which protocol replaced SSL? A. TLS B. IPSec C. HTTPS D. S/MIME
A
30
What is the purpose of a cipher suite in TLS? A. To generate keys for encryption. B. To define encryption and authentication algorithms. C. To verify digital certificates. D. To hash passwords for authentication.
B
31
What does OCSP stand for? A. Online Certificate Signing Protocol. B. Online Certificate Status Protocol. C. OpenSSL Certificate Signing Protocol. D. Open Certificate Secure Protocol.
B
32
What is the primary function of OCSP? A. To validate digital signatures. B. To check the revocation status of a certificate. C. To generate private keys. D. To compress certificate data.
B
33
Which command checks certificate status using OCSP in OpenSSL? A. openssl req B. openssl ocsp C. openssl x509 D. openssl dgst
B
34
What is a key feature of ECC compared to RSA? A. It requires a Certificate Authority (CA). B. It is faster but less secure than RSA. C. It provides equivalent security with shorter keys. D. It is only used for hashing.
C
35
Which mathematical concept is foundational to ECC? A. Prime factorization. B. Elliptic curves over finite fields. C. Discrete Fourier Transform. D. Modular exponentiation.
B
36
What does S/MIME provide for email communication? A. Encryption and digital signing. B. Data compression and decryption. C. Key generation and certificate revocation. D. Symmetric key exchange.
A
37
Which file format is commonly used for S/MIME certificates? A. PEM B. DER C. PKCS#12 D. All of the above
D
38
What is the purpose of a TLS handshake? A. To encrypt data before transmission. B. To establish a secure connection and exchange keys. C. To hash passwords for storage. D. To validate the client’s IP address.
B
39
Which command generates a certificate signing request (CSR) in OpenSSL? A. openssl enc B. openssl req -new C. openssl x509 D. openssl genrsa
B
40
What is the OpenSSL command to display the details of a certificate? A. openssl req -new B. openssl enc -decrypt C. openssl x509 -in certificate.pem -text D. openssl verify
C
41
Which command encrypts a file with AES-256-CBC in OpenSSL? A. openssl genrsa -aes256 B. openssl enc -aes-256-cbc -in file.txt -out file.enc C. openssl dhparam -aes256 D. openssl x509 -aes256
B
42
How do you decrypt a file encrypted with AES in OpenSSL? A. openssl aes -decrypt -in file.enc -out file.txt B. openssl enc -d -aes-256-cbc -in file.enc -out file.txt C. openssl enc -decrypt -in file.enc -out file.txt D. openssl aes -d -in file.enc -out file.txt
B
43
What is the OpenSSL command to generate an RSA key pair? A. openssl req -x509 B. openssl enc -rsa C. openssl genrsa -out private.key 2048 D. openssl rsa -generate
C
44
Which command extracts the public key from an RSA private key? A. openssl rsa -in private.key -pubout -out public.key B. openssl genrsa -pubkey -out public.key C. openssl x509 -pubout -key private.key D. openssl enc -pubkey -out public.key
A
45
How do you use OpenSSL to encrypt data with an RSA public key? A. openssl rsa -encrypt -in file.txt -out file.enc B. openssl rsautl -encrypt -inkey public.key -pubin -in file.txt -out file.enc C. openssl enc -rsa -in file.txt -out file.enc D. openssl genrsa -encrypt -out file.enc
B
46
What is the OpenSSL command to decrypt data encrypted with RSA? A. openssl rsa -decrypt -in file.enc -out file.txt B. openssl genrsa -decrypt -in file.enc -out file.txt C. openssl rsautl -decrypt -inkey private.key -in file.enc -out file.txt D. openssl enc -decrypt -rsa -in file.enc -out file.txt
C
47
Which OpenSSL command generates a SHA-256 hash of a file? A. openssl dgst -sha256 file.txt B. openssl enc -sha256 file.txt C. openssl genhash -sha256 file.txt D. openssl x509 -hash -sha256 file.txt
A
48
How do you verify the integrity of a file using its hash in OpenSSL? A. openssl verify -sha256 file.txt B. openssl dgst -sha256 -verify signature.sig -signature hash file.txt C. openssl enc -verify -hash file.txt D. openssl hash -verify -sha256 file.txt
B
49
Which command creates a digital signature for a file using OpenSSL? A. openssl rsa -sign -in file.txt -out signature.sig B. openssl dgst -sha256 -sign private.key -out signature.sig file.txt C. openssl enc -sign -key private.key -out signature.sig file.txt D. openssl sign -key private.key -in file.txt -out signature.sig
B
50
How do you verify a digital signature with OpenSSL? A. openssl verify -signature signature.sig -pubin public.key -in file.txt B. openssl rsa -verify -in file.txt -signature signature.sig -pubkey public.key C. openssl dgst -sha256 -verify public.key -signature signature.sig file.txt D. openssl enc -verify -sha256 -key public.key -signature signature.sig -in file.txt
C