Intro to Cybersecurity Flashcards

1
Q

4 types of assets

A
  • hardware
  • software
  • data
  • communication links
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

7 steps of the design process

A

1) ID assets
2) ID stakeholders
3) ID adversaries
4) define attack surface
5) research each path of attack surface
6) design solutions for each path
7) analyze the proposed solution (effectiveness and whether its worthwhile)

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

5 components of the NICE Framework

A
  • Identify
  • Protect
  • Detect
  • Respond
  • Recover
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

NICE Framework - Identify

A

ID your situation (id assets, stakeholders, adversaries, and attack surface)

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

NICE Framework - Protect

A

design, analyze, implement and pen test solutions

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

NICE Framework - Detect

A

constantly monitor both external and internal signals to allow for timely detection

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

NICE Framework - Respond

A

what is the response protocol (what actions do you take) when something is detected

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

NICE Framework - Recovery

A
  • contain the damage
  • assess the damage
  • follow a recovery strategy
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Equation for Caesar’s Cipher and number of possible keys

A

c = (m + k) mod 26

26 possible keys

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

brute force cost for breaking cipher

A

[#of possible keys * (cost per decryption attempt + cost of verification)] / parallelization factor

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

Affine Cipher equation and number of possible keys

A

c = am + b

m = (c-b) * a**-1 mod 26

26 x 12 = 312 because phi(26) = 12 so then there are 26 possible values for b and 12 possible values for a

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

Shannon’s Principles (3)

A
  • define the objective in a rigorous manner
  • determine your assumptions
  • prove that your methods satisfy the objective given the stated assumptions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

equation and assumptions for one-time pad

A

c = m (XOR) k

  • m and k are encoded in binary
  • k is never recycled
  • the key is sampled from a uniform random distribution (its truly random)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

DES specifications

A

key size: 56 bits
message size: 64 bit blocks
# of rounds: 16

key size is TOO small susceptible to brute forcing

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

Meet-in-the-middle attack

A

for a double DES with keys k1 and k2.

A brute force decryption of m for all possible k1 is done in parallel to a brute force decrpytion of c for all possible k2.

adversary then can verify by looking for where Enc(m, k1) = Dec(c, k2)

Since the encrpytion and decryption are done in parallel, we only get 257 bits of security (2 * 256)

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

Breaking Triple DES

A

assume the output of DES #1 is z1 and the output of DES #2 is z2

Do a brute force encryption of m for all k1 to obtain all possible z1 and brute force decryption of c for all k3 to get all possible z2 (2**57)

Then for each of the 2**56 z1 we have to a do a brute force encryption for all k2. (done in series with the brute forcing to obtain all z1)

257 * 256 = 2**113

17
Q

AES specifications

A

key size: 256 bits
block size: 128 bits
rounds: 14

18
Q

How to encrypt with CBC

A

IV (XOR) b1 then encrypt to produce c1.

c1 (XOR) b2 then encrypt to produce c2

and so on

19
Q

how to decrypt CBC

A

decrypt c2 and then
c2 (XOR) c1 to get b2

in parallel

decrypt c1 and then
c1 (XOR) IV to get b1

20
Q

how to encypt in Counter mode

A

Enc(IV) (XOR) b1 = c1

Enc(IV + 1) (XOR) b2 = c2

21
Q

decrypt in Counter mode

A

Enc(IV) (XOR) c1 = b1`

Enc(IV + 1) (XOR) c2 = b2

22
Q

2 Downsides of CBC

A
  • encryption is done in series which makes it MUCH slower

- errors propagate through

23
Q

1 Downside of counter mode

A

-since blocks are encrypted in parallel, the sender and receiver of the message need to be synchronized. Without synchronization there is no way to ensure that encrypted blocks are received in the correct order

24
Q

3 benefits of Counter mode

A
  • only need 1 function to encrypt and decrypt (because they are done the same way)
  • parallel encryption prevents the propagation of errors
  • all of the values Enc(IV + i) can be pre-computed!
25
Q

what is a stream cipher?

A

produce a “stream” of bits from a PRNG using a true random seed (denoted tr) (each bit from the PRNG is denoted as pr) and do

c= m (XOR) pr

THEY ARE SUPER FAST

26
Q

How to do CBC Mac

A

do CBC as with encryption but only keep the last ci that is generated as the tag

27
Q

what is the Merkle-Damgard approach?

A

its a paradigm used to create collision resistant hash functions

h represents a compression function (take two inputs and output something that is the length of one of the inputs)

h(IV, m1) = z1 and then
h(z1, m2) = z2
h(z2, (m2 || padding)) = hash function digest

28
Q

HMAC equation

A

H’(k0 || H(m || ki))

  • H & H’ are cryptographic hash functions
  • k0 and ki are two keys derived from k (typically 256-bits) that have been XOR with two carefully selected prime numbers that are constants
29
Q

3 different ways to combine encryption and integrity

A
  • MAC then Enc (generate tag from plaintext and then encrypt m || t and send only the ciphertext)
  • Enc then MAC (generate tag from ciphertext and send ciphertext and tag)
  • Enc and MAC in parallel (generate tag from plaintext and send off tag and ciphertext)
30
Q

What is the benefit of encrypt then MAC?

A

The system receiving the message does not perform decrpytion until the message has been verified. As a result, we stop the chosen ciphertext adversary because if they try to feed some ciphertext into our system (to see the decrpyted output) the verification will fail (because they cannot generate a valid tag) and they will not be able to see the resulting decryption. This elevates the confidentiality of our system

31
Q

How does Kerberos key exchange work?

A

Person A sends a request to the KDC (it include a random nonce N)

the KDC (using a master key that both it and A have denoted ka) replies back with Enc[ka](ks, N, Enc[kb](IDb, ks))
ks = the session key generated by the KDC
N = the nonce sent to the KDC by A (prevents a replay attack)
kb = the master key of Person B
IDb = the ID of person B
Enc[kb](IDb, ks) = the "ticket"

Person A sends the ticket to Person B. Person B can use their master key kb to decrypt the ticket and get the session key ks. Since B is able to decrypt the ticket, B knows that it must have come from the KDC.

Person B sends Encks to Person A. If person A is able to decrpyt this message, then A knows that it must have come from B because encrypting with the proper ks implies that the sender has kb (i.e. decrpyted the ticket)

Then communication continues using ks

32
Q

What is the discrete logarithm?

A

k = log[a]b mod N

given a, b and N, find k

33
Q

what is Diffie-Hellman?

A

a “key exchange” method in which both side derive the key independently

A and B have secret values xa and xb respectively. Assume there are two agreed upon prime numbers P and G such that xa < P and xb < P

A and B also have public values Ya and Yb such that

Ya = gxa mod P and Yb = gxb mod P

A and B then exchange their public values with one another.

A can derive a secret key k = Ybxa
B can derive the same secret key k = Ya
xb

Ybxa = Yaxb

34
Q

Issues with diffie-hellman?

A
  • it relies on the assumption that the discrete logarithm is a difficult problem (it is not always difficult)
  • the communication channel between A and B does not have any form of authentication making it succeptible to man-in-the-middle attacks
35
Q

RSA setup

A
  • pick two prime numbers p and q
  • generate N = pq (where N is at least 2048 bits in size)
  • phi(N) = (p-1)(q-1)
  • e is a number coprime with phi(N) (aka the only prime number that both are divisible by is 1) (e is normlly 65537)
  • define d such that (e*d) mod phi(N) = 1
Enc(m) = m**e mod N = c
Dec(c) = m**d mod N = m
public key (e, N)
private key (d, N)
36
Q

4 issues with RSA

A
  • integer factorization is not diffiucult for quantum computers [has O(n) complexity]
  • the performance is terrible because m**e is a HUGE number and then mod N (which is also huge) is also an expensive operation
  • since encryption is done in parallel the ordering of the block is difficult to manage
  • having to frequently call the PRNG for OAEP padding drains the entropy pool
37
Q

Concept of digital signatures using RSA

A

what if I could show that I am the sender of a given message in way that my signature is completely unique to me but anyone can verify that it is in fact my signature.

In other words a valid signature (denoted sigma)-message pair should only be able to generated if my RSA private key value d is known

38
Q

Equation for generating digital signatures

A

Sign Message
sigma = H(m)**d mod N

Verify Signature
sigma**e mod N = H(m)

39
Q

3 authentication types

A

What you know = passwords
What you have = some object
Who you are = biometrics