Score:0

C Client AES 128 GCM encryption with openssl and server decryption inside Intel SGX with rijndael 128 GCM

so flag

I want to encrypt data on client side with Openssl AES 128 GCM and decrypt those data on server side inside Intel SGX using rijndael 128 GCM. I can see inside sgx_aes_gcm.cpp that it uses the same functions from Openssl.

I can imagine that the tag generated by EVP_CIPHER_CTX_ctrl(pState, EVP_CTRL_GCM_GET_TAG, 16, tag) function is mandatory for the decryption to success.

So my question is, how can I transfer the tag from the client to the server so I can authenticate and decrypt the data successfully?

Score:1
my flag

So my question is, how can I transfer the tag from the client to the server so I can authenticate and decrypt the data successfully?

How do you expect the transfer the ciphertext? You can use that same mechanism. In fact, it is standard practice to just append the tag to the ciphertext, and just treat that as one long bytestring.

gsoap avatar
so flag
But if I just append it to the ciphertext isn't it a security vulnerability because someone could see the tag as it is always 16 bytes? I wonder if Openssl puts the tag inside the ciphertext in some way
poncho avatar
my flag
@gsoap: why would it be a security vulnerability? GCM gives full security even if the attacker can see (and modify) the tag...
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.