3.1.5.8 Handling Session ACK Messages

The following sequence defines the required actions of the NfpService if a Session ACK message (section 2.2.10) is received on the transport link on the SessionID ChannelID of a specific Session object (section 3.1.1.4):

  1. If the Session object's State is not WaitingForAck, then this sequence MUST be aborted.

  2. Derive the SharedSecretKey using the SHA256 key derivation algorithm (see P256 curve in [NSA]) with the Session object's PrivateKey and PublicKey pair and the ECDHPublicKeyMagicNumber field of the received message.

  3. The TCP Port field of the received message is copied to the Session object.

  4. The RFCOMM Port field of the received message is copied to the Session object.

  5. The Session object's State moves to Ready.

  6. The Session object can be used by higher-level protocols to create connections to the peer.