4472 - Security Final Flashcards
What is Kerkhoffs Principle?
security should be based off secrecy of the key, not the encryption scheme; assume that the encryption scheme is publicly known
What is the ‘don’t roll your own’ principle?
crypto algorithms are very easy to get wrong, don’t make any yourself
What is a brute force attack?
trying every key and/or message until one “works”
A system that can be broken into 2^128 operations has how many bits of security?
128
What are bits of security?
exponential value describing how many operations are necessary to recover a message or key for a cryptosystem
What defines a negligible quantity?
value that is less than on over any polynomial function with degree less than or equal to the security parameter
What is a security parameter?
a variable that measures the input size of the computational problem
What is the security parameter (k) in an RSA cryptosystem?
it is the length in bits of the modulus n, where n is a number in the set 0….(2^k) - 1
What criteria must be met for indistinguishability?
probability that you can tell the difference between two things is less than the negligible quantity
What are pseudo random functions?
random mapping of inputs to outputs, many to one mapping may exists, not necessarily inversible
What are pseudo random permutations?
random mapping of inputs to outputs, one to one mapping, image and pre-image sets are equivalent, unique inverse for every element
What is an “oracle”?
like a black box, ask a question get an answer
What is the hierarchy of security levels?
IND-CCA2 –> IND-CCA1 –> IND-CPA –> IND-EAV
How is IND-CCA2 achieved?
message authentication codes; you need to be able to only create a valid ciphertext with knowledge of a secret key
How is IND-CPA achieved?
by using randomized encryption; encrypting the same message twice should give two completely different results
How is IND-EAV achieved?
you should have negligible advantage telling the difference between cipher text
What are block ciphers used for?
for efficient bulk encryption of data
What is the ideal functionality for block ciphers?
pseudo-random permutation, secret key determines permutation, fixed length input maps to fixed length outputs
What security level is the ECB cipher?
Not even EAV-Secure
What does CBC mode require?
an initialization vector (IV)
What does CTR mode require?
an initialization vector (IV)
What is the benefit of CTR mode over CBC mode?
random access, no decryption function needed
What must an IV be to avoid encryption oracle attacks?
unpredictable to adversary (secret)
What is the block size for AES?
128
What are the bit key options for AES?
128, 192, 256
What are hashes used for typically?
checking file integrity, storing passwords, making certain operations more efficient
What is pre-image resistance?
given a hash y, it should be difficult to find an x such that h(x) = y
What is second pre-image resistance?
given a pre-image x, it should be difficult to find a second pre-image y such that h(x) = h(y)
What is collision resistance?
it should be hard to find any pair such that h(x) = h(y)
MD5 has how many images?
128
Sha-1 has how many images?
160
Sha-256 as how many images?
260
Is MD5 collision resistant?
no
Is Sha-1 collision resistant?
yes, up to 2^80
Is Sha-256 collision resistant?
yes, 128 bits of collision resistance
What are MAC’s for?
verifying the integrity of a message by associating a fixed length value (tag) to it
What is a MAC tag derived from?
a secret key and a message
What is the ideal functionality of a MAC?
like a keyed hash, variable length input maps to fixed length output
What is authenticated encryption?
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
Encryption, MAC Keys and IV must be what for athenticated encyption to work?
independently generated
What distinguishes asymmetric key primitives?
the existence of both a key for performing public operations and a key for performing private operations
what is the discrete logarithmic problem?
given a=g^xmodp find x
what makes the discrete logarithmic problem hard? under what circumstances?
if g generates a cyclic group of large, prime order ‘q’
what are the keys in DHE?
private key: randomly generated number between 1
What is the Diffie Helman problem?
given g, g^a and g^b, compute g^ab
why do we hash messages before signing them?
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)
what is different about ephemeral DH vs regular DH?
private keys are newly generated for each connection
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?
Yes she will, certificates or some higher level protocol security
Explain RSA encryption
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
What is the basis for the “hardness” of RSA
factoring the two large prime numbers; given n=pq find p and q (which are both large prime numbers)
why is RSA not IND-CCA2?
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 can you make RSA IND-CCA secure?
by padding it with a scheme like OAEP
what are digital signatures for?
linking an identity to a message
the private key for digital signatures is used for verifying (T/F)
F; it is used for signing - only the key holder should be able to sign messages associated with their key pair
the public key for digital signatures is used for verifying (T/F)
T; anyone should be able to verify that the a signature relates to a relative party’s verification key
what margin does NIST suggest for efficient modulo bias solver
64 bits of margin for generating 256 bit numbers
what does verification accept? what does it output
a message, verification key and signature; outputs success if signature is valid output fail if otherwise
what is a universal forgery?
an attacker can create a valid signature on any type of message
what is a selective forgery?
an attacker can create a valid signature on some message that was chosen ahead of time
what is an existential forgery?
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
signatures are usually performed on what? why?
the hash of the message; for efficiency reasons
how does padded RSA solve the problem of existential forgery in unpadded RSA?
it makes the signature “non malleable” meaning that linear operations on ciphertext does not result in linear operations on plaintext
cryptograms can replace what with ECC?
their basis; if they are based on the hardness of solving discrete logarithmic functions they can replace that with ECC
what are the two flavours of ECC and what are their advantages?
EC over GF(2^m); fast in hardware
EC over GF(p); fast in software