Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to decrypt OMEMO message #1126

Open
kamalkumar13 opened this issue Jan 22, 2024 · 1 comment
Open

Failed to decrypt OMEMO message #1126

kamalkumar13 opened this issue Jan 22, 2024 · 1 comment

Comments

@kamalkumar13
Copy link

kamalkumar13 commented Jan 22, 2024

Hi Experts, Please help us to come out from this:

Our iOS application working fine if we are running normally, but if we are decrypting xmppmessage from notification module(a service extension), failed to decrypt OMEMO message.

this function not working :

- (void)extracted:(NSDate * _Nullable)delayed forJID:(XMPPJID * _Nonnull)forJID forwardedMessage:(XMPPMessage * _Nonnull)forwardedMessage iv:(NSData * _Nonnull)iv keyData:(NSArray<OMEMOKeyData *> * _Nonnull)keyData payload:(NSData * _Nullable)payload senderDeviceId:(uint32_t)senderDeviceId originalMessage:(XMPPMessage*)originalMessage isForward:(BOOL)isForward{
    [self processKeyData:keyData iv:iv senderDeviceId:senderDeviceId fromJID:forJID payload:payload message:forwardedMessage forwarded:isForward delayed:delayed originalMessage:originalMessage completion:^(BOOL success, XMPPMessage *messageStanza) {
        
        if(!success){
            NSLog(@"Failed to decrypt OMEMO message: forwardedMessage : %@ \n originalMessage: %@", forwardedMessage, originalMessage);
        }
    }];
}

Logs:

Failed to decrypt OMEMO message: 

forwardedMessage : 
<message xmlns="jabber:client" from="eb1ece2c-ddf4-4c71-a08d-3ab263282ef5@xmpp.mydomain.co.in/+911234567890" type="chat" to="4f1b2d35-ece6-4c10-91a3-b14bb6242e12@xmpp.mydomain.co.in" id="68ED74C0-D12E-4DF1-BFA1-D243FCE0D7F2"><store xmlns="urn:xmpp:hints"></store><encrypted xmlns="eu.siacs.conversations.axolotl"><header sid="3290964"><key rid="13159405">MwohBTVSW4L7PHrWgsZatH7IIclJfLTWkVZU3CHqfO+mps5lEAsYACIwVED90w9D3BIZaPyNiSN/QzC+Ozc+eCCqyVBB9iwMlAMImciMthLZYtmXA1whxuLPtEQXGL62o4w=</key><iv>uCA2esi9yEAl6XCr8a8bWA==</iv></header><payload>oME=</payload></encrypted><body>I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo</body><markable xmlns="urn:xmpp:chat-markers:0"></markable><message_type xmlns="jabber:message:type">0</message_type><Caption></Caption><request xmlns="urn:xmpp:receipts"></request><delay xmlns="urn:xmpp:delay" stamp="2024-01-03T10:13:11Z" from="eb1ece2c-ddf4-4c71-a08d-3ab263282ef5@xmpp.mydomain.co.in/+911234567890"></delay></message>

originalMessage: 
<message xmlns="jabber:client" from="4f1b2d35-ece6-4c10-91a3-b14bb6242e12@xmpp.mydomain.co.in" to="4f1b2d35-ece6-4c10-91a3-b14bb6242e12@xmpp.mydomain.co.in/+910123456789" id="fd774bc6-f868-40a8-829c-bf5f9e8c8528"><result xmlns="urn:xmpp:mam:2" queryid="FE3E8DE2-2C91-41E4-A913-8747EF85E65B" id="C3G7RJ1PUIG1"><forwarded xmlns="urn:xmpp:forward:0"><delay xmlns="urn:xmpp:delay" stamp="2024-01-03T10:13:11Z" from="eb1ece2c-ddf4-4c71-a08d-3ab263282ef5@xmpp.mydomain.co.in/+911234567890"></delay><message xmlns="jabber:client" from="eb1ece2c-ddf4-4c71-a08d-3ab263282ef5@xmpp.mydomain.co.in/+911234567890" type="chat" to="4f1b2d35-ece6-4c10-91a3-b14bb6242e12@xmpp.mydomain.co.in" id="68ED74C0-D12E-4DF1-BFA1-D243FCE0D7F2"><store xmlns="urn:xmpp:hints"></store><encrypted xmlns="eu.siacs.conversations.axolotl"><header sid="3290964"><key rid="13159405">MwohBTVSW4L7PHrWgsZatH7IIclJfLTWkVZU3CHqfO+mps5lEAsYACIwVED90w9D3BIZaPyNiSN/QzC+Ozc+eCCqyVBB9iwMlAMImciMthLZYtmXA1whxuLPtEQXGL62o4w=</key><iv>uCA2esi9yEAl6XCr8a8bWA==</iv></header><payload>oME=</payload></encrypted><body>I sent you an OMEMO encrypted message but your client doesn’t seem to support that. Find more information on https://conversations.im/omemo</body><markable xmlns="urn:xmpp:chat-markers:0"></markable><message_type xmlns="jabber:message:type">0</message_type><Caption></Caption><request xmlns="urn:xmpp:receipts"></request><delay xmlns="urn:xmpp:delay" stamp="2024-01-03T10:13:11Z" from="eb1ece2c-ddf4-4c71-a08d-3ab263282ef5@xmpp.mydomain.co.in/+911234567890"></delay></message></forwarded></result></message>

@kamalkumar13
Copy link
Author

@fancycode @pussbb @mmoqui @zauberstuhl Please share your experience on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant