Post
Evolution of TLS Acceleration: From User-Space to Smart NIC Offloads
Comparing six generations of TLS acceleration — from early user-space approaches like OpenSSL CLI hacks to modern in-NIC TLS offload with Kernel TLS and QUIC.
By Codemia • August 26, 2025
7 min read
Transport Layer Security (TLS) has come a long way in performance optimization. This post explores six “generations” of TLS acceleration, from classic user-space handling to modern NIC offloads. We’ll examine each approach’s architecture, example usage, and performance characteristics, including benchmarks (throughput, latency, CPU) and how recent NIC-based offloads cut TLS handshake CPU costs by up to ~80%. Diagrams illustrate the data path evolution, showing how system call overhead, memory copies, and crypto operations have shifted over time.
1. User-Space TLS in Software (OpenSSL in Userspace)
In the early days, TLS (or SSL) was handled entirely in user space by libraries like OpenSSL, GnuTLS, etc. Applications would perform the TLS handshake and record-layer encryption/decryption in user-space code. The kernel’s role was minimal – it only saw opaque encrypted data over a TCP socket, unaware of TLS protocol details. All cryptographic operations (both the expensive asymmetric handshake and the bulk symmetric encryption) ran on the host CPU in user context.

User-space TLS (software-only): The host CPU handles TCP and all TLS “Security Protocols” in software, leaving fewer CPU resources for the application.
Architecture & Data Path: In this model, every TLS read/write involves multiple user-kernel context switches and data copies. For example, a web server using OpenSSL would read cleartext from a file into user memory, call OpenSSL to encrypt it, then write() encrypted bytes to the socket. The kernel would copy data from user-space buffers to kernel socket buffers and send it out. On receiving data, the reverse happens: the kernel delivers ciphertext to user space, OpenSSL decrypts it, etc. Each TLS record incurs a copy and context switch. This overhead adds up, especially for small records or many connections. A simple comparison:
- Without TLS: Sending data might use one sendfile() or write() call (one context switch, minimal copy).
- With user-space TLS: The same data might require a read() (file -> user buffer) + encryption (user buffer -> new buffer) + write() (buffer -> kernel), i.e. two syscalls and an extra data copy.
Example Usage: A classic setup is running openssl s_server or using OpenSSL’s SSL API in an application. For instance, a C program might do:
All encryption happens in these SSL calls on the CPU. Tools like Stunnel (SSL tunneling proxy) also exemplify user-space TLS termination.
Performance Characteristics: User-space TLS is simple but can be CPU-intensive. The asymmetric cryptography in a full TLS handshake (RSA or ECC key exchange, certificate signature verification) is the most expensive part. Studies have shown handshakes can consume 30–40% of CPU capacity for edge servers at peak load. Each new connection incurs hundreds of milliseconds of latency for handshake round-trips and heavy CPU work (e.g. RSA decryption), which limits connection-per-second rates. For example, with 2048-bit RSA, a single core might handle on the order of only ~1000 handshakes/sec. In contrast, once a session is established, symmetric encryption (AES, ChaCha20) per record is much faster (often hardware-accelerated via AES-NI instructions on modern CPUs). The per-byte overhead for encryption can be low (AES-GCM can achieve multiple gigabits per second per core), so bulk data throughput is less of a concern than handshake or context-switch overhead.
However, doing TLS in user space still adds non-trivial overhead to bulk data transfer due to extra data copies and syscalls. One empirical analysis noted that enabling TLS/SSL (versus unencrypted HTTP) can reduce a server’s throughput or increase CPU usage noticeably – although with AES-NI, encryption of the bulk data is relatively cheap, the record packaging and kernel/user transitions introduce overhead. Cloudflare reported that repeated full handshakes are a “hidden tax” on performance, often requiring over-provisioning of servers. In practice, TLS software overhead for established connections might use ~1–10% CPU per connection (depending on traffic), but at scale, this is significant.
Optimizations in this Era: Even within user-space TLS, there were improvements. Session reuse (TLS resumption) cuts out the expensive public-key operations on subsequent connections, saving as much as 65–80% of handshake CPU cost by using symmetric keys from a previous session. TLS 1.3 also reduced the number of round-trips and streamlined handshakes to 1-RTT, improving latency. But fundamentally, the user-space model still involved substantial context switching and data movement overhead. This led to the next generation: reducing copies with zero-copy I/O.
2. Zero-Copy TLS I/O: sendfile() and splice() Tricks
To mitigate the overhead of copying data between user and kernel, Linux and other OSes introduced zero-copy I/O system calls. The poster child is sendfile(), which allows sending file data directly to a socket in kernel space, without ever copying it to user buffers. Similarly, splice()/tee() calls can transfer data between file descriptors (e.g. a file and a socket) in kernel. While these calls were originally designed for unencrypted data, clever use (and later kernel enhancements) allowed them to benefit TLS workloads too.
Approach: The idea is to eliminate redundant memory copies and system calls when transferring data. Normally, serving a file over HTTPS would involve: read(file) -> [user buffer] -> encrypt -> [user buffer] -> write(socket). With zero-copy, we want to avoid the read() into user-space. For instance, sendfile(socket, file, offset, len) lets the kernel pull file pages from the page cache and push them out the socket in one go. Early on, sendfile() couldn’t work with TLS sockets because the TLS library needed plaintext in user-space to encrypt it. Two key developments changed that:
- Kernel-buffer TLS hooks: Researchers and engineers (notably at Apache and Netflix) experimented with kernel support to encrypt data on the fly during a sendfile. This eventually led to Kernel TLS (discussed next), but prior to that, some OSes or libraries attempted partial solutions. For example, Solaris’s KSSL (kernel SSL proxy) in the 2000s could intercept data on a port and apply TLS in kernel. Absent full kernel TLS, user-space libraries sometimes provided their own “sendfile-like” APIs. OpenSSL for a time had SSL_sendfile() on some platforms, which essentially read from a file and wrote to an SSL socket efficiently (not true zero-copy, but fewer copies).
- splice and tee: Linux’s splice() can move data between a file and a pipe, and then to a socket, staying in kernel. One could imagine splicing plaintext from disk to a kernel buffer, encrypting it, and sending – though without kernel TLS, encryption still had to happen in user-space. Thus, before kernel TLS, zero-copy was mainly useful for non-TLS traffic or required custom kernel modules.
Example Usage: A typical example is a web server serving static files. On Linux, one might enable the sendfile on; option in Nginx or Apache – with HTTP (no TLS) this dramatically improves throughput. With TLS before kTLS, Nginx would internally disable sendfile (because it can’t natively encrypt file data in kernel). Instead, Nginx would read the file in chunks and use OpenSSL to send, incurring copies. However, FreeBSD and Linux researchers developed kernel TLS that would allow using sendfile with TLS – effectively zero-copy encryption. (Netflix’s use-case: streaming video over TLS at 40 Gbps).
One well-known result is from Netflix engineers: by using FreeBSD’s sendfile() together with a TLS kernel offload, they scaled throughput from 6 Gbps to 40 Gbps on the same hardware. In Linux, an experimental splice() technique was also discussed to couple with TLS. But it truly became practical only with kernel TLS support (next section) where sendfile could be used on a TLS socket.
Performance: Zero-copy I/O can nearly double throughput or halve CPU for I/O-heavy workloads. One developer noted switching to sendfile boosted transfer speed from 800 MB/s to 1.5 GB/s in a Python FTP server. The elimination of one context switch and one memory-to-memory copy per block of data is key. However, until kernel TLS matured, these gains were limited to either unencrypted transfers or required external TLS offload (like a proxy doing TLS and then using sendfile internally for the clear data).
That said, zero-copy set the stage for TLS acceleration by highlighting an important bottleneck: data movement. Even if encryption itself is fast, shuffling data between user and kernel was wasting CPU. The next generation tackled this by moving TLS encryption into the kernel, so that zero-copy could be fully realized for HTTPS.
3. Early Kernel Offloads: KSSL and Hardware SSL Cards
Before modern kernel TLS, there were earlier attempts to offload or accelerate TLS by moving work out of user space. Two notable approaches emerged in the 2000s: kernel-space TLS proxies and hardware accelerator cards.
Kernel-Space TLS Proxies: Sun’s Solaris OS introduced KSSL (Kernel SSL) around 2004 as a transparent TLS proxy in the kernel. The idea: the kernel listens on (say) port 443, performs the TLS handshake and encryption in kernel, and forwards plaintext to a local application (listening on an internal port). To the app, it’s as if it’s handling unencrypted HTTP, while clients talk TLS to the kernel. This eliminated user-kernel context switches for every record – data arrived decrypted in the app, and when the app responded, KSSL encrypted and sent it. KSSL leveraged the Solaris Cryptographic Framework, meaning it could use hardware crypto accelerators or optimized kernel crypto routines directly. The result was improved performance (and the ability to add TLS to apps that didn’t support it). Solaris KSSL showed it was possible to “terminate” TLS in the OS, foreshadowing Linux’s kTLS much later.
Other OSes and devices had similar ideas. For example, F5’s BIG-IP load balancers (early 2000s) and other SSL terminators effectively did TLS in kernel-space or firmware, then passed clear traffic to back-end servers. Even Linux had some out-of-tree patches and experiments for kernel TLS, but it didn’t land in mainline until much later.
Hardware SSL Accelerator Cards: Concurrently, companies used PCI cards to offload TLS computations. A famous example is the Sun Crypto Accelerator 1000, a PCI card circa 2002 with a Broadcom crypto ASIC. It could perform RSA operations and bulk encryption on behalf of the CPU. These cards (and similar ones from Broadcom, Intel, Cavium, etc.) were often used in servers to handle the expensive SSL handshakes. The typical approach was that the card or its driver would hook into the TLS library or OS: during a handshake, instead of CPU doing an RSA decryption or signing, it would send it to the card. Likewise, the card might handle symmetric encryption for bulk data.

A Sun Crypto Accelerator 1000 SSL card (~2002). Such PCI cards offloaded expensive TLS operations (up to 4,000 RSA ops/sec) to dedicated hardware, reducing CPU load. They often accelerated handshakes and/or bulk encryption.
These accelerators could drastically improve throughput on machines of that era. For example, an SSL offload card might allow a server to handle thousands more TPS (transactions per second) by doing RSA, which was then very slow in software. Typically, the TLS handshake was the main target, since public-key operations were the bottleneck. Many cards offloaded the handshake but left the cheaper symmetric encryption back to the CPU (which by mid-2000s could handle AES reasonably well). Some accelerators, however, did it all – effectively terminating TLS on the card (similar to a NIC doing it). This is akin to a TLS termination proxy but on a card.
Example Usage: A kernel offload like Solaris KSSL was configured via system commands (ksslcfg to bind a certificate to a port). Once set up, the application simply listened on localhost:8080 (for example) and KSSL accepted real TLS connections on 443. For hardware cards, the usage might involve driver support in OpenSSL (engine modules). E.g., OpenSSL could use an “engine” to route crypto calls to a card (like the Broadcom or Cavium engine). An admin might install the card, then configure OpenSSL with -engine accelerator so that RSA, DH, etc. go to hardware.
Performance: These early offloads demonstrated significant CPU savings and throughput gains:
- Solaris KSSL avoided context switches for data, so it improved throughput by reducing CPU overhead. A Sun whitepaper noted it “improves performance by avoiding context switches and directly accessing kernel crypto providers” – essentially the same benefits we seek today (zero-copy, fewer syscalls). One could achieve near line-rate HTTPS on Solaris if the CPU or hardware could keep up with crypto.
- SSL cards could handle thousands of RSA ops per second. For instance, Sun’s card could do up to 4,000 2048-bit RSA operations/sec and support bulk AES at high speeds. This freed the CPU for other tasks and meant a smaller number of servers could handle heavy HTTPS loads. However, these cards were specialized and added cost.
One downside was that adding hardware or kernel proxies introduced complexity. Load balancing with a TLS-offload tier or installing custom hardware made deployments more complicated than pure software. Moreover, as CPU crypto improved (AES-NI in 2008, faster CPUs), the cost-benefit of special hardware dropped for bulk crypto. The focus then shifted to making better use of the CPU and kernel capabilities already there – leading to Kernel TLS (kTLS) in mainline Linux/FreeBSD.
4. Kernel TLS (kTLS): Encrypting in the Kernel
Kernel TLS (kTLS) is a modern Linux and FreeBSD feature that offloads the TLS record encryption/decryption to the kernel, while still letting the user-space library do the handshake. This has become a game-changer for TLS performance in the past few years. The primary motivation is to enable zero-copy networking with TLS and to reduce per-record overhead by keeping data in kernel space.
Architecture: With kTLS, a user-space TLS library (OpenSSL, etc.) performs the TLS handshake as usual, establishing shared session keys. Once the handshake is done, the application can insinuate those keys into the kernel – on Linux this is done via a setsockopt(..., SOL_TLS) call that gives the kernel the encryption keys and algorithm info for that socket. After that, the kernel takes over the record layer: when the app calls send() on that socket with plaintext, the kernel encrypts and packages the TLS records before sending over TCP. Similarly, incoming ciphertext is decrypted in kernel before the app’s recv() sees it. The handshake remains in user-space (no changes to certificates, etc.), but bulk data movement is handled in kernel context.
Crucially, kTLS allows combining with zero-copy syscalls. For example, an app can now call sendfile(tls_sock, file_fd, ...) – the kernel will read file data and encrypt it directly into the NIC send buffer without ever entering user-space. This fulfills the promise of generation 2 but for encrypted connections: no copying data to user space for encryption, no extra context switches per TLS record.
Example Usage: Enabling kTLS requires support in the OS and TLS library. Modern Linux (>= 5.2) and FreeBSD (>12) have kTLS for TLS1.2 and TLS1.3 with certain ciphers (primarily AES-GCM and ChaCha). OpenSSL 3.0+ has support for kTLS; Nginx 1.21.4+ can use it via the SSL_sendfile() API. For instance, in Nginx one would configure:
The ssl_conf_command Options KTLS; line tells OpenSSL to attempt kernel TLS. When running, you can verify kTLS is used if debugging logs show BIO_get_ktls_send(): 1 and SSL_sendfile: .... In C, an application could also use setsockopt() directly with TLS_TX and TLS_RX options (though using the library support is simpler).
Performance: Kernel TLS yields two main benefits: (1) Reduced CPU overhead per record by avoiding copies and user context switches, and (2) Enabling zero-copy sends of TLS data.
Benchmarks have demonstrated solid improvements. In testing Nginx with kTLS+sendfile, throughput improved by ~8% to 30% depending on the OS and workload. FreeBSD saw nearly 30% throughput gain serving a 1 GB file from memory, and even Linux saw ~13% gain. This is significant given that AES-GCM was already hardware-accelerated; the improvement comes from eliminating memory copy and syscalls. Essentially, kTLS lets TLS hit the same throughput as unencrypted TCP would with sendfile. A FreeBSD developer noted sendfile+KTLS doubled their HTTPS throughput in some cases.
CPU usage is also lower. Instead of the application burning cycles copying and encrypting data, the kernel does encryption often with streamlined code and can use in-kernel crypto API (which taps AES-NI too). One report found kTLS (software mode) saved ~35% of the CPU consumption compared to user-space TLS for large transfers. Another benefit is fewer kernel context switches – previously every 16KB TLS record might be a separate write() syscall; kTLS can aggregate more data internally.
It’s worth noting that kTLS primarily offloads symmetric crypto (record encryption/MAC). The handshake still happens in user-space and is CPU-expensive (especially TLS 1.2 RSA or TLS 1.3 certificate verification). Thus kTLS shines for long-lived connections or bulk data transfer (e.g. video streaming, large file downloads). For very short-lived connections, the setup cost of enabling kTLS might outweigh the benefits, since the handshake CPU dominates anyway.
Hardware Offload via kTLS: An exciting aspect of kTLS is that it was designed to interface with NIC hardware offloads. The kernel can handle the record encryption itself (software kTLS), or if a NIC supports TLS crypto, the kernel can pass the TLS session keys to the NIC driver to offload encryption there (hardware kTLS offload). In Linux these are called “TLS offload” or KTLS_HW mode. We’ll cover NIC offloads more in the next section – but kTLS is the enabling layer that makes it possible to use NIC TLS acceleration in a standard way.
To summarize, kernel TLS brings the bulk data path of TLS into the kernel, yielding significant throughput and CPU improvements by cutting down copies and system calls. It has been adopted in high-performance web servers – for example, Netflix (FreeBSD) and Facebook/Meta (kernel TLS in proxies) – to maximize HTTPS performance on modern 100Gbps networks.
5. TLS 1.3 and QUIC: OpenSSL 3.x in the User-Space Fast Lane
While kernel TLS was improving the traditional TLS-over-TCP stack, another trend was emerging: TLS over UDP in the form of QUIC (Quick UDP Internet Connections). QUIC, used for HTTP/3, incorporates TLS 1.3 for encryption but at the user-space transport layer. This “generation” isn’t an offload in the hardware sense, but it represents a re-architecture that improves certain performance aspects (especially latency and parallelism) at the protocol level. OpenSSL 3.x introduced official support for QUIC, enabling TLS 1.3 handshakes in user-space without TCP.
Approach & Architecture: QUIC is a user-space UDP-based transport that performs a TLS 1.3 handshake as part of connection setup. Because QUIC runs in user-space (usually in the application or a library), it cannot rely on kernel TLS (the kernel sees only UDP packets). Instead, libraries like quicTLS (OpenSSL 3.1+) or BoringSSL handle QUIC’s TLS handshake and encryption entirely in userland. This might sound like a step backward (more user-space work), but QUIC brings specific performance wins:
- Faster Handshake (Latency): QUIC’s handshake combines the transport and TLS handshakes. A new QUIC connection can often be established with 1 round-trip (1-RTT) instead of 2 for TCP+TLS 1.3 (TCP 3-way handshake + TLS handshake) – effectively saving a full network round-trip. In practice, this cuts hundreds of milliseconds for clients far from the server. Measurements of Google’s QUIC showed substantial improvements; for example YouTube over QUIC reduced handshake latency by 400–500 ms in some scenarios. TLS 1.3 already reduced handshake latency, but QUIC goes further by eliminating the separate TCP handshake delay.
- Connection Reuse and Multiplexing: QUIC connections support multiplexed streams to avoid the head-of-line blocking problem of HTTP/2-over-TCP. This means a single QUIC/TLS connection can serve many parallel requests without interference, reducing the need for multiple handshakes. Fewer handshakes = less CPU spent on handshakes overall, somewhat analogous to aggressive TLS connection reuse in HTTP/2.
- 0-RTT Data: Like TLS 1.3 on TCP, QUIC supports 0-RTT resumption, allowing clients to send data immediately on reconnect (with some security trade-offs). This can eliminate handshake latency on subsequent connections and saves CPU by skipping full handshakes in many cases.
OpenSSL 3.1 and above provides a QUIC API (often referred as QUIC-support in OpenSSL or “quicTLS”). Applications can use OpenSSL’s API to perform a QUIC handshake: essentially creating an SSL object in QUIC mode, which then will drive the handshake and encryption, while the app is responsible for sending/receiving the resulting UDP packets (often via a callback or a BIO interface). There are code samples in OpenSSL’s documentation showing how to integrate QUIC – it’s more complex than a simple SSL_accept() since you need to manage packet I/O, but the cryptographic parts are handled by OpenSSL’s new QUIC support.
Performance Characteristics: QUIC’s improvements are mostly about latency and resilience, but what about throughput and CPU usage? It’s a mix of pros and cons:
- Handshake CPU: The CPU cost per handshake is similar to TLS 1.3 over TCP (same cryptographic operations), but because QUIC encourages long-lived connections for many streams, you can amortize that cost over more data. In HTTP/3, typically one QUIC connection might replace multiple TCP connections, meaning fewer total handshakes. This is a win for CPU efficiency when many small requests are made – analogous to how HTTP/2 multiplexing improved TLS utilization.
- Bulk Throughput: Here, QUIC historically lagged TCP in raw throughput per CPU. Early QUIC implementations struggled to reach the same Gbps as TLS/TCP because of UDP overhead and lack of kernel offloads. For instance, studies found QUIC achieved only about 40–50% of the throughput of TLS/TCP in certain 10 Gbps tests. There are a few reasons:
- The Linux kernel is very optimized for TCP (with features like TCP segmentation offload, pacing, etc.) that didn’t initially exist for UDP. QUIC implementations have had to implement similar optimizations in user-space or rely on newer kernel features (e.g., UDP GSO – Generic Segmentation Offload for UDP – to batch packets).
- QUIC’s user-space processing means more CPU cycles per byte. Handling each packet in userland (even with epoll or io_uring) can have more overhead than letting the kernel handle a bulk of TCP segmentation. One comment noted QUIC could cost 2–4× CPU per byte compared to TCP+TLS. This is being narrowed with optimizations, but it’s a consideration.
However, these gaps are closing. Modern QUIC libraries use sendmmsg/recvmmsg and UDP GSO to send multiple packets per syscall, approaching the efficiency of TCP segmentation. Also, some NICs now even have rudimentary UDP offload features. The goal is that QUIC’s throughput can match TLS/TCP’s when implemented well – and some benchmarks show near parity in favorable conditions (especially with kernel-bypass techniques or DPDK, but that’s beyond our scope). It’s fair to say QUIC is getting faster, but it had a higher CPU cost in its early deployments.
- Parallelism: An often overlooked advantage of QUIC being in user-space is that an application could scale QUIC handling across threads or CPUs more flexibly than kernel TCP (which traditionally pinned a connection to one core). A user-space QUIC server can distribute packets to multiple worker threads (though doing so while maintaining order is non-trivial). This could potentially use multiple cores for one large transfer, which TCP normally doesn’t do (one connection -> one core). In practice though, most QUIC stacks still handle each connection on a single core at a time to avoid reordering issues, but designs exist for more parallel processing.
In summary, generation 5 (OpenSSL 3.x with QUIC) represents software-based acceleration in the form of protocol improvements. By cutting handshake round-trips and enabling better connection reuse, QUIC improves perceived performance (faster page loads, less handshake CPU when many requests are multiplexed). The trade-off is higher per-packet CPU overhead. There is no free lunch: we moved from kernel to user-space for transport, which gave us flexibility and latency wins, but we lost some of the kernel’s efficiency. The next generation moves in the opposite direction – pushing TLS onto specialized hardware to get both high speed and low CPU usage.
6. Smart NICs with TLS Offload: Crypto in the Network Interface
The latest frontier in TLS acceleration is the use of Smart NICs / DPUs (Data Processing Units) that have built-in cryptographic engines specifically for TLS. These devices take the kernel TLS concept a step further: not only is TLS out of user space, it can even be offloaded from the host CPU entirely, onto the NIC hardware. Modern SmartNICs like NVIDIA Mellanox ConnectX-6/7, BlueField-2/3 DPUs, and Chelsio T6/T7 adapters offer TLS offload capabilities. This can include offloading the symmetric encryption/decryption of TLS records, and in some cases even assisting with or fully handling the handshake.
Architecture: There are a couple of offload modes, as also alluded to in kTLS:
- Data Path Offload (Record Encryption in NIC): In this common mode, the TLS handshake is done by the host (user-space and/or kernel), and once keys are established, those keys are given to the NIC. The NIC then performs all AES encryption/decryption and authentication (e.g. AES-GCM or ChaCha20/Poly1305) on outgoing and incoming packets. In Linux, this is implemented via kTLS hardware offload: the kernel sets up the connection as kTLS and then offloads the crypto to the NIC driver. When the application sends data, it goes to the kernel unencrypted (via sendfile or sendmsg), and the kernel hands it to the NIC with an indication “encrypt this with session X”. The NIC hardware then encrypts and computes the MAC, and sends the packet out. On receive, the NIC will decrypt packets and pass plaintext up to the kernel. This mode is often called “inline TLS record offload” – the NIC effectively terminates the TLS record layer but not the entire connection (it still relies on host TCP stack).
- Full Handshake Offload: A more advanced mode (still emerging) is where the NIC’s CPU or firmware handles the TLS handshake as well, fully terminating the TLS connection on the NIC (similar to those old SSL cards, but now integrated with the NIC’s network processing). NVIDIA’s documentation calls this HW-record mode, where the NIC does everything (TLS handshake, record, even TCP) in hardware. As of now, many NICs do not support fully independent handshake offload in production – it’s complex and can overload NIC processors if too many handshakes occur concurrently. BlueField-2, for example, had a crypto engine for RSA/ECDSA (NVIDIA calls it a PKA – Public Key Accelerator), and researchers demonstrated it can offload TLS handshakes to NIC cores in a project called “SmartTLS”. Their prototype achieved a 5.9× higher handshake throughput by using the NIC for handshakes vs CPU alone. However, in NVIDIA’s current product stack, full handshake offload is “not supported yet” for general use – the NIC assists but the kernel still does handshake by default. Chelsio’s T6 NICs, on the other hand, have claimed full TLS offload (they call it Inline TLS/SSL in hardware), effectively acting as a TLS termination on the card. This typically requires using their API or driver – not as transparent as kTLS.

SmartNIC TLS offload architecture: The NIC (bottom) runs TLS security protocols (and often TCP) on-board, freeing the host CPU to focus on applications. Keys are installed in NIC hardware, which encrypts/decrypts traffic inline.
Example Usage: From the application’s perspective, using NIC TLS offload can be nearly transparent if it’s via kTLS. For instance, on a system with an offload-capable NIC, an application might enable kTLS (as in generation 4), and the kernel will automatically use the NIC’s crypto engine. There may be driver-specific toggles or module parameters, but often it “just works” if available. You can check if a NIC supports TLS offload – e.g., Mellanox NICs show a device capability for “tls-hw-offload”. NVIDIA’s BlueField guide shows using ethtool --show-features or flint tool to verify “Crypto” support on the NIC.
In other setups, one might use a specific SDK: For example, NVIDIA BlueField can also run a complete TCP/TLS stack on the Arm cores on the NIC (DPDK or their DOCA SDK), which requires coding against their APIs. Chelsio’s NIC could be used by configuring the socket with their library to utilize hardware TLS. Envoy proxy and Nginx have started adding support to detect kTLS and NIC offload – for instance, Envoy can offload TLS to Intel QAT or to kTLS NICs if available.
Performance: This is where NIC offloads shine. Offloading TLS data path to hardware can massively reduce CPU utilization on the host and increase throughput:
- Throughput and CPU: With NIC doing encryption, a single server can push far higher encrypted bandwidth with minimal CPU. For example, Napatech (an IPU vendor) demonstrated dual 100 Gbps line-rate TLS encryption with zero host CPU cores consumed – all encryption done on their card. Even if real-world performance is slightly lower, we’re talking ~200 Gbps of TLS traffic with near-zero CPU, which is unattainable with CPU-only crypto. Chelsio reported that using their T6 TLS offload, they achieved 98 Gbps HTTPS throughput with only ~35% of one core’s CPU, whereas a normal NIC with kTLS might use significantly more cores to reach that rate.
- Handshake CPU savings: Offloading the handshake heavy lifting (RSA/ECDHE) can also save a lot of host CPU. As mentioned, researchers offloaded RSA-2048 to a BlueField NIC and saw up to ~5.9× more handshakes per second. In other words, for the same number of handshakes, host CPU usage dropped around ~80% (since 1 NIC can do the work of ~5–6 CPU cores). This addresses the handshake spike problem – busy servers establishing tons of TLS connections (think CDN edge handling new clients) can dramatically reduce CPU burn by having NIC hardware do the costly asymmetric crypto. NVIDIA’s BlueField 3 is expected to improve on this further, potentially handling handshakes entirely in NIC firmware for many connections in parallel (with safeguards to avoid NIC overload).
- Latency: Hardware offload can also cut latency for large transfers by freeing CPU cycles and perhaps by doing things like TCP segmentation and encryption in one pass. However, one must be careful: offloading doesn’t reduce TLS handshake network latency (still need round-trips), but it can reduce queueing delays by handling things faster. If the NIC offloads TCP as well (acting as a TOE – TCP Offload Engine), it might reduce latency variability under load.
Diagrams & Data Path: With NIC offload, the data path looks like this: Application sends plaintext to kernel (via write or sendfile as before). The kernel (kTLS enabled) packages it as TLS records but marks them for offload and hands to NIC driver. The NIC hardware looks up the connection’s TLS context (keys) and performs AES-GCM encryption and authentication on each packet as it goes out on the wire. On receive, the NIC decrypts packets and only decrypted data goes into the kernel’s socket buffer for the application. The host CPU no longer touches packet payloads at all – it only might handle handshake messages (ClientHello, etc.) in user-space, unless even that is offloaded. This dramatically reduces memory bandwidth usage on the CPU and interrupts rate, etc. Essentially, encryption becomes “wire-speed.” One can think of it like the NIC doing what dedicated SSL appliances did, but integrated into each server’s NIC.
Of course, there are limitations: If the NIC has a fixed number of crypto engines, very high connection rates might still bottleneck (the NIC could run out of resources to process many handshakes at once). Also, offload tends to support only certain ciphers (currently mostly AES-GCM, maybe Chacha20). If an unsupported cipher or TLS feature is used, the system may fall back to software. Additionally, troubleshooting encrypted traffic can be harder when NICs encrypt it (since dumps on host show plaintext only after decryption).
Real World Impact: Early adopters (like cloud providers and high-end financial trading systems) report significant savings. Consider a scenario: a server handling 100k TLS handshakes/sec and streaming video at 100 Gbps. Without offload, you’d need dozens of CPU cores (for handshakes and AES). With a SmartNIC, you could potentially handle this with a couple of CPU cores (for handshake software) and let the NIC handle all AES at 100G line rate – saving 80%+ of the CPU for other tasks. This translates to major cost and power savings. One source noted that moving to NIC TLS offload allowed them to run their CPUs hotter (more capacity for app logic), as the TLS work no longer pushed CPU to 100%.
In summary, SmartNIC-based TLS offload is the cutting-edge solution to TLS performance: it maintains security while drastically cutting the CPU cost per byte and per handshake. It completes the evolution: from user-space to kernel to hardware. With the right support, a modern server can now handle encrypted traffic at speeds that previously were only feasible for unencrypted traffic, closing the performance gap between HTTPS and HTTP.
Keep learning on Codemia
- Networking for Backend Engineers: TCP, QUIC, TLS and load balancing from the packet up.
- DNS, TLS, HTTP and connection pooling: a free lesson on what happens before the first byte.
- Security Engineering for Software Teams: TLS, keys and secrets in practice.