Score:1

BAD Record MAC error from the server

hu flag

I am working on ssl client because of some server update I was enabling the cipher TLS_DHE_RSA_WITH_AES_128_GCM_SHA256. While handshake with server I was facing Bad Record MAC Alert message from the server.

I was verified the time stamp and encryption status that are correct. That doesn't make any problem. I have no idea how to debug kindly give me the support how to debug.

I have got the gcm code from https://github.com/BrianGladman/modes/blob/master/gcm.h

I want to what are the possibilities for Bad Record MAC. How to debug and fix.

SAI Peregrinus avatar
si flag
This question is better suited to StackOverflow. And probably can't be answered without seeing the source to your client. Something is wrong with the MAC, but solving the issue will require knowing how you create the MAC. It could be a bad packet getting received (about 1/4 million chance to slip by the TCP checksum), it could be you misusing your SSL library (OpenSSL needs different calls if used in a multi-threaded context, for a common one), or something else entirely.
Ahamed Fayaz. avatar
hu flag
Actually I am using mocana ssl that was not opensource. So I am not able to share the code, In this stack there is no support for AES128gcm so I was added that from the opensource. At least I need support for how did I verify the AEAD cipher.
Ahamed Fayaz. avatar
hu flag
After refer RFC5246 they mention Bad Record MAC because of authentication error. The output of the gcm is cipher text+tag. Previously I am not concatenate the tag with the cipher text, Now the issue was fixed.
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.