Dear All,

I have a question on forming of MESSAGE-INTEGRITY header for STUN Bind
request and STUN Bind Response. ICE username and password are exchanged
using SIP offer/answer model.

Offer from ICE Full Client (say Client IFC)
=============================================
v=0
o=UE1 970829 970829 IN IP4 10.199.103.2
s=-
c=IN IP4 10.199.103.2
b=AS:80
b=TIAS:64000
t=0 0
m=audio 27000 RTP/AVP 0
b=RS:0
b=RR:0
a=rtpmap:0 PCMU/8000
a=ptime:20
a=sendrecv
a=ice-pwd:asdfghjklpoiuytrewqasd
a=ice-ufrag:8hhy
a=candidate:1 1 UDP 2130706431 10.199.103.2 3478 typ host
a=candidate:2 1 UDP 1694498815 10.199.103.2 3479 typ srflx raddr
10.199.103.2 rport 3479
a=candidate:3 1 UDP 16777215 10.199.103.2 27000 typ relay raddr
10.199.103.2 rport 27000

Answer from ICE Lite Client (say  ILC)
============================
v=0
o=sip 186828262 109337344 IN IP4 10.199.74.52
s=-
i=Audio/Fax Session
c=IN IP4 10.199.74.52
b=AS:80
b=TIAS:64000
t=0 0
a=ice-lite
a=maxprate:50.0
m=audio 22036 RTP/AVP 0
b=AS:80
b=TIAS:64000
a=rtpmap:0 PCMU/8000
a=maxprate:50.0
a=ptime:20
a=sendrecv
a=ice-ufrag:/iUD
a=ice-pwd:bHsngceY6C9735cwqC6PTe
a=candidate:1 1 UDP 2130706431 10.199.74.52 22036 typ host
a=candidate:1 2 UDP 2130706430 10.199.74.52 22037 typ host

I want to know which password (as we have two password one from client IFC
and other from client ILC)
will be used for forming of MESSAGE-INTEGRITY header of STUN Bind request
and response. Client IFC
will be sending STUN bind request and client ILC will be replying with STUN
bind response.

STUN Bind/Request is as follows
===============================

Sent from IP|Port=10.199.103.2|27000
To IP|Port=/10.199.74.52:22036
Sequencer=19
Transport=UDP
[STUN BindingRequest messageType[0x00 0x01 ]
 length=[116]
 transactionID=[0x21 0x12 0xa4 0x42 0x0d 0x54 0xa9 0x78 0x68 0xd7 0x57 0x9a
0x00 0x00 0x00 0x00 ] and 6 attributes.
   USERNAME=[0x00 0x06 ] valueLen=[9] value=[/iUD:8hhy] padding=[3]
   ICE-CONTROLLING=[0x80 0x2a ] valueLen=[8] value=[-119239875] padding=[0]
   PRIORITY=[0x00 0x24 ] valueLen=[4] value=[2130706431] padding=[0]
   PASSWORD=[0x00 0x07 ] valueLen=[22] value=[bHsngceY6C9735cwqC6PTe]
padding=[2]
   MESSAGE-INTEGRITY=[0x00 0x08 ] valueLen=[20] value=[0xe0 0xe0 0x54 0x88
0xf4 0x99 0xc8 0xfa 0xef 0x55 0xae 0x92 0xcb 0x49 0xa9 0x63 0xbf 0xde 0xf8
0x20 ] padding=[0]
   FINGERPRINT=[0x80 0x28 ] valueLen=[4] value=[0x78 0x1e 0x02 0x91 ]
padding=[0]
]
INFO  FSM (STUN1) - State (HostCandidate) sent event (BindingRequest)
sequencer=19.
INFO  >>>>> RX: Length = 64
Received on IP|Port=10.199.103.2|27000
>From IP|Port=10.199.74.52|22036
Sequencer=20
Transport=UDP
[STUN BindingResponse messageType[0x01 0x01 ]
 length=[64]
 transactionID=[0x21 0x12 0xa4 0x42 0x0d 0x54 0xa9 0x78 0x68 0xd7 0x57 0x9a
0x00 0x00 0x00 0x00 ] and 3 attributes.
   XOR-MAPPED-ADDRESS=[0x00 0x20 ] valueLen=[8]
  IPv4 Address [1]
  address=[/10.199.103.2]
  port=[27000]
  value=[0x00 0x01 0x48 0x6a 0x2b 0xd5 0xc3 0x40 ]
   MESSAGE-INTEGRITY=[0x00 0x08 ] valueLen=[20] value=[0x5b 0x29 0xe9 0x54
0x76 0x04 0x7d 0x56 0x9d 0xb2 0x31 0x95 0x97 0x1e 0xe0 0x3d 0x90 0x48 0x17
0x52 ] padding=[0]
   FINGERPRINT=[0x80 0x28 ] valueLen=[4] value=[0x58 0x47 0xcf 0xd8 ]
padding=[0]
]

Thanks & Regards
Sachin Rastogi
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to