Re: MD5 Hash of SIP SDP when QOP=auth-int

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

 



kotnees wrote:
Dear all,

This is the SDP from my GW,

Content-Length: 209

v=0
o=CiscoSystemsSIP-GW-UserAgent 8228 4523 IN IP4 9.13.38.50
s=SIP Call
c=IN IP4 9.13.38.50
t=0 0
m=audio 18368 RTP/AVP 0 19
c=IN IP4 9.13.38.50
a=rtpmap:0 PCMU/8000
a=rtpmap:19 CN/8000
a=ptime:20

I need to caculate MD5 hash of Entity body thro TCL/Unix API and compare
it with what my GW generates.The GW generates it as,

H(entity-msg)= 7e926cfa696deb5a1e40ee4ed8ad81d1

The following online tool(http://md5-hash-online.waraxe.us/) also
generates it as 7e926cfa696deb5a1e40ee4ed8ad81d1.

I am using a windows based MD5 commandline tool used like this md5
filename = 7e926cfa696deb5a1e40ee4ed8ad81d1.

So my GW and two of the tools are generating the same value.The issue
here is, I need to do this in UNIX commandline or using TCL Lib

so when i use same SDP in unix Environment using MD5sum or TCL lib
md5::md5 -hex -file filename or md5::md5 -hex "string".The Hash i get is
always different from that of ONLINE TOOL and windows based TOOL.The o/p
of Unix MD5sum and TCLLib MD5 api are always same.

Pls advice what am I missing UNIX why its not matchig with windows based
on Online TOOL.

On Windows, lines are terminated by CRLF (\r\n); in Unix, LF (\n) does
the same job.  So you are probably caught in the midst of the
remnants of this age-old debate on how to terminate lines.

To make sure, on Linux, do an "od -c filename" and you will see that
every line is terminated by \n.  Putting this through openssl md5
command will give you the hash 055481e002c9d36d1e0a4901178ecfa7,
which is probably what you are getting in a Unix environment.

SIP requires that all lines be terminated by CRLF regardless of
the platform serializing the messages.

- vijay
--
Vijay K. Gurbani, Bell Laboratories, Alcatel-Lucent
1960 Lucent Lane, Rm. 9C-533, Naperville, Illinois 60566 (USA)
Email: vkg@{alcatel-lucent.com,bell-labs.com,acm.org}
WWW:   http://www.alcatel-lucent.com/bell-labs

_______________________________________________
Sipping mailing list  https://www.ietf.org/mailman/listinfo/sipping
This list is for NEW development of the application of SIP
Use sip-implementors@xxxxxxxxxxxxxxx for questions on current sip
Use sip@xxxxxxxx for new developments of core SIP

[Index of Archives]     [IETF Announce]     [IETF Discussion]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Big List of Linux Books]

  Powered by Linux