2.2.1.3 CONNECTED_SIGNED

The CONNECTED_SIGNED packet is used to accept a connection request or complete a connection handshake when signing is enabled.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

bCommand

bExtOpCode

bMsgID

bRspId

dwCurrentProtocolVersion

dwSessID

tTimestamp

ullConnectSig

...

ullSenderSecret

...

ullReceiverSecret

...

dwSigningOpts

dwEchoTimestamp

bCommand (1 byte): The command-code bitmask that contains values that are combined by using the bitwise OR operation from the following table. The PACKET_COMMAND_CFRAME flag MUST be set. The PACKET_COMMAND_POLL flag MUST be set by a listener accepting a connection request and MUST NOT be set by a connector completing the connection handshake. All other bits MUST be set to zero and the packet MUST be ignored if they are not.

Value

Meaning

0x80

PACKET_COMMAND_CFRAME (command frame (CFRAME))

0x08

PACKET_COMMAND_POLL (acknowledge immediately)

bExtOpCode (1 byte): An extended operation code. It MUST be set to the following value:

Value

Meaning

0x03

FRAME_EXOPCODE_CONNECTED_SIGNED

bMsgID (1 byte): The message identifier. The initial value SHOULD be set to zero and SHOULD be incremented by connectors if the packet is retried. Listeners SHOULD choose to avoid keeping any state by using the ullConnectSig cookie and MAY always set this to 0.

bRspId (1 byte): The response identifier. This value MUST be set to the value of bMsgID field in the CONNECT or CONNECTED_SIGNED message to which this is a response.

dwCurrentProtocolVersion (4 bytes): The version number of the sender's DirectPlay 8 Protocol, in little-endian byte order, where the upper 16 bits are considered a major version number and the lower 16 bits are considered a minor version number. The major version number MUST be set to 0x0001; otherwise, the packet MUST be ignored. The minor version number SHOULD<3> be set to 0x0006 to indicate support for all features, including coalescence and signing, and MUST be set to 0x0005 or higher.

The recipient SHOULD be prepared to support older message formats used by earlier minor versions but MUST ignore this packet if it does not. To ensure security, the packet MUST be ignored if the recipient is using signing but the minor version number is less than 0x0006.

The recipient SHOULD be prepared to receive minor version numbers higher than what it implements and supplies in its own CONNECTED or CONNECTED_SIGNED message, but both sides MUST only use message formats compatible with the lower of their two version numbers.

Value

Meaning

0x00010000 — 0x00010004

Any protocol version number between 1.0 and 1.4 implements the base features.

0x00010005

Protocol version number 1.5 implements the base features, and adds support for coalescence.

0x00010006

Protocol version number 1.6 implements the base features, supports coalescence, and adds support for signing.

dwSessID (4 bytes): The session identifier. This value MUST be set to the value of dwSessID, as specified in the CONNECT or CONNECTED_SIGNED message to which this is a response.

tTimestamp (4 bytes): The sender's computer system tick count, in millisecond units, specified in little-endian byte order.

ullConnectSig (8 bytes): The listener cookie used to validate the connect handshake without keeping state. Connectors MUST echo the value specified in the CONNECTED_SIGNED message to which this is a response. Listeners MAY specify any value and SHOULD generate one that can be used to verify that the connector saw the listener's CONNECTED_SIGNED message. For more information, see section 3.1.5.1.3.

ullSenderSecret (8 bytes): The initial value for generating signatures on packets sent by the connector to the listener, in little-endian byte order. This MUST be set to zero when sent by the listener and MUST be nonzero when sent by the connector. Connectors SHOULD generate a cryptographically-secure random number.

ullReceiverSecret (8 bytes): The initial value for generating signatures on packets sent by the listener to the connector, in little-endian byte order. This MUST be set to zero when sent by the listener and MUST be nonzero when sent by the connector. Connectors SHOULD generate a cryptographically-secure random number.

dwSigningOpts (4 bytes): Option flag values, in little-endian byte order. One or the other described flag MUST be set but not both. All other bits SHOULD be set to zero when sent and MUST be ignored on receipt.

Value

Meaning

0x00000001

PACKET_SIGNING_FAST (use signing cookie only)

0x00000002

PACKET_SIGNING_FULL (sign a digest of packet contents)

dwEchoTimestamp (4 bytes): If this message is a response to a CONNECT message, the value of this field MUST be set to zero. Otherwise, if this message is a response to another CONNECTED_SIGNED message, then dwEchoTimestamp MUST be set to the value of the tTimestamp field in the CONNECTED_SIGNED message that was received.