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

Refactor and rework how fingerprints are used #164

Closed olabini closed 5 years ago

olabini commented 6 years ago

We are currently storing seen fingerprints and managing them inside of pidgin-otrng. However, the current code doesn't take into account v3 fingerprints, and since libotr has its own ways of dealing with fingerprints (inside of libotr primarily, not inside of the pidgin plugin), it's hard to see how the current structure will work AT ALL.

So, this issue is about doing a few different things to fix this situation:

claucece commented 6 years ago

This might also be related to #132

olabini commented 6 years ago

So, I have gone through libotr and pidgin-otr and the fingerprint functionality is actually quite straight forward there:

  libotr
    - contexts have list of all fingerprints, whether they are trusted etc
    - has ops for new fingerprint seen and for writing fingerprints that gets called when a new fingerprint is seen (also used after SMP)
  pidgin-otr
    - the current active fingerprint and related trust is used during SMP to print different messages
    - dialogs for unknown fingerprint seen
    - dialogs for authenticating fingerprints
    - to display information in the configuration (below the Generate button)
    - to display the known keys list in the configuration
olabini commented 6 years ago

Looking at libotr-ng and pidgin-otrng:

  libotr-ng
    - creating human fingerprint representation
    - serializing a public key to a fingerprint
    - ops for fingerprints seen etc
  pidgin-otrng
    - keeps track of all fingerprints seen
    - manages fingerprints in file
    - dialogs for unknown fingerprint seen
    - dialogs for authenticating fingerprints
    - to display information in the configuration (below the Generate button)
    - to display the known keys list in the configuration
olabini commented 5 years ago

The main thing currently missing is to manage the loading and storing of V3 fingerprints. Everything else should work. However, if you see any problems, please let me know.

olabini commented 5 years ago

The final step before this issue is done is to fix up the fingerprints list to work correctly, and have the v3 fingerprints in it.

olabini commented 5 years ago

I now consider this work done. I'll open some separate issues for some problems that remain to be fixed.