Fixed check g_a in encr chats
DH: added check for bad prime in encr chats