SMB3.0 alternate channel

Stefan (metze) Metzmacher metze at samba.org
Thu Feb 14 06:52:19 MST 2013


Hi Arnab,

>   Was going through the smb2_key_derivation() function which generates the
> session->signingKey from the session->sessionKey. As per the MS_SMB2 spec
> section-3.1.4.2 page 130 the algorithm should be as specified
> in [SP800-108] section 5.1 i.e KDF in counter mode with PRF as HMAC-256.
> Also the [MS-SMB2] spec specifies a *'r'* value of 32 and 'L' value of 128.
> 
> In the Samba-4.0.3  implementation that I downloaded I could see the
> *'L'*value being defined but did not find the
> *'r*' value anywhere which is supposed to be the size of binary string
> representing the counter *'i'*.

	uint8_t buf[4];
...

        RSIVAL(buf, 0, i);
        hmac_sha256_update(buf, sizeof(buf), &ctx);
...

=>
sizeof(buf)*8 = 32

RSIVAL() fills buf with the 32-bit big endian representation of 'i'.

>     Can anybody please throw some light on this?..Also do you have any
> example values of session->sessionKey and session->signingKey using which
> this function was validated..

Ping me if you still need them.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20130214/592b4ce0/attachment.pgp>


More information about the samba-technical mailing list