aboutsummaryrefslogtreecommitdiff
path: root/net/bluetooth/smp.c
AgeCommit message (Collapse)AuthorFilesLines
2011-06-14Bluetooth: Add key size checks for SMPVinicius Costa Gomes1-13/+41
This patch implements a check in smp cmd pairing request and pairing response to verify if encryption key maximum size is compatible in both slave and master when SMP Pairing is requested. Keys are also masked to the correct negotiated size. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-14Bluetooth: Add support for SMP timeoutVinicius Costa Gomes1-0/+14
This patch adds support for disconnecting the link when SMP procedure takes more than 30 seconds. SMP begins when either the Pairing Request command is sent or the Pairing Response is received, and it ends when the link is encrypted (or terminated). Vol 3, Part H Section 3.4. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add support for Pairing features exchangeVinicius Costa Gomes1-53/+53
This patch implements a simple version of the SMP Pairing Features exchange procedure (Vol. 3 Part H, Section 2.3.5.1). For now, everything that would cause a Pairing Method different of Just Works to be chosen is rejected. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add support for building pairing commandsVinicius Costa Gomes1-0/+11
Before we are able to do a proper exchange of pairing parameters, we need a unified way of building pairing requests and responses. For IO Capability we use the value that was set by userspace, using the management interface. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add support for resuming socket when SMP is finishedVinicius Costa Gomes1-12/+28
This adds support for resuming the user space traffic when SMP negotiation is complete. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Remove debug statementsVinicius Costa Gomes1-5/+1
Now that these commands are sent to the controller we can use hcidump to verify that the correct values are produced. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add support for LE Start EncryptionVinicius Costa Gomes1-4/+12
This adds support for starting SMP Phase 2 Encryption, when the initial SMP negotiation is successful. This adds the LE Start Encryption and LE Long Term Key Request commands and related events. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add SMP confirmation checks methodsAnderson Briglia1-14/+83
This patch includes support for generating and sending the random value used to produce the confirmation value. Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add SMP confirmation structsAnderson Briglia1-0/+17
This patch adds initial support for verifying the confirmation value that the remote side has sent. Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add LE SMP Cryptoolbox functionsAnderson Briglia1-0/+117
This patch implements SMP crypto functions called ah, c1, s1 and e. It also implements auxiliary functions. All These functions are needed for SMP keys generation. Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Anderson Lizardo <[email protected]> Signed-off-by: Bruna Moreira <[email protected]> Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add support for using the crypto subsystemVinicius Costa Gomes1-4/+18
This will allow using the crypto subsystem for encrypting data. As SMP (Security Manager Protocol) is implemented almost entirely on the host side and the crypto module already implements the needed methods (AES-128), it makes sense to use it. There's now a new module option to enable/disable SMP support. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Add simple SMP pairing negotiationAnderson Briglia1-5/+102
This implementation only exchanges SMP messages between the Host and the Remote. No keys are being generated. TK and STK generation will be provided in further patches. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
2011-06-13Bluetooth: Implement the first SMP commandsAnderson Briglia1-0/+146
These simple commands will allow the SMP procedure to be started and terminated with a not supported error. This is the first step toward something useful. Signed-off-by: Vinicius Costa Gomes <[email protected]> Signed-off-by: Anderson Briglia <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>