Linked Questions

1 vote
0 answers
282 views

Using same key for encryption and ECBC-MAC k2 [duplicate]

ECBC-MAC: $E_{k_2}(CBC-MAC_{k_1}(m))$ If we use same key for encryption (CTR or CFB) and k2 (end tag encryption) in ECBC-MAC in encrypt-than-MAC sheme, is it secure?
LightBit's user avatar
  • 1,659
1 vote
0 answers
136 views

Separate keys for encryption and MAC? [duplicate]

I use HMAC(ciphertext)+ciphertext for authenticated encryption. The same key is used for both MAC and encryption. Is that right? Is using separate keys for MAC and encryption necessary or any good? ...
user40602's user avatar
  • 517
13 votes
1 answer
2k views

Why does HMAC use two different keys?

Suppose $H$ is a hash function; why is $$H(k\mathbin\|H(k\mathbin\|m))$$ not secure? See this HMAC definition. In there, indeed two keys are used and the mac algorithm is $$H(k_1\mathbin\|H(k_2\...
abdolahS's user avatar
  • 439
6 votes
2 answers
4k views

HMAC versus encrypted hash

When encrypting a message with a symmetric key, it seems like the best practice is to first encrypt the message, then run the cipher text and key through HMAC, appending the result to the cipher text. ...
Niko Carpenter's user avatar
5 votes
1 answer
520 views

Does hashing an ECB encryption with a strong hash function produce a secure MAC?

Does applying a strong hash function like SHA-256 to the ECB-encryption of a message (using some secret key $K$) produce a secure mac? For example, given a message $m$, would a simple mac construction ...
ManRow's user avatar
  • 343
1 vote
1 answer
748 views

How to use AES-CBC to password-encrypt a small block of stored data

I have a small block of data (16 bytes) that I am required to encrypt, store (in an unsecure, visible location). Later I have to retrieve and decrypt it. I must use AES-CBC and a user-entered ...
Grant E.'s user avatar
0 votes
3 answers
478 views

About MAC and HMAC

I'm studying mechanisms of integrity and authentication in symmetric encryption scenarios. I want to propose some examples to see whether I got the point here: Let $m$ be the message, $c$ the ...
kub0x's user avatar
  • 898
3 votes
1 answer
418 views

Encrypt-then-HMAC with a single key is secure?

The partition oracle attacks exploits the non-committing AEAD schemes. Informally, a committing encryption scheme is one for which it is computationally intractable to find a pair of keys and a ...
kelalaka's user avatar
  • 49k
0 votes
1 answer
219 views

Is it safe to use the same password/secret for both VeraCrypt volume and its HMAC?

I am trying to script the integrity check of a VeraCrypt volume. ...
sunknudsen's user avatar
2 votes
1 answer
179 views

The solution of insert MAC in a ciphertext without Authenticated Encryption supported

From Should we MAC-then-encrypt or encrypt-then-MAC?, I understand I should do Encrypt-than-MAC, which the MAC included all the information such as IV and cipher text. After reading Why choose an ...
Hartman's user avatar
  • 269