Re: [RFCv2 14/20] Bluetooth: AMP: Add AMP key calculation

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

 



Hi Gustavo,

On Tue, Jul 24, 2012 at 06:29:44PM -0300, Gustavo Padovan wrote:
> > +
> > +	hexdump(keybuf, HCI_AMP_LINK_KEY_SIZE);
> 
> Is these hex prints worthwhile? Seems kind expensive, right?

Yes, I will remove this print.

> > +	result = hmac_sha256(keybuf, HCI_AMP_LINK_KEY_SIZE, "gamp", 4,
> > +			     gamp_key);
> > +	hexdump(gamp_key, HCI_AMP_LINK_KEY_SIZE);
> > +
> > +	if (result)
> > +		goto done;
> > +
> > +	if (conn->key_type == 3) {
> > +		BT_DBG("gamp_key");
> > +		hexdump(gamp_key, HCI_AMP_LINK_KEY_SIZE);
> > +		memcpy(data, gamp_key, HCI_AMP_LINK_KEY_SIZE);
> > +		goto done;
> > +	}
> > +
> > +	result = hmac_sha256(gamp_key, HCI_AMP_LINK_KEY_SIZE, "802b", 4,
> > +			     b802_key);
> 
> Can't you pass data directly here, instead of b802_key? This could avoid an
> extra memcpy.

Yes, will do this way.

Best regards 
Andrei Emeltchenko 

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux