Score:2

CPA secure to CCA secure encryption

in flag

Can we use a MAC to transform a CPA secure encryption scheme into CCA secure one?

kelalaka avatar
in flag
[How does encrypt-then-MAC protect from CCA?](https://crypto.stackexchange.com/q/44664/18298) and may be more.. And remember AEAD > CCAx
user104304 avatar
in flag
Thank you @kelalaka.
Marc Ilunga avatar
tr flag
The straightforward approach is to use a MAC to create an AE scheme (typically using Encrypt-then-MAC), which then implies CCA security. But there are subtleties in the security required for the MAC. Check here: https://eprint.iacr.org/2000/025. Alternatively, MAC-then-Encrypt is also a (*very fragile*) option and only works for specific combinations of encryption and MACs.
Score:4
tr flag

I will assume that the question is more conceptual and doesn't necessarily ask what one "should" do in real life. One can take a couple of approaches to achieve what is asked in the question. But, speaking abstractly, the straightforward answer is to use the MAC with the CPA secure encryption scheme to build an AE secure encryption scheme. The reason this works is that AE security implies CCA security. For proof, refer to This paper by Mihir Bellare and Chanathip Namprempre. We, therefore, have several concrete options:

  1. Encrypt-then-MAC: This is the straightforward answer as it is a generically safe construction for an AE secure scheme. However, the devil is in the details. For this construction to be secure, we need that the MAC provides the stronger security that is SUF-CMA (the adversary should not produce a pair of message-tag $(m,t)$ that was already created in the game.

  2. MAC-then-Encrypt: As discussed in the paper I linked to, this construction doesn't generically provide AE security. Hence it is not always expected to provide CCA security. But there are specific combinations such that this method provides AE security. Namely, assuming the encryption scheme is "stream cipher" like or is the CBC mode without padding, then the MtE construction achieves AE security and, therefore, CCA security. See This paper by Hugo Krawczyk or the CCM mode of operation for AEAD.

Practically speaking, based on the most important criteria, one would use properly implemented AEAD schemes like GCM, CCM, GCM-SIV, Chacha20-Poly1305, and so on. These will provide CCA out of the box.

For further discussions on generic composition of encryption and MAC, see answer to this questions.

kelalaka avatar
in flag
Note that this [Should we MAC-then-encrypt or encrypt-then-MAC?](https://crypto.stackexchange.com/q/202/18298) is our canonical Q/A.
Marc Ilunga avatar
tr flag
@kelalaka, I added a reference to the question and answer. Although it seems to me, it doesn't "obviously" answer OP's question.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.