MAC, HMAC & DigitalSignature (week 5) Flashcards

1
Q

what does mac stand for ?

A

Message Authentication Code

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

what is mac used for ?

A

MAC is used to ensure the integrity and authenticity of the message

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

what are 3 mac algorithms

A

Key generation Algorithm
–> Select a random cryptographic key

Signing Algorithm
–> Returns a MAC from the message and the key

Verifying Algorithm
–> Verify the message’s authenticity and integrity

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

sender and receiver must _____ in mac

A

share a secret cryptographic key (a shared secret)

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

why is mac weak on non repudiation

A

MAC is weak on non-repudiation as multiple parties may possess the same key.

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

what is authenticity

A

Authenticity verifies the sender’s identity and the source of the message.

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

what is non repudiation

A

Non-repudiation is a procedural, legal concept that proves the legitimacy of a message or data transfer by providing undeniable evidence of both authenticity and integrity

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

what are the steps for MAC creation and verification steps

A
  1. Bob calculates MAC 1 using a cryptographic key and plaintext message.
  2. Bob sends the message and MAC 1 to Alice.
  3. Alice calculates MAC 2 using the same key and message and compares MAC 1 with MAC 2:
    • If they are equal, the message is good.
    • Else, the message is rejected.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

who should know the mac key and why

A

The key must be known only to the sender and receiver to support authenticity.

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

give a scenario where the mac has been compromised by the attacker

A

If the attacker (Eve) changes the message but not the MAC, the receiver will calculate a different MAC from the message and conclude that message integrity has been violated.
* The attacker does not have the
cryptographic key to re-compute
and replace the MAC

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

what is siphashs

A

add–rotate–xor (ARX) based pseudo-random
MAC function optimized for short inputs

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

what does siphash compute

A

computes a 64-bit MAC from a message

128-bit secret key

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

MAC algorithms can also be constructed from ?

A

hash functions (HMAC)

block cipher algorithms

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

what is HMAC

A

HMAC is a specific type of message authentication code (MAC) involving a cryptographic hash function and a secret cryptographic key.

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

what are some challenges with HMAC

A
  • Multiple recipients using multiple keys need a key management process/system
  • Multiple recipients using a single shared key has an authentication problem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what are 2 common things among Hash, MAC, and HMAC

A

–> there is message integrity verification

–> Not designed to support confidentiality

17
Q

what is a digital signature

A

Digital signatures are a mathematical way of verifying the authenticity of digital messages to prevent forgery and tampering in the sending and receiving process

18
Q

What does the Digital Signature assure?

A
  • Authenticity
  • Integrity
  • Non-repudiation
  • A certificate authority
19
Q

steps to create a digital signature

A
  1. Bob uses the message digest algorithm (e.g., SHA-1) to calculate the message digest (MD1) of the plaintext document (PT)
  2. Bob encrypts MD1 using his private key to get the encrypted message digest, which is the digital signature.
  3. Bob sends the document and digital signature to the Alice.
20
Q

steps to verify a digital signature

A
  1. Alice uses the same message digest algorithm to calculate the message digest (MD2) of the plaintext document.
  2. Alice uses Bob’s public key to decrypt the
    digital signature to get MD1.
  3. Alice compares MD1 with MD2:
    • If MD1 = MD2, Alice can trust and accept PT
    • If MD1 != MD2, Alice rejects PT
21
Q

Both physical and digital signatures provide the security services of __________

A

authentication,
data integrity,
non-repudiation

22
Q

what is the difference between physical and digital signature

A

–> physical signatures are a physical part of the document whereas digital signature is an algorithm that needs to bind the signature to message.

–> copy of signed paper document can distinguished but copy of the signed message is identical to the original

–> physical signature can be verified by comparing it to other authentic sources whereas digital signatures are verified using publicly known verification algorithms

–> physical signatures have a slow verification process while digital signatures have a fast verification process

–> physical signatures are easy to understand while digital signatures involve complex cryptographic algorithms and mathematical computation.

23
Q

what are the 10 steps to message encryption and signing

A
  1. Bob encrypts the plaintext message using a strong random symmetric key and a symmetric cipher.
  2. Bob encrypts the symmetric key from step1 using Alice’s public key.
  3. Bob generates the message digest of his plaintext message using a strong message digest algorithm (SHA-1 or SHA-2).
  4. Bob encrypts the message digest using his private key. This becomes the digital signature of the message.
  5. Bob sends ciphertexts of the message, symmetric encryption key (step 2), and the digital signature (step 4) to Alice.
  6. Alice decrypts the ciphertext of the symmetric key using her private
    key.
  7. Alice decrypts the message ciphertext using the symmetric key from step 6.
  8. Alice regenerates the message digest using the same hash algorithm Bob used.
  9. Alice decrypts the digital signature sent by Bob (step 4) using his public key to obtain the message digest.
  10. Alice compares digests from steps 8 and 9 to confirm that the message is indeed from Bob, and that message integrity is intact.
24
Q

what does NIST stand for ?

A

National Institute of Standards and Technology (NIST

25
Q

Digital Signature Standard uses ?

A

DSS uses SHA-1, and DSA

26
Q

what are the 3 types of Digital Signature Standards

A

Simple electronic signature (SES)

Advanced electronic signature (AES)

Qualified advanced electronic signature (QES)

27
Q

what is Simple electronic signature (SES)

A

–> The most basic form of electronic signature.

–> SESs are quick and easy to add to documents, but they lack protection provided by cryptographic encryption methods.

–> In other words, they’re not as secure. One’s email signature is a good example of an SES.

28
Q

what is Advanced electronic signature (AES)

A

–> AESs track changes to the document made after signing.

–> This increases security but is still not suitable to use on important contracts or documents as it is not legally binding.

29
Q

what is Qualified advanced electronic signature (QES)

A

–> QES is the safest way to sign
electronically.

–> Qualified electronic signatures, also called digital signatures, use public key
infrastructure, asymmetric cryptography, and two-factor authentication to ensure the highest level of security.

–> They can also validate the signer’s identity, making them as safe and legal as
a physical signature.