(In reply to comment #58) > Just doing the spec right now: > > > The extra DBus channel interface is implemented using GDBus > > so it needs to be exported on a different bus name. > > Ugh. Can we not do strange hacks like this, please? Either use the > extensions mechanism, or save it for 1.0. I don't want to block on 1.0, and I don't want to write obsolete code with tp-glib's codegen. So that's the necessary evil in the meantime. > + + tp:causes-havoc="experimental"> > + (Gabble-specific) > > If doing this in 0.x, please use o.fd.Channel.Interface.OTR1 and add it to > telepathy-spec (OK to go via extensions/ until we do the spec -> tp-glib > dance, though). I can change the iface name but it doesn't matter much. I would like to avoid extensions/ nightmare though, I don't want to write code using that in master and port it again in next. > In 1.0, certainly add it to the spec. Yep, planned to include that in the tp1.0 spec, and consider it private between gabble and empathy in the meantime. > + A simple D-Bus API + href="https://otr.cypherpunks.ca/">Off The Record. > > "... API for > +

The current trust level of this channel: > + 0=TRUST_NOT_PRIVATE, 1=TRUST_UNVERIFIED, 2=TRUST_PRIVATE, > + 3=TRUST_FINISHED

> > This deserves a and documentation. I didn't write it because gdbus-codegen does not use it. Opened https://bugzilla.gnome.org/show_bug.cgi?id=729762 already. But I'll add it in our spec in the meantime anyway, even if it's just for the html version of our spec. > I assume the meanings go something like this: > > TRUST_NOT_PRIVATE: not using OTR at all? (Can we also see this when using > OTR but something has gone wrong?) > (o.fd.Channel.I.Securable.Encrypted=FALSE, > o.fd.Channel.I.Securable.Verified=FALSE) yes > TRUST_UNVERIFIED: the channel is encrypted, but you might be talking to a > man-in-the-middle instead of the peer you expected. > (o.fd.Channel.I.Securable.Encrypted=TRUE, > o.fd.Channel.I.Securable.Verified=FALSE) yes > TRUST_PRIVATE: the channel is encrypted, and the user has indicated that the > peer's key fingerprint is trusted to belong to that peer. > (o.fd.Channel.I.Securable.Encrypted=TRUE, > o.fd.Channel.I.Securable.Verified=TRUE) yes > TRUST_FINISHED: this channel is over, nothing more should be sent or > received on it. > (o.fd.Channel.I.Securable.Encrypted and o.fd.Channel.I.Securable.Verified > keep their previous values?) I *think* (need to double check) that in that case you'll still be sending encrypted messages but the other side won't be able to decrypt them and will display a message "The encrypted message received from %s is unreadable, as you are not currently communicating privately.". > What are the possible state transitions? I assume "can only increase"? I think it can only increase unless the local user did something. Like it can go from PRIVATE to UNVERIFIED if user types "/otr untrust". It currently cannot go back to NOT_PRIVATE because I don't support ending the otr session, but could add a "/otr end" for that. pidgin can do that. > + type="(say)" access="read"> > +

User's current fingerprint. The first element is a human readable > + fingerprint that can be displayed to the user so he can communicate it > + to the other end by other means so he can trust it. The 2nd element is > + the fingerprint raw data.

> > Are these literally the hex and binary versions of the same digest, or do > they have different information content? (Or is the string version some > OTR-specific thing that is easier to transcribe than hex?) It is the same information, the string is utf8 (ascii even) to display, the ay is hex form (20 bytes, not utf8). libotr has a function to go hex->ascii but not ascii->hex and when TrustFingerprint is called I need to tell otr which fingerprint is trusted by telling it the hex form. That's why I send both over dbus. > + + tp:name-for-bindings="Fingerprint" > + type="(say)" access="read"> > + > > What value does this take when the channel is not using OTR? ('', [])? yep. > When we're in the UNVERIFIED state, am I right in thinking that we are > cryptographically guaranteed to have the right fingerprint for who we're > talking to, but the thing that is unverified is that the fingerprint belongs > to the person we wanted to talk to? (i.e. if we're talking to a > man-in-the-middle, this would be the fingerprint of the man-in-the-middle's > key, right?) That's how I understand it, yes. > Is it possible for this to change? (Presumably from ('', []) to non-empty, > at the same time that the trust changes to UNVERIFIED or PRIVATE?) when TrustLevel is UNVERIFIED the RemoteFingerprint cannot be empty. > After this has become non-empty, can it change further? (I would hope not.) I think it can if the user ends the OTR session, but I didn't implement that yet. I think if the other end stops the OTR session then trustlevel goes to FINISHED but you'll still be sending encrypted messages and the other side (pidgin-otr) will say "I received an encrypted messages, have no idea what it contains". Need to try that scenario to check. > I think it would also be useful to spec that one of the forms of the remote > fingerprint will appear in the message header (0'th part) of each individual > message, perhaps { "otr-remote-fingerprint": a string }. That would make it > easy for someone to do either of these things in a race-condition-free way: > > * record in the Logger that the messages were encrypted/verified > * give the Logger a configuration setting "[ ] do not log OTR messages" > (which it would recognize by seeing that they have an OTR remote > fingerprint Could be useful, atm the logger still record the conversation. It's a good idea to add that in the message parts. Do you consider that merge blocker? probably users expects their OTR messages to not be stored on disk. otoh if they really care about security and they don't have encrypted HDD I don't know what they are thinking about... (In reply to comment #59) > Implementation in Gabble: > > + /* FIXME: There should be no sender for a notification, but setting handle > to > + * 0 makes empathy crash atm. */ > + tp_message_mixin_take_received (G_OBJECT (self), > + tp_cm_message_new_text (base_conn, > + tp_base_channel_get_target_handle (base_chan), > + TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, text)); > > Is this a message from the OTR library, something like "*** Verified peer > fingerprint: