Encryption Flashcards

1
Q

Does TLS use symmetric or asymmetric encryption?

A

Both. Have them talk through how each are used. The key (sorry) is that they understand the initial exchange is done using asymmetric and that bulk data encryption requires speed and therefore symmetric algorithms.

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

What’s the difference between symmetric and

public-key cryptography?

A

Standard stuff here: make sure they know that symmetric uses a single key while public-key uses two.

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

In public-key cryptography you have a public and a private key,
and you often perform both encryption and signing functions.
Which key is used for which function?

A

You encrypt with the other person’s public key, and you sign with your own private. If they confuse the two, don’t put them in charge of your PKI project.

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

Describe the process of a TLS session being set up

when someone visits a secure website.

A

Look for the standard responses, with the client sending helo with ciphers, server responding with a public key and picking a cipher, agreement on a shared key, etc. But then dive deeper into the questions below.

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

If someone steals the server’s private key can they

decrypt all previous content sent to that server?

A

We’re looking for conversations about Perfect Secrecy here, threats to encrypted data, etc.

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

What are some common ways that TLS is attacked,

and/or what are some ways it’s been attacked in the past?

A

Look for a conversation about weak ciphers, vulnerabilities like Heartbleed, BEAST, etc. It’s not necessarily crucial that they remember every themed vulnerability and the exact specifics, but they should know what the issue was, why it was a problem, and what the fix was.

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

Cryptographically speaking, what is the main

method of building a shared secret over a public medium?

A

Diffie-Hellman. And if they get that right you can follow-up with the next one.

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

What’s the difference between Diffie-Hellman and RSA?

A

Diffie-Hellman is a key-exchange protocol, and RSA is an encryption/signing protocol. If they get that far, make sure they can elaborate on the actual difference, which is that one requires you to have key material beforehand (RSA), while the other does not (DH). Blank stares are undesirable.

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

What kind of attack is a standard Diffie-Hellman exchange vulnerable to?

A

Man-in-the-middle, as neither side is authenticated.

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

What is Forward Secrecy?

A

Forward Secrecy is a system that uses ephemeral session keys to do the actual encryption of TLS data so that even if the server’s private key were to be compromised, an attacker could not use it to decrypt captured data that had been sent to that server in the past.

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

What’s the difference between encoding, encryption, and hashing?

A

Encoding is designed to protect the integrity of data as it crosses networks and systems, i.e. to keep its original message upon arriving, and it isn’t primarily a security function. It is easily reversible because the system for encoding is almost necessarily and by definition in wide use. Encryption is designed purely for confidentiality and is reversible only if you have the appropriate key/keys. With hashing the operation is one-way (non-reversible), and the output is of a fixed length that is usually much smaller than the input.

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

What is an IV used for in encryption?

A

An IV is used to initiate encryption by providing an addition (third) input in addition to the cleartext and the key. In general you want IVs that are random and unpredictable, which are used only once for each message. The goal is to ensure that two messages encrypted with the same key do not result in the same ciphertext.

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

What is an IV used for in encryption?

A

An IV is used to initiate encryption by providing an addition (third) input in addition to the cleartext and the key. In general you want IVs that are random and unpredictable, which are used only once for each message. The goal is to ensure that two messages encrypted with the same key do not result in the same ciphertext.

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

What are block and stream ciphers?

What are the differences, and when would you use one vs. the other?

A

Block-based encryption algorithms work on a block of cleartext at a time, and are best used for situations where you know how large the message will be, e.g., for a file. Stream ciphers work on single units of cleartext, such as a bit or a byte, and they’re best used when you’re not sure how long the message will be.

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

What are some examples of symmetric encryption algorithms?

A

DES, RCx, Blowfish, Rijndael (AES)

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

What are some examples of asymmetric encryption algorithms?

A

Diffie Hellman, RSA, EC, El Gamal, DSAC

17
Q

What are some common block cipher modes?

A

ECB and CBC.

18
Q

What’s the main difference in security between ECB

and CBC?

A

ECB just does a one-to-one lookup for encryption, without using an IV, which makes it fairly easy to attack using a chosen-plaintext attack. CBC uses an IV for the first block and then propagates the XOR of the previous block onto subsequent ones. The difference in results can be remarkable.

19
Q

What’s more secure, SSL, TLS, or HTTPS?

A

Trick question here. And the goal is not to be cute. If you can’t wait to smash someone with this then you should not be interviewing people. It’s to identify people who’ve not been in the industry for any measure of time.

Look for a smile like they caught you in the cookie jar. If they’re confused, then this role should be for an extremely junior position.

20
Q

ENSI

A

Encrypted server name indication (ESNI) is an essential feature for keeping user browsing data private. It ensures that snooping third parties cannot spy on the TLS handshake process to determine which websites users are visiting. ESNI, as the name implies, accomplishes this by encrypting the server name indication (SNI) part of the TLS handshake.

SNI tells a web server which TLS certificate to show at the start of a connection between the client and server. SNI is an addition to the TLS protocol that enables a server to host multiple TLS certificates at the same IP address.

Think of SNI as being like the apartment number on a mailing address: multiple apartments are in one building, so each apartment needs a different number to distinguish it. Similarly, while the server is indicated by the IP address, a client device needs to include SNI in its first message to the server to indicate which website (which apartment) it is trying to reach.