_alice_otr_session_manager.EncryptMessage(_my_buddy_unique_id, message_string)
#OTR PIDGIN DOWNLOAD CODE#
Similarly, to retrieve the Finger Print of your buddy call the GetMyBuddyFingerPrint function.Ĭopy Code /* Encrypt and send a message to Bob */ /* Assume that message_string is the message to be encrypted and sent to bob*/
To retrieve your Finger Print in hexadecimal string call the GetSessionDSAFingerPrint function. The Finger Print is computed using the DSA public key parameters (i.e., P, Q, G and Y) as input. The OTR specification defines an object called a Finger Print. It returns a DSAKeyParams object that contains the P, Q, G and X elements of the key. Your current DSA key can be gotten by calling GetSessionDSAHexParams function. See the accompanying OTRLibTest console application for examples on how this is accomplished. If the client doesn’t have a DSA key, a random one is created by this library. The DSA key parameters must be formatted as a DSAKeyParams objectīefore it is passed to the function in question. I.e., P, Q, G and X to the CreateOTRSession function. If the client already has a DSA key, then the client can pass the DSA public and private key parameters OTR uses Digital Signature Algorithm (DSA) public keys as part of the authentication and SMP processes. The GetSupportedOTRVersionList static function of the OTRSessionManager. The versions supported by this library are contained in a string list that can be accessed by calling This Library supports versions 2 and 3 of the OTR protocol. Requesting an OTR session involves calling the RequestOTRSession function and passing it your buddy’s ID and In other words, your buddy’s unique ID doubles as Once this is done, references to a session are achieved using this unique ID. See the OTR Event section for a description of these event types.Įach OTR session established for the buddies you are communicating with must be created using the unique ID of that buddy. It must be connected to the OTR event handler. As soon as the OTR manager is initialized, Observe that the OTR session manager is initialized using your unique ID. _alice_otr_session_manager.RequestOTRSession(_my_buddy_unique_id, OTRSessionManager.GetSupportedOTRVersionList()) _alice_otr_session_manager.CreateOTRSession(_my_buddy_unique_id) _alice_otr_session_manager.OnOTREvent += new OTREventHandler(OnAliceOTRMangerEventHandler) _alice_otr_session_manager = new OTRSessionManager(_my_unique_id) * Create OTR session and Request OTR session */ OTRSessionManager _alice_otr_session_manager = null The code below shows how Alice goes about requesting an OTR session. In order to do this she has to request an OTR session from Bob and on receipt of this request Bob starts the OTR session proper. Let’s assume that Alice wants to establish an OTR session with her friend, Bob. The failure of the SMP process is an indication that the encrypted session between you and your chat partner has been hijacked by a third party. In addition to the above, the OTR also defines a Socialist Millionaire Protocol (SMP) that could be used to detect a man-in-the-middle attack during an ongoing conversation.įor the SMP process to successfully complete, you and your chat buddy must have a secret that is known to just you and him/her. Keys (including your chat partner) and therefore forged a message. That since these keys are in the public domain any one could have created these Used and will not be used again are included in outgoing messages.
#OTR PIDGIN DOWNLOAD MAC#
#OTR PIDGIN DOWNLOAD ANDROID#
I needed an OTR library in C# that I could use for instant messaging clients that run on the Windows, Linux and Android platforms but I couldn’t find any.