Marten Seemann
bb48c9b31a
pass the time a packet was received to the short header opener
...
This saves us one time.Now() syscall per received 1-RTT packet.
2019-08-11 13:33:02 +07:00
Marten Seemann
7b9b711a77
fix timing side channel when reading headers with invalid reserved bits
2019-06-30 15:57:03 +07:00
Marten Seemann
598628d05b
use separate opener interfaces for long and short header packets
2019-06-22 20:01:18 +08:00
Marten Seemann
d4d3f09ee3
use separate functions per encryption level to get openers
2019-06-22 20:01:18 +08:00
Marten Seemann
855b643c7c
move frame parsing to the session
...
This way, we can handle every parsed frame directly, and avoid
allocating a slice of parsed frames.
2019-01-03 18:53:36 +07:00
Marten Seemann
3fb58da7e6
Merge pull request #1707 from lucas-clemente/remove-raw-header
...
remove unnecessary Raw byte slice from the header
2019-01-03 18:39:45 +07:00
Marten Seemann
5a37e8983d
remove unnecessary Raw byte slice from the header
2019-01-03 10:14:08 +07:00
Marten Seemann
ba45256b32
check that the packet is large enough for the header encryption sample
2019-01-01 13:06:02 +07:00
Marten Seemann
6ce7a204fc
move cutting of packets with a length to the packet handler map
2019-01-01 09:50:35 +07:00
Marten Seemann
413844d0bc
use in-place decryption when opening packets
2018-12-30 12:41:41 +07:00
Marten Seemann
d6c304610d
only queue packets for decryption if the opener is not yet available
2018-12-20 15:24:56 +06:30
Marten Seemann
605846cfd8
don't queue a packet for later decryption of decryption already failed
...
This was an optimization in gQUIC, which relied on trial decryption. In
IETF QUIC, we know with certainty which keys were used to encrypt a
packet, so if decryption fails once, we are certain it will never
succeed.
2018-12-19 15:56:01 +06:30
Marten Seemann
a638185f97
apply header encryption when packing and unpacking packets
2018-12-14 21:34:00 +06:30
Marten Seemann
67f923c736
return the Opener from the crypto setup
2018-12-14 16:46:40 +06:30
Marten Seemann
03489f56a7
handle the packet length before parsing the extended header
2018-12-14 16:46:40 +06:30
Marten Seemann
aaea375fb6
move parsing of the extended header to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
c912860a94
don't explicitely pass the header binary to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
ce6b9f2f1d
save the decoded packet number on the unpacked packet
2018-12-14 16:46:40 +06:30
Marten Seemann
a8e5309cd1
move packet number decoding to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
aba2c3d031
remove all references to Public Resets in comments
2018-11-28 11:58:05 +07:00
Marten Seemann
bf96707f48
rename the wire.Header to ExtendedHeader
...
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
3ffea5d8c4
internalize the qerr package
2018-11-11 12:44:16 +07:00
Marten Seemann
2eed03c747
remove the header parameter for parsing frames
...
It was only needed for parsing STOP_WAITING frames.
2018-11-03 09:23:22 +07:00
Marten Seemann
90c538bae4
combine packetUnpackerBase and packetUnpacker
...
The split was only needed for unpacking gQUIC packets.
2018-11-02 18:30:33 +07:00
Marten Seemann
3266e36811
drop support for gQUIC
2018-10-30 10:20:39 +07:00
Marten Seemann
82508f1562
use tls-tris instead of mint
2018-10-26 16:18:49 +07:00
Marten Seemann
38efa84e9c
use in place decryption for unpacking packets
2018-04-04 14:56:45 +07:00
Marten Seemann
302d2a1715
don't use trial decryption for IETF QUIC
2018-03-31 14:29:44 +07:00
Marten Seemann
2fbc994d29
move the unencrypted STREAM frame check from the unpacker to the session
2018-03-31 14:29:44 +07:00
Marten Seemann
21b608daac
move frame parsing to the wire package
2018-03-25 18:07:44 +02:00
Marten Seemann
07b8821ef7
use pointer to byte slices in the buffer pool
...
https://staticcheck.io/docs/staticcheck#SA6002 suggests to use pointers
to objects in the sync.Pool.
2018-02-23 18:57:12 +08:00
Marten Seemann
de4157f9ad
implement parsing and writing of STREAM_ID_BLOCKED frames
2018-01-04 17:02:14 +07:00
Marten Seemann
5afe35328a
implement parsing and writing of MAX_STREAM_ID frames
2018-01-04 17:02:10 +07:00
Marten Seemann
2c83c9e3f0
don't send STOP_WAITING frames (for IETF QUIC)
2017-12-14 23:14:05 +07:00
Marten Seemann
69998c19cb
add the offset field to the BLOCKED and STREAM_BLOCKED frames
...
The value is not yet set, but parsing and writing works.
2017-12-14 19:00:06 +07:00
Marten Seemann
a6e44f3bfc
implement parsing and writing of the STOP_SENDING frame
2017-12-13 17:58:50 +07:00
Marten Seemann
d7ceebd644
implement parsing and writing of the new ACK frame
2017-12-08 09:35:55 +07:00
Marten Seemann
11f746a183
implement parsing and writing of the new STREAM frames
2017-12-08 09:20:47 +07:00
Marten Seemann
1a515d1371
implement the new variable integer length frame types
2017-12-08 09:18:54 +07:00
Marten Seemann
759b0d87b1
refactor packet unpacking
...
This replaces version.UsesMaxDataFrame by versoin.UsesIETFFrameFormat.
That way, we can have two separate code paths in the unpacker to unpack
either gQUIC frames or IETF frames.
2017-12-08 09:18:54 +07:00
Marten Seemann
9f1eb62860
implement the IETF draft BLOCKED and STREAM_BLOCKED frames
2017-11-04 15:22:14 +07:00
Marten Seemann
0f1f1c8d41
implement the MAX_DATA and MAX_STREAM_DATA frames
...
For gQUIC WINDOW_UPDATEs are converted to MAX_DATA and MAX_STREAM_DATA,
respectively.
2017-11-04 15:22:14 +07:00
Marten Seemann
ccb2e9a2df
remove check for CONGESTION_FEEDBACK in the packet unpacker
...
CONGESTION_FEEDBACK was reserved for future use in gQUIC, but has never
actually been implemented. It won't make it to IETF QUIC, so we don't
need to check for it. Note that we'd still reject a CONGESTION_FEEDBACK
frame, since we're rejecting any unknown frame type.
2017-11-04 15:22:14 +07:00
Marten Seemann
f662822486
use stream 0 for the crypto stream when using TLS
2017-11-04 15:22:07 +07:00
Marten Seemann
4556ad01e5
use the new packet header for connections using TLS
2017-10-27 16:54:47 +07:00
Marten Seemann
f1ada87dcf
make the protocol package internal
2017-08-30 00:19:44 +07:00
Marten Seemann
ed522ebbce
make wire an internal package
2017-08-29 23:51:56 +07:00
Marten Seemann
1794636220
more the PublicHeader to the wire package
2017-08-29 23:45:38 +07:00
Marten Seemann
88afad8722
rename package frames to wire
2017-08-29 23:27:15 +07:00
Marten Seemann
2d4b7726b2
pass the QUIC version to all frame parsing functions
2017-08-23 15:57:35 +07:00