Serious Cryptography Flashcards
How many letters does cesar cypher shift?
3
How do vigenere cipher works?
The key is not fixed like cesar, is defines a key using a word of N letters. This word is used to rotate every letter individually: CRYPTO encrypts to FLFSNV using DUH key.
What are the steps needed to break vigenere cipher?
1- find the key length: find for repeated sequences of letters in the ciphertext.
2- determine the key using frecuence análisis: Most common letters of abecedary.
Does classic ciphers operates with bits or letters?
Letters
In symmetric ciphers, what is a permutation?
A function that transform an item (letter or set of bits ) such that item has a unique inverse.
In symmetric ciphers, what is a mode of operation?
An algorithm that uses a permutation to process messages of arbitrary size. Mitigates exposure of duplicate letters in the plaintext by “scrumbling” all. (Confussion and difussion)
What is a substitution cipher?
Replace letters with other letters
When a permutation is secure?
When it satisfy 3 criteria:
1- The permutation should be determined by the key. ( in caesar is fixed and is 3)
2- Different keys should result in different permutations.
3- The permutation should look random. Knowing that A encrypts to B should not give you any other information.
Why classical ciphers are insecure?
Because their are limited to operations that humans can perform with their head.
Which cipher guaranties perfect secrecy?
One Time Pad
What is the length of a one time pad cipher
as long as the message
What an attacker can learn from a ciphertext computed with a one time pad?
The length of the message
How many times can use a single key on one time pad?
Just once
Why can´t we encrypt 2 message with the same key on one time pad?
Because of the XOR property. C1-xor-C2=(P1-xor-K)xor(P2-xor-K)=P1-xor-P2-xor-K-xor-K=P1-xor-P2
Why One time pad is not used on real life?
Because to encrypt a 1 tera file you will need a 1 tera key. Is not applicable for long messages.
Why is one time pad secure?
Shannon proof that if the key K is chosen randomly and that key is as long as the message, an attacker, even if he can proof all the possible keys, will now know nothing about the message, because it will have tons of valid messages.
What is an attack model?
Assumptions about what an attacker can do to interact with a cipher. Does not have to reality exactly, is an approximation.
What is a security goal?
Descriptions of what is considered a successful attack.
What kerchoffs principle states?
The security of a cipher should rely only on the secrecy of the key and not on the secrecy of the cipher.
What are the black box attack models ?
Models where the atacker only see what goes in and out the cipher.
What is Ciphertext-only attack model?
Passive attack, can´t perform decrypt and encrypt queries. JUST OBSERVE CIPHERTEXTS.
what is Known-plaintext attack model?
Passive attack, can´t perform decrypt or encrypt queries. OBSERVE CIPHERTEXTS AND THEIR ASOCIATED PLAINTEXTS. (the plaintexts are randomly chosen)
What is chosen-plaintext attack model?
Active attack. Can perform encryption queries of plaintext of their choise.
What is chosen-ciphertext attack model?
Active attack. Can perform encryption and decryption queries.
What are the grey-box attack models?
Models where an attacker also know the ciphers implementation.
What is an example of grey-box attack model?
Side channel attacks.
What is a side-channel attack?
Observe or measure analog characteristics of a ciphers implementation but do not alter the implementation. (non-invasive)
What are examples of side-channel attacks?
On software error messages, return values and on hardware measure of power consumption, electromagnetic emanations, etc.
What are the two main security goals?
Indistiguishability: Ciphertexts should be indistinguishalbe from random strings. Ej. If an attacker picks two plaintexts and the recieves a ciphertext of one of them, he should not know from which plaintext is.
Non-malleability: Given a ciphertext C1 it should be imposible to create another ciphertext C2 whose corresponding plaintext (P2) is related to (P1) in a meaningfull way.
What is a security notion?
Is a combination of a security goal and an attack model.
What is semantic security?
Is the same as IND-CPA. Ciphertexts should not leak any information about their plaintexts as long the key is secret. So, if an attacker can execute queries of encryption (CPA) two plaintexts that are equal should have different ciphertexts.
How can we achieve IND-CPA?
Using randomized encryption. Basically E(K,P,R) where R are random bits (IV,Tag).
If a cipher is IND-CCA implies that is IND-CPA as well?
Yes
If a cipher is NM-CCA implies that is NM-CPA as well?
Yes
If a cipher is IND-CPA implies that is NM-CPA as well?
No
If a cipher is NM-CPA implies that is IND-CPA as well?
Yes
What is the difference between symmetric and assymetric encryption?
Symmetric: One key that is shared between two parties.
Asymmetric: We have a pair of keys, priv and pub.
Can we derive a private key from a public key?
No
Can we derive a public key from a private key?
Yes
What is called encrypting with a public key?
Encryption, because only the holder of the private key can read it.
What is called encrypting with a private key?
Signature, because all with access to the public key, can read the message, so no confidentiality is gained.
What is authenticated encryption?
Is a type of symmetric encryption that outputs a ciphertext and a Tag. On the decryption process, the cipher takes K, C and T (the tag) and only returns a plaintext if the Tag matches the plaintext, if not, aborts.
What guaranties does authenticated encryption gives?
1- Integrity: The message is only decrypted if the Tag matches the plaintext.
2- Authentication: The person or process that sends the encrypted text, key and Tag gives more information about the authenticity.
What is an effective way to avoid a replay attack?
Set a counter, the evesdropper will not be able to forge the counter+1 message, so the reply will fail.
What is AEAD?
Authenticated encryption with adicional data is an extension of authenticated encryption where some part of the payload must be unencrypted.
What is format preserving encryption?
A type of encryption that creates ciphertexts that have the same format as the plaintext. Ej. Encrypt IP’s to IP’s, etc.
What is Fully homomorphic encryption (FHE)?
A type of encryption that let a user to update a ciphertext without decrypting it. It is useful on cloud scenarios, where you do not want you provider to know your encryption key, so you can send encrypted data and update other encrypted data without a key.
What is Searchable encryption?
Is a type of encryption that let you search for content without decrypting that content.
What is tweakable encryption?
Is a type of encryption that takes a key, a plaintext and a tweak. The tweak is a type of value that depends on the context, to avoid other contexts to decrypt that data. For example, on disk encryption, the tweak is set as the sector number or the block index.