Security & crytography Flashcards

1
Q

What is the difference between symmetric and asymmetric encryption

A

Symmetric encryption uses the same key to encrypt and decrypt
Asymmetric encryption uses different keys to encrypt and decrypt

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

What does AES stand for ?

A

Advanced Encryption Standard

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

What does ECB stand for ?

A

Electronic Code Book

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

Describe the steps in ecb mode ?

A

1.) Convert your plaintext to binary
2.) Convert your key to binary
3.) XOR your values in steps 1 and 2
4.) Convert your output in step 3 into hex
5.) Put your hex value from the previous stage into your given substitution box
6. ) Convert your hex value form the substitution and convert it to binary
7.) Put your binary from the previous step into a permutation box (this is you final answer)
8.) Convert your final answer to correct type( hex, decimal or binary)

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

Describe the steps in cbc mode ?

A

1.) Convert your initialisation vector to binary
2.) Convert your plaintext to binary
3.) XOR your values in steps 1 and 2 (remember the value after the xor)
4.) Convert your key to binary
5.) XOR your values in step 3 and 4
6.) Convert your output in step 5 into hex
7.) Put your hex value from the previous stage into your given substitution box
8. ) Convert your hex value form the substitution and convert it to binary
9.) Put your binary from the previous step into a permutation box (this is you final answer)
10.) Convert your final answer to correct type( hex, decimal or binary)

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

Name some modern applications of cryptography

A
  • Online Banking
  • Secure Remote Access(Moodle from home
  • Cryptocurrency
  • Cloud Storage Security
  • E-commerce
  • Messaging
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is cryptography

A
  • Cryptography is the practice evaluation, and analysis of approaches and techniques to establish security services, such as confidentiality, integrity and authenticity within communication environment to establish data security
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Should we use untested crypto systems

A

No

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

What is a key in cryptography

A

Key is a means to safeguard data

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

Define cryptoanalysis

A

the study of complex statistical and mathematical techniques to obtain meaningful information about the ciphertext or encrypted message

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

What is Kirchhoff’s principle

A

A cryptosystem should preserve its security properties even if everything about the cryptosystem, such as, encryption and decryption algorithms are made public, provided the secret key is kept securely

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

What are the 5 tuples of cryptosystems

A

E = Encryption
D = Decryption
M = letter in plaintext
K =Key
C = Ciphertext

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

What is another name for substitution cipher

A

monoalphabetic substitution

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

A simple mono-alphabetic substitution cipher has how many possible keys?

A

26!

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

How does substitution cipher work?

A

It involves one-to-one mapping of the plaintext letter by a fixed ciphertext letter.

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

What are some drawbacks of substitution cipher?

A
  • This cipher is not secure because its prone to brute force attack(exhaustive key search)
  • Cipher text is also prone to letter frequency analysis
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Name a type of substitution cipher

A

Caeser cipher

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

What happens in Caeser cipher

A

Every character is replaced with the character three (k) slots to the right

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

What are the caesar cipher formula

A
  • Encryption c = e^k (m) = m + k mod 26
  • Decryption m = d^k (c) = c - k mod 26
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are some drawbacks of caesar cipher

A

Prone to brute force / exhaustive search because there are only 26 keys.

Prone to letter frequency analysis

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

Describe how dictionary attack works

A

. You get some words then:
○ First letter in word becomes A
○ Second letter becomes B and etc
○ Letter repeated occurrences in the plaintext use the same letter

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

Describe a benefit of dictionary attack

A

Allows us to perform decryption faster on ciphertext produced from substitution cipher

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

Describe some weaknesses of dictionary attacks

A
  • Different words can have the same pattern
    To avoid this use dictionary on longer words so you can avoid getting the same pattern
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What is another name for vigenere cipher

A

Polyalphabetic cipher

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

What is a benefit of vigenere cipher

A

Unlike substitution cipher each letter can be mapped to more than 1 letter.

26
Q

How does vigenere cipher work

A

1.) You have a key letter stream and a your plain text
2.) Underneath you the letter stream and plain text, for each letter there is a corresponding no (key stream no. and plaintext no.)
3.) We need to calculate a cipherttext no. to do this we do the following :
. (Key stream no + plaint text no) mod 26
4. To get our ciphetext letter we look at the corresponding letter for each ciphertext no
(Look at week 3 in slides for example)

27
Q

What are the formulas for vigenere cipher

A

Encryption(to get cipher text) - (p1 +k1) mod 26

decryption(to get plaintext text) - (c1 - k1) mod 26

p1 = plaintext no
k1 = key stream no
c1 = ciphertext no

Note when doing decryption if c1 - k1 is a negative number subtract it from 26 to get the plain text e.g. 2-4 = -2 then do 26-2 = 4

28
Q

Explain how a vigenere table works

A

You are given your plaintext and key. You keep going along the table until you meet and thats your cipher text (See week 3 to see how it works)

29
Q

What is a drawback of Vigenere cipher

A

prone to incident of coincidence meaning some letters are mapped to each other which makes is it easier to find the key length via letter frequency analysis

30
Q

What is transposition cipher

A

Moving the plaintext letters in some logical fashion to produce a ciphertext

31
Q

Name a type of transposition cipher

A

columnar transposition

32
Q

How does columnar transposition work

A
  • In columnar transposition we spread the letters across the grid and read the letters by column for the cipher text(check slide)

*Another way to do columnar transposition is with a keyword. (irrregurlar column transposition)

  • We do the same as stated above but we order the columns alphabetically before reading them by column
    (See week 3 for example)
33
Q

Name some drawbacks of transposition cipher

A

If you can determine the number of columns you can determine the length of the keyword

Prone to anagramming

34
Q

What happens in permutation cipher

A

Basically permutation box

35
Q

What is a benefit of permutation cipher

A

improves the security of encryption, such as, Block Ciphers

36
Q

Name the modern principles of modern cryptography

A
  1. Large enough key space to resist exhaustive search
  2. Resistant to frequency analysis
  3. Small change in plaintext results in large change in ciphertext
  4. Security depends only on secrecy of key, and not on secrecy of algorithm (Kerckhoff’s principle)
37
Q

What does SPN stand for ?

A

Substitution Permutation Network

38
Q

What does SPN do

A

Uses repeated application of XOR key mixing
substitution and permutation to achieve confusion and
diffusion.

39
Q

Name some forms of encryption that use SPN

A

AES and Heys cipher

40
Q

Define confusion

A

To make the relation between encryption and the key a very complex and involved one

41
Q

Define diffusion

A

Plaintext is dissipated so that a tremendous amount of material is needed to tie down this structure

42
Q

What are the evaluation criteria when it comes to cryptography

A
  1. Security
    * Resistance to cryptanalysis, soundness of math, randomness of
    output, etc
  2. Cost
    * Computational efficiency (speed) and memory requirements etc
  3. Algorithm and Implementation Characteristics
    * Flexibility, hardware and software suitability, algorithm simplicity
43
Q

What is padding?

A
  • Padding is when you add extra data to end so it matches the blocksize
44
Q

Name some modes of operation

A

. ECB mode - encrypts each block with the same key
. CBC makes use of initialisation vector
. OFB mode
. CFB mode
. CTR mode
. GCM mode

45
Q

What is a one time pad?

A

A chunk of key material that is as long as the plaintext to be encrypted, and that, once it is used, is thrown away and never used again for encrypting anything

The cipher text from one time pads is unbreakable because the plaintext could literally be anything

46
Q

What is the rule for one time pads

A

If the key is truly random, and is the same length as the plaintext, then the ciphertext is also truly random

47
Q

What is the main difference between stream and block ciphers

A

Block ciphers encrypt block by block whereas stream ciphers encrypt by byte/bit

48
Q

Give some info on stream ciphers

A

Loosely based around the idea of the one-time pad

  • Generate a pseudorandom key stream and use it as the key to
    an XOR cipher.
49
Q

What are the 2 types of stream ciphers

A
  • Synchronous Stream Ciphers:
    . Pseudo-random digits generated independently of plain-text
    and cipher-text
    • Both sides must be synchronised.
  • Self-synchronising stream ciphers:
    • Will resynchronise after a certain number of bytes since a lost
      one.
50
Q

What is another name for hash functions?

A

one-way/trapdoor functions

51
Q

What conditions should hash functions satisfy ?

A
  • They must be fast to compute
  • Given the hash, H(m), of message , it must be very difficult to find
    another message, m′
    that computes to the same hash (“finding the
    inverse”)
  • Should be hard to find m and m′
    such that their hashes match
52
Q

Describe the steps in RSA (brief look)

A

RSA in a nutshell
1. Choose two large primes p and q, and calculate n = p ∗ q.
2. From n follow some maths steps to calculate the value e and d
3. Publish n and e, keep d secret and destroy p and q
4. Encryption of m is now c = m^e (mod n)
5. Decryption of c is then m = c^d (mod n)

53
Q

Name the AES Finalists

A
  • MARS
  • RC6
  • Serpent
  • Twofish
  • Rijndael (WINNER)
54
Q

Name a cryptographic hash function

A

MD5

55
Q

Which AES mode of operation provides authentication as well as confidentiality

A

Galois Counter Mode (GCM)

56
Q

What padding scheme is least advisable in practice?

A

Pad the message with all zeros.

57
Q

Why is DES no longer recommended for use in new products requiring encryption?

A

The key is too short

58
Q

Is RSA asymmetric

A

Yes

59
Q

In AES is the key-size large enough for the foreseeable future to be secure.

A

yes

60
Q

What do fiestel ciphers do?

A

Breaks the problem of designing a good block cipher into the design of a good key expansion algorithm and a good round function

61
Q

Name some valid round operations in AES

A

AddRoundKey() and MixColumns()