4472 - Security Final Flashcards

1
Q

What is Kerkhoffs Principle?

A

security should be based off secrecy of the key, not the encryption scheme; assume that the encryption scheme is publicly known

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

What is the ‘don’t roll your own’ principle?

A

crypto algorithms are very easy to get wrong, don’t make any yourself

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

What is a brute force attack?

A

trying every key and/or message until one “works”

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

A system that can be broken into 2^128 operations has how many bits of security?

A

128

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

What are bits of security?

A

exponential value describing how many operations are necessary to recover a message or key for a cryptosystem

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

What defines a negligible quantity?

A

value that is less than on over any polynomial function with degree less than or equal to the security parameter

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

What is a security parameter?

A

a variable that measures the input size of the computational problem

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

What is the security parameter (k) in an RSA cryptosystem?

A

it is the length in bits of the modulus n, where n is a number in the set 0….(2^k) - 1

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

What criteria must be met for indistinguishability?

A

probability that you can tell the difference between two things is less than the negligible quantity

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

What are pseudo random functions?

A

random mapping of inputs to outputs, many to one mapping may exists, not necessarily inversible

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

What are pseudo random permutations?

A

random mapping of inputs to outputs, one to one mapping, image and pre-image sets are equivalent, unique inverse for every element

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

What is an “oracle”?

A

like a black box, ask a question get an answer

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

What is the hierarchy of security levels?

A

IND-CCA2 –> IND-CCA1 –> IND-CPA –> IND-EAV

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

How is IND-CCA2 achieved?

A

message authentication codes; you need to be able to only create a valid ciphertext with knowledge of a secret key

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

How is IND-CPA achieved?

A

by using randomized encryption; encrypting the same message twice should give two completely different results

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

How is IND-EAV achieved?

A

you should have negligible advantage telling the difference between cipher text

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

What are block ciphers used for?

A

for efficient bulk encryption of data

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

What is the ideal functionality for block ciphers?

A

pseudo-random permutation, secret key determines permutation, fixed length input maps to fixed length outputs

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

What security level is the ECB cipher?

A

Not even EAV-Secure

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

What does CBC mode require?

A

an initialization vector (IV)

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

What does CTR mode require?

A

an initialization vector (IV)

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

What is the benefit of CTR mode over CBC mode?

A

random access, no decryption function needed

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

What must an IV be to avoid encryption oracle attacks?

A

unpredictable to adversary (secret)

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

What is the block size for AES?

A

128

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

What are the bit key options for AES?

A

128, 192, 256

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

What are hashes used for typically?

A

checking file integrity, storing passwords, making certain operations more efficient

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

What is pre-image resistance?

A

given a hash y, it should be difficult to find an x such that h(x) = y

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

What is second pre-image resistance?

A

given a pre-image x, it should be difficult to find a second pre-image y such that h(x) = h(y)

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

What is collision resistance?

A

it should be hard to find any pair such that h(x) = h(y)

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

MD5 has how many images?

A

128

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

Sha-1 has how many images?

A

160

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

Sha-256 as how many images?

A

260

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

Is MD5 collision resistant?

A

no

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

Is Sha-1 collision resistant?

A

yes, up to 2^80

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

Is Sha-256 collision resistant?

A

yes, 128 bits of collision resistance

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

What are MAC’s for?

A

verifying the integrity of a message by associating a fixed length value (tag) to it

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

What is a MAC tag derived from?

A

a secret key and a message

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

What is the ideal functionality of a MAC?

A

like a keyed hash, variable length input maps to fixed length output

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

What is authenticated encryption?

A

a means of securely packaging a cipher with a mac under one common interface, prevents a plaintext from being returned without a valid mac. Uses the encrypt then mac strategy

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

Encryption, MAC Keys and IV must be what for athenticated encyption to work?

A

independently generated

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

What distinguishes asymmetric key primitives?

A

the existence of both a key for performing public operations and a key for performing private operations

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

what is the discrete logarithmic problem?

A

given a=g^xmodp find x

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

what makes the discrete logarithmic problem hard? under what circumstances?

A

if g generates a cyclic group of large, prime order ‘q’

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

what are the keys in DHE?

A

private key: randomly generated number between 1

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

What is the Diffie Helman problem?

A

given g, g^a and g^b, compute g^ab

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

why do we hash messages before signing them?

A

because RSA can’t handle operations longer than the modulus size, so for a 2048 bit RSA you can’t sign any messages longer than 256 bits - which is why we use a hashing algorithm like sha-256, since it will always have a 256 bit output (fixed length outputs of hash are crucial to RSA)

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

what is different about ephemeral DH vs regular DH?

A

private keys are newly generated for each connection

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

If EVE sends her public key to ALICE and ALICE accepts it as BOB’s key will EVE be able to sign any message? what protects against this?

A

Yes she will, certificates or some higher level protocol security

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

Explain RSA encryption

A

I give an open padlock to everyone to which only I know the combination. They write a message in a box and lock it using the padlock. Anyone can create the locked box but only I can unlock it and read the message

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

What is the basis for the “hardness” of RSA

A

factoring the two large prime numbers; given n=pq find p and q (which are both large prime numbers)

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

why is RSA not IND-CCA2?

A

because it is multiplicatively homomorphic; meaning that the product of two cipher texts is equivalent to the encryption of the product of corresponding plaintexts

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

How can you make RSA IND-CCA secure?

A

by padding it with a scheme like OAEP

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

what are digital signatures for?

A

linking an identity to a message

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

the private key for digital signatures is used for verifying (T/F)

A

F; it is used for signing - only the key holder should be able to sign messages associated with their key pair

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

the public key for digital signatures is used for verifying (T/F)

A

T; anyone should be able to verify that the a signature relates to a relative party’s verification key

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

what margin does NIST suggest for efficient modulo bias solver

A

64 bits of margin for generating 256 bit numbers

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

what does verification accept? what does it output

A

a message, verification key and signature; outputs success if signature is valid output fail if otherwise

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

what is a universal forgery?

A

an attacker can create a valid signature on any type of message

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

what is a selective forgery?

A

an attacker can create a valid signature on some message that was chosen ahead of time

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

what is an existential forgery?

A

an attacker can create a valid signature on some messages but doesn’t necessarily have control over what the message is, and it may not make sense

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

signatures are usually performed on what? why?

A

the hash of the message; for efficiency reasons

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

how does padded RSA solve the problem of existential forgery in unpadded RSA?

A

it makes the signature “non malleable” meaning that linear operations on ciphertext does not result in linear operations on plaintext

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

cryptograms can replace what with ECC?

A

their basis; if they are based on the hardness of solving discrete logarithmic functions they can replace that with ECC

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

what are the two flavours of ECC and what are their advantages?

A

EC over GF(2^m); fast in hardware

EC over GF(p); fast in software

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

What are the pros of ECC?

A
  • point multiplication is faster than analog modular exponentiation
  • public keys are smaller than their integer counterparts
66
Q

What are the cons of ECC?

A
  • harder/more complex to implement and understand

- some concerns over backdoors in some common curve parameters

67
Q

what is NIST?

A

a standard for information system security

68
Q

what does NIST require as a minimum security level in terms of bits?

A

112

69
Q

based on NIST what must symmetric keys (block cipher/MAC) be greater than or equal to?

A

112

70
Q

for hash function based on NIST what needs to be true in order for their to be pre-image and second pre-image resistance? what about collision resistance?

A

output length >=112 (image)

output length >=224 (collision)

71
Q

for DHE and DSA based on NIST what must the prime modulus and group order be?

A

p >= 2048

q >= 224

72
Q

for ECDHE and ECDSA based on NIST what must the prime modulus and group order be?

A

p >= 224

q >= 224

73
Q

for RSA encyption based on NIST what must be true?

A

n>=2048

p,q >= 1024

74
Q

what is the rate for AES/SHA hashes on a CPU?

A

2^30 per second

75
Q

how long does it take to find an MD5 hash collision on a modern computer?

A

about 5 minutes shit is broke af

76
Q

what is a certificate?

A

a document used to authenticate a signature verification key

77
Q

what does a certificate prevent?

A

man in the middle attacks

78
Q

what is a certificate revocation list

A

a signed list of certificates held by a certificate authority that have been revoked prior to some expiration date

79
Q

What are some common reasons for a certificate to be on a certificate revocation list?

A

part of it is being updated, an entity has shut down, servers private key is comprimised

80
Q

what does the TLS cipher suite specify?

A

KSCH

  • key exchange algorith
  • signature algorith
  • cipher and mode of operation
  • hashing function
81
Q

what is entropy relating to passwords?

A

how many bits of information does it take to encode a password - considers not just how many possibilities there are but the probability of each password occuring

82
Q

High entropy passwords are what?

A

harder to guess

83
Q

how to web servers store passwords to prevent passwords getting exposed if database is illegally accessed?

A

hashing

84
Q

what are the pros and cons of password hashing?

A

pros; attackers can’t guess passwords outright they need to guess, hash it, then check it
con; the same password maps to the same hash, so if one password is guess everyone with that same hash is exposed, attackers can prebuild large dictionaries or rainbow tables

85
Q

what is a “salt”?

A

a random value that is hashed along with the password to ensure that every hash is unique

86
Q

what is key stretching and what does it attempt to solve?

A

purposely slowing down hash functions so they take longer to compute; salted and hashed passwords are still vulnerable to guessing so by making each guess take longer you are directly impacting the efficiency of an attack

87
Q

what makes keys “assymetric”?

A

the “do” key is different from the “undo” key

88
Q

what is a key pair?

A

a public key and corresponding private key

89
Q

what is the diffie helman tuple?

A
90
Q

how can you prove the security of DDH (decisional diffie helman)?

A

based on DLP being hard

91
Q

what is the difference between CDH and DDH?

A

CDH asks us to derive the shared secret of a diffie helman whereas DDH just asks us to recognize it

92
Q

why do we hash messages before signing them?

A

because RSA can’t handle operations longer than the modulus size, so for a 2048 bit RSA you can’t sign any messages longer than 256 bits - which is why we use a hashing algorithm like sha-256, since it will always have a 256 bit output

93
Q

why can’t an attacker control the message in an RSA forgery attack?

A

because if he could, which mean given (m^e)modn find m, then he has solved the RSA problem

94
Q

If EVE sends her public key to ALICE and ALICE accepts it as BOB’s key will EVE be able to sign any message? what protects against this?

A

Yes she will, certificates or some higher level protocol security

95
Q

RSA is faster at a creating a signature than DSA (T/F)

A

F; DSA is faster when creating signatures

96
Q

RSA is faster at validating a signature than DSA (T/F)

A

T; RSA is faster at validating a signature

97
Q

DSA is faster at encrypting than RSA (T/F)

A

F; RSA encrypts faster

98
Q

DSA is faster at decrypting that RSA (T/F)

A

T; DSA decrypts faster

99
Q

what is the minimum bits of security allowed for key agreements according to NIST?

A

112 bits of security

100
Q

what are the only approved symmetric encryption algorithms?

A

three key triple DES and AES

101
Q

is sha-1 secure?

A

no due to length extension attacks

102
Q

what is a 1024 bit RSA key equivalent to in symmetric key strength?

A

80 bits

103
Q

what is the minimum security for RSA keys?

A

2048, equivalent to 112 bits in symmetric keys

104
Q

DHE key strength matches RSA key strength (T/F)

A

T; a 2048 RSA key is about as strong as a 2048bit DHE key

105
Q

ECC keys can be secure at shorter lengths than other assymetric key schemes (T/F)

A

True; can be twice the length of symmetric keys and be just as secure

106
Q

what is the minimum security for ECC schemes?

A

224 bits

107
Q

what is the key distribution problem?

A

there are two parts;

  1. sender or recipient must create a key and send it to the other party, while in transit it can be stolen or copied by a third party
  2. large numbers of key pairs are difficult to manage
108
Q

how many key pairs in traditional symmetric encryption would be needed for 10 parties to communicate?

A

n(n-1)/2

10(10-1)/2 = 45

109
Q

what is the “web of trust”

A

a decentralized trust model that is used to establish authenticity between a public key and its owner

110
Q

what is a digital certificate, what does it say, how does it prove it is what it says it is?

A

a claim made by a certificate authority that says what the server’s public key is, that is signed by the signing key of the certificate authority

111
Q

what are the types of validation for a certificate authority to issue a certificate

A

domain validation; prove you have a domain name
organization validation; prove you are company X
extended validation; pay more money get more validation

112
Q

what are the fields of a certificate?

A

SSSSPIV

  • serial number
  • signature algorithm
  • signature
  • subject ID
  • public key
  • issuer ID
  • validity period
113
Q

what are certificate chains?

A

hierarchy of certificates that are stateless, seamless, and transparent

114
Q

what are the endpoints of a certificate chain?

A

start point: the host (eg. google.com)

end point: root certificate authority that the browser/device trusts (eg. Geo Trust)

115
Q

what is a trust store?

A

a place in you browser or device where all trusted root certificate authorities are stored

116
Q

what is certificate pinning? what does it solve?

A

directly associates a host with a public key (pins it to the browser) and allows device to bypass certificate chain, good to prevent state-level attacks

117
Q

what are some reason for certificate revocation?

A

company gets hacked, CA is compromised (private key compromised), new business/affiliate name, company goes out of business

118
Q

What can happen if you knowingly trust a revoked certificate?

A

you could get man in the middled

119
Q

what are the three main ways a client can check if a servers certificate has been revoked?

A
  • certificate revocation list
  • request via online certificate status protocol (OCSP)
  • OCSP stapling
120
Q

what is the difference between certificate revocation through CRL and OCSP?

A

client has to manually search CRL to check but with OCSP client can make a request to check a certificate status

121
Q

what is OCSP stapling?

A

the server will make the request to OCSP and “staple” the CA’s signed and timestamped response to its certificate chain. this way client can clearly see certificate status of server with initial request

122
Q

what are the 4 phases to the TLS handshake

A
  1. establish security capabilities
  2. authentication and public key exchange
  3. secret key exchange and derivation
  4. finish
123
Q

in what phase is the server ciphersuite shared with the client?

A

phase 1, server_hello

124
Q

what are the components of a cipher suite?

A
  • key exchange (RSA, DHE/ECDHE)
  • cipher algorithm (AES, three key triple DES)
  • hashing algorithm (SHA-1)
125
Q

if using DHE or ECDHE what does the client need to do in phase 2 of the TLS handshake?

A

check certificate chain and signature on private key

126
Q

when exchanging the pre master secret using RSA what happens?

A

client generates pre master secret and encrypts with public key and sends to server

127
Q

when exchanging the pre master secret using DHE what happens?

A

parties compute DH shared secret (which becomes the pre-master secret)

128
Q

what is the purpose of PRF in TLS?

A

to expand secrets into keys

129
Q

how do you go from pre master secret to master secret?

A

using a pseudo random function

130
Q

what is a TLS key block?

A

all the values used in the symmetric key operations

131
Q

what distribution of random numbers do you need to do cryptography? why do you need it?

A

uniform distribution

  • makes brute force maximally hard
  • you could end up with people using the same primes in RSA and could factor their keys
132
Q

what are the components of Fortuna/CTR_DRBG

A

its a deterministic random bit generator based on a block cipher in CTR mode, key and counter are drawn from an entropy source, output function uses AES

133
Q

how does fortuna overcome the fact that CTR is not a one way function?

A

by frequently reseeding

134
Q

Under what conditions is fortuna distinguishable from true randomness?

A

given enough output that the counter wraps and a repeat value can be observed

135
Q

what is a bias?

A

a deviation from uniform distribution

136
Q

what is the modulo bias?

A

when using modular arithmetic to get a random number that is not a power of two you are more likely to get a number that is less than n/2, n being the maximum of the range

137
Q

what is the correct way to solve modulo bias

A

keep calling the rng function until you get a random number that is within the desired range, that way when modular arithmetic is applied there is not difference in the distribution of result

138
Q

what is the efficient way to solve modulo bias

A

generate way more bits than you need, then modulo reduce

139
Q

given b bits of security what should the key length be for symmetric encryption?

A

k>=b

140
Q

what are integer based discrete logarithm systems susceptible to ?

A

index calculus attacks

141
Q

for elliptic curve discrete logarithm problems, given bits of security b what must the group size be so that it is infeasible?

A

|q| > 2b

142
Q

what will happen to RSA as time goes on?

A

it will be replaced by ECC because increasing bits of security results in a much larger increase in the required modulo (2n = 15x modulo)

143
Q

given b bits of security what must the size of hash length be? what if collisions aren’t a problem?

A

> =2b

if collisions don’t matter then >=b

144
Q

do collisions matter in HMAC? why or why not?

A

no they don’t, because eve would need to know the secret key to be able to compute tags and compare them

145
Q

what are the pros and cons of passwords?

A

pro: easy, inexpensive
cons: have to generate and store them securely, also have to memorize them

146
Q

what is the problem with no salt password storage?

A

if an attacker finds the hash corresponding to one users password she will be able to crack all users that have the same password

147
Q

what is the pros and cons of scrypts (instead of passwords)

A

pros: memory-hard
cons: more complicated

148
Q

is the one time pad perfect theoretical hiding? why or why not?

A

yes it is perfect in theory since no amount of computing power can help you decrypt ciphertext as it can be ANY message and all pads are equally likely

149
Q

what is the difference between passive and malicious adversaries?

A

passive adversaries just observe ciphertext whereas malicious adversaries can modify and replace ciphertext

150
Q

what is the CIA triad of security

A

confidentiality, integrity, authenticity

151
Q

what are ideal block ciphers (PRF or PRP) ?

A

pseudo random permutations

152
Q

given b bits in an ideal block cipher how many plaintexts are there? how many possible mappings (permutations) are there? how many possible keys?

A

2^b plaintexts, 2^b! permutations, 2^k keys

153
Q

does CTR use decryption functions?

A

no, only uses encryption function of a block cipher

154
Q

what is the disadvantage of CTR mode?

A

can’t be used with a small block length cipher (3DES)

155
Q

what is the problems with traditional RSA?

A
  1. it is malleable (i can make predictable changes to the ciphertext)
  2. it is deterministic, it fails the CPA game
156
Q

what padding scheme is used in block ciphers? what does it do?

A

pksc 7: pads with N bytes of 0xN

157
Q

what are the inputs for authenticated encryption?

A

plaintext, encryption key, mac key

158
Q

what are the outputs for authenticated encryption?

A

ciphertext and authentication tag

159
Q

what are the inputs for authenticated decryption?

A

ciphertext, mac tag, encryption key, mac key

160
Q

what are the outputs for authenticated decryption?

A

plaintext or error if the tag is invalid