Authentication and access control Flashcards
Define closed design
A type of design where the actual algorithms, and implementation itself are kept secret.
However, secrecy is not the same as security, and a closed design will not be considered secure just because of the secrecy aspect.
What is open design (Kerckhoffs principle) ?
The implementation, design pattern or algorithm themselves are known, but the system uses a secret input (a key) that is required for en- and decryption.
This allows for algorithms to be public without causing any data leak
What is cryptanalysis?
A type of attack where an attacker tries to find out the secret key.
An example is when the attacker has access to the plain text and the ciphertext, and attempts to figure out the key based on these.
What is a brute force attack?
A cryptanalysis attack where an attacker tries to guess a secret key by checking all possible keys.
How can you protect against brute force attacks?
Making sure the key space is so big that an attacker wouldn’t be able to go through them all.
What happens during a man-in-the-middle attack
If we have to subjects, A and B, communication. A third subject C can place themselves in the middle of A and B, and by doing they pretend to be subject B for A, and pretends to be subject A for B.
What is symmetric key cryptography?
The sender and the receiver share a common key.
Encryption and decryption is done by using this key.
What are the main functions of symmetric key cryptography?
Need a routine, or a way, of generating the shared key.
Need a safe channel to communicate the key between the two trusted parties
Routine for encryption
Routine for decryption
What is One Time Pad?
The key is the length of the plaintext, and randomly generated.
Exclusive “or” is used on the plaintext from the key.
If an attacker tries to compute a message from the ciphertext, they wouldn’t know when they have the original message. Every possible message that can be computed from the cypher text is just as likely to be the plaintext.
Provides complete secrecy in theory
Why is the One Time Pad not widely used?
The burden of creating the keys itself is so big that it is no longer practical.
What algorithms is a symmetric cryptography cryptosystem composed of?
KeyGen(L): Key generating algorithm, L: length of key
Enc(K,M) -> C: Encryption algorithm, K:Key, M:Message, returns C:Ciphertext
Dec(K,C) -> M: Decryption algorithm: K: Key, C: Ciphertext, M:Message
Describe the Caesar cipher(Shift cipher)
Each letter is shifted a certain number of places down the alphabet.
Enc = M + K(mod 26)
Dec = C - K(mod 26)
Why isn’t the Caesar cipher secure?
Small key space - number of letters in the alphabet
What is DES (Data encryption standard)?
Internal structures: Feisel, S-boxes, permutations, shifts, XORs
Should not be used - not secure
What is triple DES?
An decryption algorithm using three DES operations
What is AES (Advanced encryption standard)?
Todays standard when using symmetric cryptography
Name 6 symmetric key ciphers, and what they are used for.
IDEA: Used in PGP
Blowfish: Password hashing in OpenBSD
RC4: (used in WEP), RC5
Double DES, Triple DES
SAFER: Bluetooth
AES: Pervasive
What is asymmetric cryptography (public key cryptography)?
Every user has two keys
Public key (E): Released to everyone who wants to send a message, used for encryption
Private key (D): Known only to the user using it, used for decryption
The need to share secrets between the communicating parties is alleviated.
You release your public key to the world. People use the public key to encrypt the messages. Only you, with the private key, can decrypt the messages.
Because of how the decryption- and encryption systems work with public key cryptography, these processes are slower than during symmetric key cryptography
Requires very large key spaces. This is because there aren’t that many prime numbers. Minimum 2048 bit key space
What are two problems with symmetric cryptography, that asymmetric cryptography alleviates?
When using symmetric cryptography system, the communicating subjects first need to share the key over a channel, meaning it is very important to ensure this channel is safe. When using public key cryptography there is no need to share keys, removing this problem.
Also, for every N subjects that want to communicate, there is a need for N squared keys in the system. This number will increase quickly
What concept is very important in asymmetrical cryptography, and widely used in asymmetrical cryptography algorithms,
If you have a very large prime number, that is a product of two other primes, it is very difficult to figure out which two primes make up the factors.
For example, a private key would contain information about the two primes, whereas the public key could be any number which would later be used to compute inverses.
What concept is very important in asymmetrical cryptography, and widely used in asymmetrical cryptography algorithms,
If you have a very large prime number, that is a product of two other primes, it is very difficult to figure out which two primes make up the factors.
For example, a private key would contain information about the two primes, whereas the public key could be any number which would later be used to compute inverses.
What is the components of an asymmetric cryptography system?
KeyGen(L): Return K_pub, K_priv
Enc(K_pub, M) -> C
Dec(K_priv, C) -> M
NB: given K_pub, it is extremely difficult to compute K_priv
How does digital signatures work?
Encryption is done by using a private key, and decryption is done by using the public key.
C = Enc(K_priv, M)
M = Dec(K_pub, C)
This means that everyone can in fact read the message sent, as everyone will have access to the public key. However, no one would be able to substitute the original message with their own, as they do not have the private key to encrypt their own message.
Because of this, digital signatures can be used to confirm the identity of the sender.
Digital signatures work slow
What are the properties of cryptographic hash functions?
- Can apply to data of any length
- Output is fixed length
- Relatively easy to compute h(x), given x
- Deterministic, given the same x - h(x) will always output the same
- One-wayness property: Infeasible to get x, given h(x)
- Weak-collision resistance property: Given x, infeasible to find y such that h(x) = h(y)
- Strong-collision resistance property: Infeasible to find any pair x and y, such that h(x) = h(y).