Dieser Artikel ist älter als zwei Jahre und womöglich veraltet!

Was die NSA im HTTP/2 connection preface macht

Der Verbindungaufbau mit HTTP/2 unterscheidet sich in großen Teilen von dem bisher mit HTTP/1.1 verwendeten Vorgang. Bei cleartext Verbindungen wird das HTTP upgrade Verfahren benutzt und bei verschlüsselten Verbindungen werden bestimmte Werte innerhalb des TLS Handshakes übertragen.

Was beide Arten der Verbindung gemeinsam haben: Bevor wirklich Anwendungsdaten fließen können, muss von jedem der Teilnehmer ein sogenannter Preface verschickt werden. Ein kleines Datenpaket, das Parameter für die Verbindung festlegt. Und genau in diesem Preface findet sich Kritik an den Überwachungsprogrammen der NSA.

In HTTP/2, each endpoint is required to send a connection preface as a final confirmation of the protocol in use and to establish the initial settings for the HTTP/2 connection. The client and server each send a different connection preface.

The client connection preface starts with a sequence of 24 octets, which in hex notation is:

0x505249202a20485454502f322e300d0a0d0a534d0d0a0d0a

That is, the connection preface starts with the string “PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n”). This sequence MUST be followed by a SETTINGS frame (Section 6.5), which MAY be empty. The client sends the client connection preface immediately upon receipt of a 101 (Switching Protocols) response (indicating a successful upgrade) or as the first application data octets of a TLS connection. If starting an HTTP/2 connection with prior knowledge of server support for the protocol, the client connection preface is sent upon connection establishment.

Ich habe zwar erst kürzlich ein Paper zu HTTP/2 geschrieben, mir ist aber auch nicht aufgefallen, dass da “Prism” steht. Der commit ist von 14. Juni 2013 und hat anscheinend auch den Autoren viel Spaß gemacht.

Gefunden wurde dieser kleine Spaß von John Graham-Cumming und dann auf Hackernews bekannt gemacht.