New answers tagged

1

In its plain form, CBC-MAC is vulnerable to "length extension attack", where you just add some blocks at the end. So in order to stop people from doing that, you need to somehow mark the final block as indeed the final block. And not treat it like any other block. Wikipedia lists two ways: either prefix with block count, or encrypt final block with ...


2

I wouldn't do this and don't understand what problem you are trying to solve (unless this is a purely academic question). Encrypt-then-MAC where we define ciphertext=encrypt(K_enc, msg) and sending ciphertext||MAC(K_mac, ciphertext) will detect any transmission errors or malicious tampering by someone who doesn't know the secret MAC key K_mac with ...


1

This will not harm the encryption, but it doesn't really add anything either. What you've described is just encryption. You've only changed what the payload is by making it a little bit larger. This is just as safe. However a mac also contains a check in it that if it was mangled in transmission in either part(encrypted message or the mac) it wouldn't ...



Top 50 recent answers are included