Cryptography Flashcards

1
Q

Cryptography, Cryptology, Cryptanalysis, Crypto

A

Cryptography: making secret codes
Cryptology: Making and Breaking secret codes
Cryptanalysis: Breaking secret codes
Crypto: all of the above, a black box

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

Caesar Cipher

A
  • extremely easy to break by shifting 3 letters left, Simple substitution
  • mono alphabetic encryption
    -classical cipher
    -ve: small key space of 25 keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Hardening Caesar Cipher + 1-ve

A
  • scramble 26 letters into other random permutations: 26!
  • encrypt and decrypt with same scrambled key
  • not necessarily alphabetic shift
    BUT
    English letter frequencies unbalanced, DO NOT use substitution ciphers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

cipher/cryptosystem, encryption result, decryption result, symmetric key, public key, private key

A
  • cipher: encrypt plaintext
  • encryption result: ciphertext
  • decryption result: plaintext
  • symmetric key: same key to encrypt and decrypt
  • public key: to encrypt
  • private key: to decrypt
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Secure cryptosystem & Broken cryptosystem

A
  • Secure cryptosystem: best attack is brute force, exhaustive key search
  • Broken cryptosystem: shortcut attack known without trying all keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Vigenere Cipher

A
  • letters shifted by values defined by a key, letters that represent numbers based on position in alphabet
    eg. A:0, D: 3
  • Stronger: longer keyword(less observable pattern in ciphertext, more frequency tables), shorter message(stat analysis not accurate)
  • same letter to different letters
  • different letters to single letter
  • polyalphabetic substitution, more secure, classical cipher
  • Not good today
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Vigenere Cipher decryption

A
  1. Find length of key by looking at intervals between repeated text patterns. Same word encrypted with same shift values
  2. Key length either whole interval and repeated text or a factor of it
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

One Time Pad

A
  • perfect encryption
  • can only learn length of plaintext
  • plaintext, random key and ciphertext all same length
  • C = P XOR K
  • XOR: instant encryption and decryption, XOR key twice encrypts and decrypts
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

OTP encryption & decryption

A

Encryption: Add each letter by cipher until cipher ends then repeat until sequence ends
Decryption: Minus each letter by cipher until cipher ends then repeat until sequence ends
- mod26 for both. A=1, Z=26

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

One Time Pad properties(3)

A
  1. Random
  2. Used only once
  3. Known only to sender and receiver
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Problems with One Time Pad(5)

A
  1. Hard to generate truly random long One Time Pad
  2. Need to ensure OTP stored securely
  3. Need to ensure secure encryption and decryption
  4. Both parties need to sync portions of pad used
  5. Need to agree on new OTP when old OTP used up or compromised
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Randomness

A
  • found everywhere
    1. equally likely to get 0 or 1 bit
    2. Successive bits independent of each other
  • non randomness = insecurity
  • crypto randomness more strict than random used in RNG and simulations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Errors in identifying randomness

A
  1. Mistaking random for not random
  2. Mistaking non random for random
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Birthday paradox

A
  • only need 23 ppl to get >50% where 2 ppl same birthday
    -> 364! / 342! x 365^23 = 49.2
    -> 100 - 49.2 = 50.8%
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Crude Shannon

A
  • founder of Info Theory
    1. Confusion: obscure relationship between plaintext and ciphertext
    2. Diffusion: spread plaintext statistics through ciphertext
  • One Time Pad: confusion
  • Double Transposition: Diffusion
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Symmetric cryptography

A
  • symmetric key: same key to encrypt and decrypt
    1. Stream ciphers
    2. Block ciphers
17
Q
  1. Stream cipher overview
A
  • short key stretched to periodic infinite keystream
  • XOR keystream with plaintext bit by bit
    eg. GRAIN: NSFR, secure non linear feedback register
  • most common: Feedback Shift Registers(FSR)
18
Q

Feedback Shift Registers(FSR)

A
  • LFSR based: initialise k bit seed
  • Successive bits: XOR previous bits: si+1 = si-1 XOR si-2
19
Q

Stream cipher 1 +ve, 1-ve, Solution,
-ve of Solution

A

+ve: Efficient in hardware
-ve: Speed needed
Solution: fast processors today
-ve: death of linear stream ciphers due to linear lagebra

20
Q
  1. Block ciphers
A
  • encrypting more than one block requires padding as NOT all messages same size as block
  • AES block
    –Key length: Number of rounds
    128:10
    192:12
    256:14
    1. Electronic codebook
    2. Cipher Block Chaining
    3. CTR counter mode
21
Q

ECB, Electronic codebook overview

A
  • every block of plaintext encrypted independently and identically with same key k
    Encryption: C = E(k,P) = Ek(P)
    Decryption: P = D(k,C) = Dk(C)
22
Q

ECB 3 +ve, 5 -ves

A

+ves:
1. Parallel Encryption
2. Parallel Decryption
3. Random Read
-ves: Ek fixed function for fixed k so Simple Substitution
1. Fixed map for symbols
2. Patterns preserved
3. Repetition seen
4. Frequency found
5. Ciphertext leaks plaintext information
* Same issues facing deterministic cipher with fixed key

23
Q

CBC, Cipher Block Chaining + 1 -ve

A
  • each block of plaintext XOR with previous block of ciphertext before encrypted using Ek
    Encryption: C0 = IV, C i = Ek(P i XOR C i-1)
    -ve: No Parallel Encryption
24
Q

CTR, Counter mode + 2 +ves

A
  • use block cipher as stream cipher
  • input to block cipher computes new keystream block
  • Plaintext encrypted by XOR with combination of E, key and counter CTR
    Encryption: C i = P i XOR Ek(CTR i)
    Decryption: P i = C i XOR Ek(CTR i)
    +ves:
    1. Parallel Encryption
    2. Parallel Decryption
25
Q

Probability of two string of bits being the same

A

0.5^length of bit string