Marten Seemann
d4d3f09ee3
use separate functions per encryption level to get openers
2019-06-22 20:01:18 +08:00
Marten Seemann
28ed85b9c6
move cutting of coalesced packets to the wire package
2019-02-23 10:24:42 +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
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
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
bf96707f48
rename the wire.Header to ExtendedHeader
...
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
c37b698f68
Merge pull request #1596 from lucas-clemente/internalize-errors
...
internalize the qerr package
2018-11-12 15:54:39 +07:00
Marten Seemann
3ffea5d8c4
internalize the qerr package
2018-11-11 12:44:16 +07:00
Marten Seemann
387613aa20
rename the BLOCKED from to DATA_BLOCKED
2018-11-10 09:05:06 +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
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
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
40650d93f0
add an application-defined error type, for RST_STREAM and STOP_SENDING
2017-12-15 16:21:09 +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
aba1dd13ba
only use little endian byte order for gQUIC 37 and 38
...
That way, when adding new non-gQUIC versions, they will use big endian.
2017-11-02 16:46:22 +07:00
Marten Seemann
4f86995e48
encrypt unprotected packets with a connection-dependent key
2017-10-27 17:35:08 +07:00
Marten Seemann
4556ad01e5
use the new packet header for connections using TLS
2017-10-27 16:54:47 +07:00
Marten Seemann
e729701a94
drop support for version 36
2017-09-25 20:07:34 +07:00
Marten Seemann
e603715949
make handshake and crypto internal packages
2017-09-21 11:52:21 +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
3c223b22a2
include peer perspective in nullAEAD
...
ref #375
2017-04-27 18:05:24 +07:00
Marten Seemann
2903f9b238
return a lambda to for sealing a packet in the CryptoSetup
2017-03-22 16:52:00 +07:00
Marten Seemann
28c115fee1
drop support for QUIC 34
...
fixes #368
2017-03-19 20:57:28 +07:00
Marten Seemann
0c20f5e9b3
return the encryption level used for Sealing
2017-02-25 08:27:14 +07:00
Marten Seemann
a97faf0bea
reject unencrypted stream data on all streams except stream 1
...
fixes #440
2017-02-25 08:27:14 +07:00