akwizgran created page: ForumApp

akwizgran
2015-04-17 14:18:49 +00:00
parent 616086790a
commit d9df06ef2e

@@ -36,35 +36,37 @@ Each device starts by generating a fresh ephemeral key pair (pri, pub). The comm
### QR codes ### QR codes
Each device creates a QR code with a binary payload. The payload is encoded using Base32, as defined in [RFC 4648](https://tools.ietf.org/html/rfc4648), and the QR code uses alphanumeric mode. The first byte of the binary payload is the protocol version, which is 1 for the current version of BQP. The next COMMIT_LEN bytes of the payload are the public key commitment. The remainder of the payload consists of zero or more transport descriptors. Each device creates a QR code with a binary payload, which is encoded using Base32, as defined in [RFC 4648](https://tools.ietf.org/html/rfc4648). The QR code uses alphanumeric mode. The binary payload is a [BDF](BDF) list with three or more elements. The first element is the protocol version (int). The second element is the public key commitment (raw). The remaining elements are transport descriptors.
The protocol version is 1 for the current version of BQP.
### Transport descriptors ### Transport descriptors
A transport descriptor describes how to connect to a device over a short-range transport. Each descriptor starts with a two-byte header. The first byte identifies the transport, the second gives the number of fields in the descriptor. Each field consists of a single byte giving the length of the value in bytes, followed by the value. A transport descriptor describes how to connect to a device over a short-range transport. Each descriptor is a BDF list with two or more elements. The first element is the transport identifier (int). The remaining elements are the fields of the descriptor.
The following transports have been defined: The following transports have been defined:
**0: Bluetooth** - The device registers a Bluetooth service to accept RFCOMM connections. The service UUID is generated by converting the first 16 bytes of the device's public key commitment into a UUID as specified in section 4.4 of [RFC 4122](https://tools.ietf.org/html/rfc4122). The descriptor contains one field: **0: Bluetooth** - The device registers a Bluetooth service to accept RFCOMM connections. The service UUID is generated by converting the first 16 bytes of the device's public key commitment into a UUID as specified in section 4.4 of [RFC 4122](https://tools.ietf.org/html/rfc4122). The descriptor contains one field:
* The device's Bluetooth MAC address (6 bytes) * The device's Bluetooth MAC address (raw)
**1: LAN** - The device connects to a local area network and opens a port to accept TCP connections. The descriptor contains two fields: **1: LAN** - The device connects to a local area network and opens a port to accept TCP connections. The descriptor contains two fields:
* The device's link-local or site-local IPv4 or IPv6 address (4 or 16 bytes) * The device's link-local or site-local IPv4 or IPv6 address (raw)
* The port number as a 16-bit integer (2 bytes) * The port number (int)
**2: Wi-Fi** - The device connects to a Wi-Fi network and opens a port to accept TCP connections. The descriptor contains three fields: **2: Wi-Fi** - The device connects to a Wi-Fi network and opens a port to accept TCP connections. The descriptor contains three fields:
* The device's link-local or site-local IPv4 or IPv6 address (4 or 16 bytes) * The device's link-local or site-local IPv4 or IPv6 address (raw)
* The port number as a 16-bit integer (2 bytes) * The port number (int)
* The SSID of the network (variable length) * The SSID of the network (string)
**3: Wi-Fi Direct** - The device creates a Wi-Fi Direct legacy mode access point and opens a port to accept TCP connections. The descriptor contains four fields: **3: Wi-Fi Direct** - The device creates a Wi-Fi Direct legacy mode access point and opens a port to accept TCP connections. The descriptor contains four fields:
* The device's link-local or site-local IPv4 or IPv6 address (4 or 16 bytes) * The device's link-local or site-local IPv4 or IPv6 address (raw)
* The port number as a 16-bit integer (2 bytes) * The port number (int)
* The SSID of the access point (variable length) * The SSID of the access point (string)
* The password of the access point (variable length) * The password of the access point (string)
New transports may be defined in future without incrementing the protocol version. Devices must ignore any transports they do not recognise. New transports may be defined in future without incrementing the protocol version. Devices must ignore any transports they do not recognise.