• Johan Hedberg's avatar
    Bluetooth: Update LTK lookup to correctly deal with SC LTKs · 5378bc56
    Johan Hedberg authored
    LTKs derived from Secure Connections based pairing are symmetric, i.e.
    they should match both master and slave role. This patch updates the LTK
    lookup functions to ignore the desired role when dealing with SC LTKs.
    
    Furthermore, with Secure Connections the EDiv and Rand values are not
    used and should always be set to zero. This patch updates the LTK lookup
    to first use the bdaddr as key and then do the necessary verifications
    of EDiv and Rand based on whether the found LTK is for SC or not.
    Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
    Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
    5378bc56
hci_core.c 133 KB