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

Problem with interaction of pidgin+lurch and "Psi+" with omemo plugin #155

Open
rosso- opened this issue Nov 5, 2020 · 7 comments
Open

Comments

@rosso-
Copy link

rosso- commented Nov 5, 2020

Hi.
I'm trying to talk with another client, which is "Psi+" v1.4.1453 with omemo plugin v2.7 at Windows7.
It doesn't work.

There was an error decrypting an OMEMO message addressed to this device. See the debug log for details.

<message lang='en' to='skipped@jabbim.cz/24637619222826490897601430' from='skipped2@jabbim.cz/-' type='chat' id='ab34a'>
	<active xmlns='http://jabber.org/protocol/chatstates'/>
	<request xmlns='urn:xmpp:receipts'/>
	<encrypted xmlns='eu.siacs.conversations.axolotl'>
		<header sid='703017658'>
			<iv>SgdH5IosZyk3VQOg</iv>

			<key rid='59122785' prekey='true'>MwgHEiEFefusJ9yaMK+cIweHqoNQySXpJp1w88KJ4CoB9OZqVSYaIQUMJA++uwYP8qTgp+gkebuimUe/iPAxtM/GgsHBMeQbASJiMwohBe6WrEwhKU+V1re33OLVk4D+ewr9tEFxHRJBpI9wLMouEAkYACIwSFDtj6xVWNrWceYmJKugAwHkNCRG8cECoOizNwMTmrfG/GH3qwKX0Sg+FhRtvFzG4VI0ZCLMu5kouuWczwIwAA==</key>

</header>

		<payload>F9bDwnV/T8wM2hCWKg==</payload>

</encrypted>
	<store xmlns='urn:xmpp:hints'/>
	<encryption xmlns='urn:xmpp:eme:0' namespace='eu.siacs.conversations.axolotl'/>
</message>

Can we debug it somehow?

@gkdr
Copy link
Owner

gkdr commented Nov 6, 2020

hi again, and thanks for the report.

are you on the dev branch? it uses a more recent version for the libomemo submodule, which includes a fix required for Dino (client) compatibility. if you're not, it's worth a try.

if that doesn't help (or you're already on the dev branch anyway), i'm sure there's a way to debug it. is there more output in the debug log after the xml dump of the message that happens on receive?

@rosso-
Copy link
Author

rosso- commented Nov 6, 2020

This plugin was built from dev branch.
Here it is: https://pastebin.com/tmhGZcXV .
Near line 900 there is something interesting.

@gkdr
Copy link
Owner

gkdr commented Nov 9, 2020

libomemo returns "malformed xml", not entirely sure why right now but it might be the legacy namespace eu.siacs.conversations.axolotl (should be omemo:0 or something like that currently).

edit: maybe i'm wrong, after looking at the XEP history it probably was the other way round. weird. i'll just plug it into some tests later.

ps: are you aware that your sent messages seem to be in plaintext?

@Neustradamus
Copy link

Not linked to 12-byte IVs?

@rosso-
Copy link
Author

rosso- commented Nov 16, 2020

It was a test conversation, so I've tried crypted and unencrypted messages.

@gkdr
Copy link
Owner

gkdr commented Nov 21, 2020

i failed to reproduce it. the line in the debug log points to exactly one line: when omemo_message_prepare_decryption() is called on the incoming message. the error code -12000 is OMEMO_ERR_MALFORMED_XML, which only happens if it can't find one of message, encrypted, or header nodes, whiich are obviously there. maybe mxml gets confused by the lang attribute? which version of it do you have insalled?

just for reference, i added the following test in test_libomemo.c, you could navigate in the submodule and do the same:

void test_issue(void ** state) {
  (void) state;

  char * msg = "<message xml:lang='ru' to='pidginuser1@jabbim.cz/14433697384696207361175319042' from='psiplususer1@jabbim.cz/123' type='chat' id='ac6da'>"
    "<active xmlns='http://jabber.org/protocol/chatstates'/>"
    "<request xmlns='urn:xmpp:receipts'/>"
    "<encrypted xmlns='urn:xmpp:omemo:0'>"
      "<header sid='1001292924'>"
        "<iv>49JLbGlAkHDh6rbb</iv>"
        "<key prekey='true' rid='59122785'>MwhAEiEFWXJNjJfwpO3A4t/q/1zQG5wWqYKWZbHDTuRDNjlUrXQaIQUcTUuhJQnKksHsjccRTzkpTwpvaSTH4cegcmXlQK7xDiJiMwohBT8s8EyzoJyBbcQ7i7j52wl8ayPU9MamC/Qi9ZTITGINEDcYACIwGWypOs61B2Egd3/ykN7xwcGjALDIGfVs6Oon2eafYwjlFIE3DekMrcafyqxMN1B3xIz+rzgR2mso/Ii63QMwAA==</key>"
        "<key rid='1936111278'>MwohBZita0Lxu8U+w/MPwwYNuLm+Xf3i2aidNIiz/xPsq0guEAIYASIw9TiOYZwAM2U1ZTiAZHd8szcDCAHrY5k8r8PFC6Sd6MO+DTK29U1bJJP7Qt7Sm5XXrjwpK1zYHPA=</key>"
      "</header>"
      "<payload>7A==</payload>"
    "</encrypted>"
    "<store xmlns='urn:xmpp:hints'/>"
    "<encryption xmlns='urn:xmpp:eme:0' namespace='eu.siacs.conversations.axolotl'/>"
    "</message>";

  omemo_message * msg_p;
  assert_int_equal(omemo_message_prepare_decryption(msg, &msg_p), 0);

  omemo_message_destroy(msg_p);
}

(don't forget to add it to tests[] in the test file's main() function if you do)

@Neustradamus
Copy link

Neustradamus commented May 18, 2024

@rosso-, @gkdr: It is possible to check with Psi+ 1.5.1911+?

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

3 participants