CPS 633 WK 5-6, CRYPTOGRAPHY APPLICATIONS

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/55

encourage image

There's no tags or description

Looks like no tags are added yet.

56 Terms

1
New cards

Symmetric encryption versus public-key encryption

Symmetric encryption uses the same key for encryption and decryption

Public key encryption uses different mathematically related public/private keys for encryption and decryption

2
New cards

What is the main disadvantage of public key encryption

Greater computational cost due to mathematics involved with generating keys, and authentication requirement for public keys

3
New cards

How many keys are needed in a symmetric encryption system

n(n-1)/2 where n is number of users in the network

4
New cards

How many keys are needed in public key encryption

2n, where each n user gets a public and private key

5
New cards

Symmetric key properties

Must be easy to generate and kept private to only authorized parties

6
New cards

Public/private key properties

It must be practical to generate a pair

Operations on keys ust be efficient

Cannot derive private key from public key

Cannot derive private key from messages

7
New cards

How can public/private key systems be used

RSA for confidentiality through large prime numbers

Diffie-Hellman for secure key exchange

Digital Signature Standard for authentication

8
New cards

Why is RSA hard to break?

Since the n value is calculated from p and q, two large prime numbers, it is computationally hard to recover p and q from n

9
New cards

What are the security assumptions of RSA

Requires large and properly generated keys, with private keys protected

10
New cards

What is modular arithmetic?

Arithmetic done within a set of digits, with any results of numbers outside of the set needing to be mod n to get the proper result, where n is the number of numbers in the set

11
New cards

What are the encryption and decryption equations in RSA?

C = P^e mod n

P = C^d mod n

12
New cards

How is n calculated in RSA?

n is the product of two very large prime numbers, p and q

13
New cards

How do we calculate eulers totient for RSA?

phi(n) = (p-1)(q-1)

14
New cards

How do we calculate the public key for RSA?

Choose some e within 1 and phi(n), such that the gcd of e and phi(n) = 1

Public key is (n,e)

15
New cards

How do we calculate the private key for RSA?

Choose some d such that e x d mod n = 1

Private key is (n,d)

d can also be found as ed = 1 + n(phi)

16
New cards

Why might symmetric encryption still be needed?

Since operations using public/private keys are often much slower due to the reliance of arithmetic and exponentiation. Symmetric encryption uses bitwise operations which are a lot faster.

Symmetric encryption also protects large data streams efficiently

17
New cards

How is confidentiality maintained with public key encryption?

Sender encrypts plaintext with recipient's private key, and recipient can decrypt with their corresponding private key.

This does not enforce integrity or authentication

18
New cards

How is authentication and integrity maintained with public key encryption?

Sender encrypts plaintext with their own private key, and recipient can decrypt with the sender's public key to ensure the message is coming from them.

This does not enforce confidentiality since anyone can use the sender's pubilc key

19
New cards

How do you enforce both authentication and confidentiality with public key encryption?

First, sender encrypts plaintext with their own private key, then encrypts the result with the receiver's public key.

Receiver will decrypt with their own private key, then decrypt again with the sender's public key.

20
New cards

What is a passive attack

A passive attack is when an attacker observes communication without any action, like reading traffic and looking at confidential material

21
New cards

What is active attack?

An active attack is when an attacker takes action by intercepting, reordering, or replaying messages from a channel

22
New cards

What does message authentication check?

Both integrity, that the message has not been altered, and origin authentication, that the message is coming from the right place

23
New cards

What is a message authentication tag?

It is a value/code thats paired with a message, that the receiver can use for integrity and origin verification.

24
New cards

How is a message authentication code generated?

A sender and receiver share a secret K key. The tag is produced from a function that uses both the message and this key. A sender will send the message and key pair.

25
New cards

How does the receiver use the MAC to verify integrity and origin?

The receiver puts the message into the same function with the shared key. If the produced code is the same, then they know the message hasn't changed, and the message came from the same person who shares their key.

26
New cards

What is the purpose of using the hash function?

A hash function produces a hash, or message digest, which is used for integrity

27
New cards

How is a hash function used to enforce integrity?

Sender produces a message digest from the hash function, then sends the hash and message pair to the recipient. Recipient can run the message through the function themselves, and compare if the hashes are the same

28
New cards

Does a hash function enforce authentication?

No, a hash function does not enforce authentication because anybody can use the hash function

29
New cards

What is MD5?

Hash function that produces a 128-bit result.

30
New cards

What is SHA-1?

Hashing algorithm that creates a 160-bit message digest.

31
New cards

What is SHA-2?

Family of algorithms that include SHA- 224, SHA- 256, SHA- 348, and SHA- 512, based on the bit length of the digest created

32
New cards

What is HAVAL?

Hash function that produces digests of variable length, from 128, 160, 192, 224 or 256 bits.

33
New cards

How can we use hashing and ensure confidentiality

Encrypt the message hash pair, such that the recipient can decrypt the pair, and then hash the message to ensure that the resulting hash matches what was sent

34
New cards

What are check sums?

Checksums are k bits that are added to a string of n bits for the receiver to check for error or tampering

35
New cards

How do odd/even parity check sums work?

A 1 bit checksum is added to the end of data, which makes the total number of 1s odd or even (Declared by sender). Such that the recipient can compare the actual number of 1s or 0s in the data to the checksum, to see if data was edited.

36
New cards

What is a disadvantage of odd/even parity check sums?

It cannot detect errors if an even number of bits were flipped

37
New cards

What is a file checksum and how does it work?

A sender calculates a checksum is from every bit of a file and stores it with the message, and a receiver calculates the checksum themselves and compares the two values. If they are different, the file may have been tampered with.

38
New cards

What is the issue with symmetric key sharing?

There needs to be a secure way to exchange shared keys in order for them to be used. But encrypting it symmetrically needs another shared key itself

39
New cards

How can private keys be used for symmetric key sharing?

They can be used by the sender to encrypt the symmetric key and by the recipient to decrypt it.

They can enforce both authentication and confidentiality by doing two rounds of encryption using the recipients public key and the sender's private key

40
New cards

What are digital signatures?

Digital signatures is a way to enforce authentication and non-repudiation by tying data to a particular person via their private key. This is verified with their corresponding public key

41
New cards

What is signature notation?

Sg(S,M)

This means a signature from sender S is on message M, and a signature message pair (M,Sg(S,M)) is sent

42
New cards

What are the 5 properties of a signature?

A signature must not be forgeable

A signature must be verifiable via public key

A signature must not be valid if the message is changed

A signature must be able to be traced to the signer

A signature is unique to one message only

43
New cards

Why are digital signature's non-repudiation better than shared key authentication? (Through MAC)

Since both parties know the shared key, they could generate the same tag through the MAC function. One party can't prove to a third party who generated the key. In digital signatures, this is possible

44
New cards

How do you maintain confidentiality using digital signatures?

Encrypt the message to get C, then sign Sg to get Sg(S,C), then send the (C,Sg) pair

45
New cards

Why do we normally sign hashes instead of the message?

It is more efficient to sign the hash and attach it to a message

46
New cards

How are hashes signed?

A hash/digest is calculated by putting M through a hash function, then H is signed to get Sg(S,H), and the (M,Sg) pair is sent

47
New cards

What is the downside to encrypt-then-sign over sign-then-encrypt?

In encrypt-then-sign, the signature message package is not encrypted. So an attacker could check the ciphertext's signature without decrypting it

48
New cards

What is the man in the middle attack?

When an attacker intercepts a communication channel between two parties, and convinces them that they are using the other party's public key, when they are using the attackers.

49
New cards

So why doesn't public key encryption alone establish identity or authentication?

Since public keys can be generated by attackers and falsely labelled as belonging to a trusted party

50
New cards

What is a certificate?

An identity and public key pair, which is signed by a TTP to verify that this public key belongs to this individual.

51
New cards

What is the benefit of using a certificate?

Certificates have public information, which cannot be changed by an attacker and cannot be recreated by an attacker

52
New cards

What is a registration authority?

An RA takes a certificate request and checks their identity, and forwards to the certificate authority

53
New cards

What is a certificate authority?

A CA issues and signs certificates

54
New cards

What is a validation authority?

A VA supplies certificate status and validation information regarding certificates

55
New cards

What is a certificate revocation list?

An issuer-signed list which identifies certificates that have been revoked due to expiration or revocation

56
New cards

How can certificates counter forged public-keys?

Certificates verify public keys through a trusted party's signature