[OTR-dev] OTR encryption state

Evan Schoenberg evan.s at dreskin.net
Thu Jan 27 16:20:23 EST 2005


(Sorry, Ian, I didn't initially see this at the bottom of the email it 
was within).

Ian wrote:

>  NEVER:  Pretend OTR isn't enabled at all for this user
In what context would this be useful?

>     ALWAYS: It is an error to send unencrypted data to this user.
>             If you try, you'll get a notify(ERROR) callback and
> 	    the message to be sent will be turned into an OTR Error
> 	    message that the other side will see.
With the addition of the message queuing described later, this would be 
good.  See below.

>     OPPORTUNISTIC: (the current mode) probe the other side with the
>                    whitespace tag, and reply to any indication that he
> 		   speaks OTR with a Key Exchange Message (if we're not
> 		   already private)
>
How does the "whitespace tag" work?  Do all contacts I speak with which 
don't have OTR receive an IM from me every time I start a chat?  This 
doesn't seem to be the case.. but it's the current mode.

>     MANUAL: Don't send the whitespace tag, and don't reply to one you
>             receive.  Respond to explicit OTR Query Messages and Key 
> Exchange
> 	    Messages, but not other indications of OTR.  This mode is
> 	    useful if you for some reason want to communicate in the
> 	    clear, even though you know the other guy speaks OTR, and
> 	    also allow either side to start a private conversation
> 	    at any time.  [If you don't want to allow that last
> 	    condition, use NEVER instead.]
This seems more like the current mode to me.  How would it differ from 
current behavior?

Given these possibilities, this is what I would set up... please see if 
this description matches the use you envision.

- In a messaging window, the user is presented with a visual indication 
of the current OTR state.  "Encrypted" vs. "Plaintext" basically.  This 
indicator offers a menu for toggling between the two states... "Start 
OTR session" / "End OTR session".  I guess "End OTR session" would be 
disabled in ALWAYS mode.  What happens in each of OPPORTUNISTIC and 
MANUAL modes when I select "End OTR session" ?

- In a preferences area for each contact, offer the following 
checkboxes (the second dependent upon the first being checked):
[ ] Automatically initiate encrypted OTR messaging
	[ ] Refuse unencrypted messages

The first corresponds to to OPPORTUNISTIC.  The second corresponds to 
ALWAYS (which is really a restricted version of OPPORTUNISTIC).


-Evan

On Jan 27, 2005, at 8:36 AM, Ian Goldberg wrote:

> Implementation-wise, what do you think of adding a callback that looks
> something like:
>
> OtrlMessagePolicy determine_policy(userstate, accountname, protocol,
> 				    username, context);
>
> which returns information about what OTR features should and should not
> be enabled for this context?  [pasted above]
>    - Ian




More information about the OTR-dev mailing list