linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] patch to add zrtp-hash support to linphone - u


From: Werner Dittmann
Subject: Re: [Linphone-developers] patch to add zrtp-hash support to linphone - updated ZRTP library
Date: Tue, 26 Mar 2013 09:51:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

A ew ZRTP version is ready in Github that supports protocol version negotiation
function described in RFC6189, section 4.1.1.

This is necessary because we may see some updates to the ZRTP protocol handling
and this will require a new protocol version. The protocol negotiation provides
interoperability between old and new ZRTP protocol versions. The drawback here 
is
that these new features added some interface changes, albeit just a few one.

According to RCF6189 each supported ZRTP version requires an own zrtp-hash 
attribute
in SDP. Thus I added a function to get the number of supported versions and 
extended
the function that reads the hello-hash to accept an index.

The new function to get the number of supported versions:

     /**
      * Get number of supported ZRTP protocol versions.
      *
      * @param zrtpContext
      *    Pointer to the opaque ZrtpContext structure.
      *
      * @return the number of supported ZRTP protocol versions.
      */
     int32_t zrtp_getNumberSupportedVersions(ZrtpContext* zrtpContext);

I did a quick check of the patches that Eli did and IMHO the Linphone function
  ortp_zrtp_get_hello_hash(...)
needs to be called in a loop, similar to (pseudo code):

...
int32_t index = zrtp_getNumberSupportedVersions(ZrtpContext* zrtpContext);
for (int i = 0; i < index; i++) {
   ortp_zrtp_get_hello_hash(ctx, version, version_len, hello_hash, 
hello_hash_len, index);
   add sdp attribute(hello_hash);
}
...

To get this working the existing ortp_zrtp_get_hello_hash() needs a new 
parameter that
carries the index. zrtp_getHelloHash(ZrtpContext* zrtpContext, int32_t index) 
requires
this index to get to correct hello hash string.

I would recomend to move to the new ZRTP core lib and apply the proposed 
enhacments to
the Linphone code. For the time being only one ZRTP protocol version is active 
and thus
this library is interoperable with older ZRTP libraries.


Werner

Am 15.02.2013 22:52, schrieb Eli Burke:
> With some assistance from Werner Dittmann and Guillaume Beraudo, I've created 
> patches to add zrtp-hash support to Linphone. At present this will add the 
> hash of the ZrtpHello message to outgoing SDP messages but will not verify an 
> incoming hash. Assuming the patches are accepted I'll add support for 
> verification as well.
> 
> These patches (one to Linphone and one to its oRTP submodule) will allow 
> Linphone to use ZRTP when connected to Freeswitch in proxy-media mode. 
> Freeswitch contains special case logic that looks for the 'zrtp-hash' 
> attribute in the SDP media definition of two clients and assigns the same 
> SSRC to each channel. Without it, ZRTP fails because the SSRC gets changed 
> and the internal packet hash will not match.
> 
> To the linphone developers: I've tried to match your style and coding 
> standards to the best of my ability, but if there are any problems, please 
> let me know. There are brief comments attached to most of the changes but I 
> can expand upon them, or if you wish to make modifications I'd be happy to 
> test them.
> 
> -Eli
> 
> 
> 
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/linphone-developers
> 


-- 
----------------------------------------------
Werner Dittmann    address@hidden
Tel +49 173 44 37 659
PGP key: 82EF5E8B



reply via email to

[Prev in Thread] Current Thread [Next in Thread]