logo
episode-header-image
Jun 2025
22m 55s

kTLS - Kernel level TLS

Hussein Nasser
About this episode

Fundamentals of Operating Systems Course https://oscourse.winktls is brilliant.TLS encryption/decryption often happens in userland. While TCP lives in the kernel. With ktls, userland can hand the keys to the kernel and the kernel does crypto. When calling write, the kernel encrypts the packet and send it to the NIC.When calling read, the kernel decrypts the packet and handed it to the userspace. This mode still taxes the host’s CPU of course, so there is another mode where the kernel offloads the crypto to the NIC device! Host CPU becomes free. Incoming packets to the NIC are decrypted in device before they are DMAed to the kernel. outgoing packets are encrypted before they leave the NIC to the network.ktls still need handshake to happen in userspace. There is also enabling zerocopy in some cases (now that kernel has context) Deserves a video. So much good stuff.0:00 Intro2: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 Example13:50 Read RX Example17:00 Zero copy (sendfile)https://docs.kernel.org/networking/tls-offload.html

Up next
Oct 3
Asynchronous IO in Postgres 18
Postgres 18 has been released with many exciting features such as UUIDv7, Over explain module, composite index skip scans, and the most anticipated asynchronous IO with worker and io_uring mode which I uncover in this show. Hope you enjoy it0:00 Intro1:30 Synchronous vs Asynchron ... Show More
41m 12s
May 2025
The beauty of the CPU
If you are bored of contemporary topics of AI and need a breather, I invite you to join me to explore a mundane, fundamental and earthy topic.The CPU.A reading of my substack article https://hnasr.substack.com/p/the-beauty-of-the-cpu 
9m 38s
Apr 2025
Sequential Scans in Postgres just got faster
This new PostgreSQL 17 feature is game changer. They know can combine IOs when performing sequential scan. Grab my database coursehttps://courses.husseinnasser.com 
27m 36s
Recommended Episodes
Nov 2024
589: 6 Reasons to Love Linux 6.12
The Linux 6.12 kernel isn't just another update — it's a game-changer that deserves our full attention, from performance improvements to fascinating new features.Sponsored By:Jupiter Party Annual Membership: Put your support on automatic with our annual plan, and get one month of ... Show More
1h 13m
Jan 2017
Late Night Linux – Episode 01
In Episode 01 of Late Night Linux we talk about Desktop Linux market share, KDE Neon, Ubuntu Touch, what we think will happen in 2017, CyanogenMod becoming Lineage OS and loads more.   News 3% market share on the desktop? Goodbye to GNU Libreboot KDE Announces SystemdGenie, a Gra ... Show More
1h 16m
Jun 2024
567: So Long sudo
Your Linux box is a-changin'. systemd has a huge new release; we'll get into the most impressive features, including the new sudo replacement. Plus, our thoughts on the new Linux Arm laptops that are just around the corner.Sponsored By:Core Contributor Membership: Take $1 a month ... Show More
1h 31m
Aug 2024
SE Radio 630: Luis Rodríguez on the SSH Backdoor Attack
Luis Rodríguez, CTO of Xygeni.io, joins host Robert Blumen for a discussion of the recently thwarted attempt to insert a backdoor in the SSH (Secure Shell) daemon. OpenSSH is a popular implementation of the protocol used in major Linux distributions for authentication over a netw ... Show More
44 m
Jun 2024
SE Radio 621: Xe Iaso on Fly.io
Xe Iaso of Fly.io discusses their hosting platform with host Jeremy Jung. They cover building globally distributed applications with Anycast, using Wireguard to encrypt inter-service communication, writing custom code to handle load balancing and scaling with fly-proxy, why servi ... Show More
47m 33s
Aug 2023
E28 - libgit2, source code management and edge computing
Edward Thomson is a fantastic software engineer, he’s currently the maintainer of libgit2: a pure C implementation of the git core methods provided as a linkable library with a solid API. libgit2 powers GitHub, GitLab, Azure DevOps and many other products. Ed is also a product ma ... Show More
1h 9m
Feb 2025
603: All Your Kernels Belong to Rust
There have been major Rust developments in the Linux Kernel; we discuss what's new and how it will impact the future. Plus, we're joined by a special guest.Sponsored By:Tailscale: Tailscale is a programmable networking software that is private and secure by default - get it free ... Show More
1 h
Feb 2025
601: Taming the Demons
It's week one of our FreeBSD challenge, and for one of us, that penalty Windows install looks uncomfortably close! Plus, Zach Mitchell joins us to update us on Planet Nix.Sponsored By:Tailscale: Tailscale is a programmable networking software that is private and secure by default ... Show More
1h 8m
Feb 2025
602: The BSD Humbling
Our FreeBSD Challenge comes to a close, and chances are one of us will be paying the Windows tax.Sponsored By:Tailscale: Tailscale is a programmable networking software that is private and secure by default - get it free on up to 100 devices! 1Password Extended Access Management: ... Show More
1h 7m