how to generate keystream segment for SRTP header

Yogesh Devidas Patil <[email protected]> Tue, 28 Jul 2009 20:36:50 +0530
Newsgroups gmane.comp.gnu.ccrtp.devel
Message-ID <AD02B5788E03E64CBFD8B3DBD30BC03C0AC997@GUREXMB02.ASIAN.AD.ARICENT.COM>
Hi
I am implementing SRTP and have  little confusion about it.

as per my understanding of SRTP RFC3711,
Initialization vector(IV) is generated as

IV =3D (salt_key << 16) XOR (SSRC << 64) XOR (packet_index << 16)

and  keystream segment (required for AES ICM ) is generated as

Keystream_seg =3D E(k,IV) where k=3DSession key
i.e Keystream_seg =3D k XOR IV

is my understanding correct wrt SRTP standard??

Wherein AES ICM RFC3686, keystream segment consists
keystream_seg =3D NONCE || IV || Counter where Counter advances from initia=
l val=3D0.

I mean how to relate these keystream_seg forming units in AES ICM(NONCE,IV,=
Counter) with SRTP header fields & fields computed from them??

Second, how should i generate Master Key on sender side??And how to derive =
session keys from Master Key??

Thanks in advance!!


Regards
Yogesh Patil

A R I C E N T

"DISCLAIMER: This message is proprietary to Aricent and is intended solely =
for the use of the individual to whom it is addressed. It may contain privi=
leged or confidential information and should not be circulated or used for =
any purpose other than for what it is intended. If you have received this m=
essage in error,please notify the originator immediately. If you are not th=
e intended recipient, you are notified that you are strictly prohibited fro=
m using, copying, altering, or disclosing the contents of this message. Ari=
cent accepts no responsibility for loss or damage arising from the use of t=
he information transmitted by this email including damage from virus."