Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

kTLS - Kernel Level TLS

Hussein Nasser via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn about kernel-level TLS (kTLS), a Linux kernel feature that moves TLS encryption and decryption operations from userspace to the kernel for improved performance. Explore how traditional TLS implementations handle encryption in userspace while TCP operates in the kernel, creating inefficiencies. Discover how kTLS allows userspace applications to hand encryption keys to the kernel, enabling the kernel to perform crypto operations directly during read and write system calls. Examine three different kTLS modes: TLS_SW where the kernel handles encryption and decryption in software, TLS_HW where crypto operations are offloaded to the network interface card, and TLS_HW_RECORD where the NIC handles complete TLS record processing. Understand practical implementation through write and read examples, see how incoming packets can be decrypted by the NIC before DMA transfer to the kernel, and learn about zero-copy optimizations using sendfile when the kernel has TLS context. Master the fundamentals of this performance optimization technique that can significantly reduce CPU overhead in high-throughput network applications while maintaining security.

Syllabus

0:00 Intro
2:00 Userspace SSL Libraries
3:00 ktls
6:00 Kernel Encrypts/Decrypts TLS_SW
8:20 NIC offload mode TLS_HW
10:15 NIC does it all TLS_HW_RECORD
12:00 Write TX Example
13:50 Read RX Example
17:00 Zero copy sendfile

Taught by

Hussein Nasser

Reviews

Start your review of kTLS - Kernel Level TLS

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.