| 1 |
Design |
| 2 |
====== |
| 3 |
|
| 4 |
Sans-IO APIs |
| 5 |
............ |
| 6 |
|
| 7 |
Both the QUIC and the HTTP/3 APIs follow the `sans I/O`_ pattern, leaving |
| 8 |
actual I/O operations to the API user. This approach has a number of |
| 9 |
advantages including making the code testable and allowing integration with |
| 10 |
different concurrency models. |
| 11 |
|
| 12 |
TLS and encryption |
| 13 |
.................. |
| 14 |
|
| 15 |
TLS 1.3 |
| 16 |
+++++++ |
| 17 |
|
| 18 |
``aioquic`` features a minimal TLS 1.3 implementation built upon the |
| 19 |
`cryptography`_ library. This is because QUIC requires some APIs which are |
| 20 |
currently unavailable in mainstream TLS implementations such as OpenSSL: |
| 21 |
|
| 22 |
- the ability to extract traffic secrets |
| 23 |
|
| 24 |
- the ability to operate directly on TLS messages, without using the TLS |
| 25 |
record layer |
| 26 |
|
| 27 |
Header protection and payload encryption |
| 28 |
++++++++++++++++++++++++++++++++++++++++ |
| 29 |
|
| 30 |
QUIC makes extensive use of cryptographic operations to protect QUIC packet |
| 31 |
headers and encrypt packet payloads. These operations occur for every single |
| 32 |
packet and are a determining factor for performance. For this reason, they |
| 33 |
are implemented as a C extension linked to `OpenSSL`_. |
| 34 |
|
| 35 |
.. _sans I/O: https://sans-io.readthedocs.io/ |
| 36 |
.. _cryptography: https://cryptography.io/ |
| 37 |
.. _OpenSSL: https://www.openssl.org/ |