otrv4 / libotr-ng

A new implementation of OTR with support for version 4. This is a mirror of https://bugs.otr.im/otrv4/libotr-ng
Other
43 stars 9 forks source link

Sometimes the B prekey proofs are still wrong #162

Closed olabini closed 5 years ago

olabini commented 5 years ago

This is likely because of some uninitialized memory somewhere... It doesn't happen often though.

olabini commented 5 years ago

Actually, this seems to happen a lot right now - 60-70% of the time for me. I'll investigate.

olabini commented 5 years ago

Adding to this, libotr-ng DOES verify even the bad proofs...

olabini commented 5 years ago

OK, this has been fixed as of current master. The reason was because of sizeof used to generate keys - but after a recent refactoring sizeof returned the size of the pointer, instead of the buffer allocated. The fix was to not use sizeof in many of those places, to make the code more robust.

claucece commented 5 years ago

Ok, with the current code that I got, I get:

Encountered error when handling data: incorrect proof for prekey messages b key
claucece commented 5 years ago

My branch is at the latest commit from master on every library needed.

olabini commented 5 years ago

Really? I don't get that after doing the sizeof fixes I pushed

claucece commented 5 years ago

Yes.. I get it 4 out of 5 times.

olabini commented 5 years ago

Hmm. And you deleted absolutely everything, and you're sure libotr-ng has been installed?

olabini commented 5 years ago

Yeah, I get it now too. It doesn't happen as often as before though.

olabini commented 5 years ago

@claucece - can you try again with this fix?

claucece commented 5 years ago

Now it gets published. thanks.