ktls-core 0.0.0

Abstraction for implementing Linux kernel TLS (kTLS) offload in Rust.
Documentation
ktls-core-0.0.0 has been yanked.

ktls-core

Crates.io Docs.rs Code Coverage Test pipeline License: MIT OR Apache-2.0

Abstraction for implementing Linux kernel TLS (kTLS) offload in Rust.

Overview

This crate provides a low-level interface for setting up kernel TLS (kTLS) regardless of your preferred TLS library.

Implementation Guide

Setting up kTLS generally involves these steps:

  1. Creates a TcpStream (or something else like UnixStream).
  2. Configures the TLS User Level Protocol (ULP) on the stream.
  3. Performs the TLS handshake using your preferred TLS library over the stream.
  4. Creates the KtlsStream using the configured stream and crypto materials.

Then you can use the KtlsStream as a drop-in replacement of the original TcpStream.

Kernel Compatibility

Test pipeline

We perform daily CI tests against the following kernel versions:

Version
mainline
stable
6.6.x (LTS)
6.1.x (LTS)
5.15.x (LTS)
5.10.x (LTS)
5.4.x (LTS)

(For LTS kernels, we test against the latest patch version)

For examples and tests details, please refer to the ktls-tests.

License

Licensed under either of:

at your option.