AnsweredAssumed Answered

Smack unable decrypt a encrypted message once received in onOmemoMessageReceived

Question asked by Vishnu Prajapati on Jul 28, 2017
Latest reply on Jul 30, 2017 by cmeng

Hi,

I am new to OMEMO encription and have implemented Smack 4.2.1-SNAPSHOT. Since there is a dedicated listener 'OmemoMessageListener' in OmemoManager for receiving encrypted message. But i am also getting callback for this encrypted message in ChatMessageListener(in org.jivesoftware.smack.chat). It throws an exception when i try to decrypt this encrypted message received in ChatMessageListener using OmemoManager.decrypt(BareJid sender, Message omemoMessage).

 

Exception :

org.jivesoftware.smackx.omemo.exceptions.CryptoFailedException: Transported key could not be decrypted, since no provided message key. Provides keys: [1455851406]

 

Please tell me what i am doing wrong. And one more thing i want to know that, is there any way to decrypt OMEMO encrypted messages in offline state(When user not connected to XMPP) since user is not connected to XMPP when application has killed and user is receiving these OMEMO encrypted message through push notifications.

Outcomes