Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Cryptography
  3. libkcapi

libkcapi

NOASSERTIONCv1.5.0

A user-space library providing high-performance access to the Linux kernel crypto API via Netlink.

Visit WebsiteGitHubGitHub
195 stars78 forks0 contributors

What is libkcapi?

libkcapi is a user-space interface library that provides access to the Linux kernel's cryptographic API via Netlink. It allows applications to perform cryptographic operations (e.g., encryption, hashing, random number generation) directly through the kernel, eliminating the need for user-space crypto implementations. The library focuses on high performance by avoiding memory copies and offering a simple API.

Target Audience

Linux developers and system programmers who need efficient, kernel-backed cryptographic operations in user-space applications, particularly those building security tools, utilities, or embedded systems.

Value Proposition

Developers choose libkcapi for its zero-copy design, which maximizes performance, and its direct integration with the Linux kernel crypto API, ensuring reliability and consistency. It also provides drop-in replacements for common tools like OpenSSL and coreutils, simplifying deployment.

Overview

Linux Kernel Crypto API User Space Interface Library

Use Cases

Best For

  • Building high-performance cryptographic applications on Linux
  • Replacing OpenSSL command-line tools with kernel-backed alternatives
  • Implementing kernel-based random number generation in user-space
  • Developing security utilities with minimal dependencies
  • Integrating cryptographic functions into embedded Linux systems
  • Creating lightweight CLI tools for hashing and encryption

Not Ideal For

  • Cross-platform projects targeting macOS, Windows, or other non-Linux operating systems
  • Applications requiring high-level cryptographic protocols like TLS/SSL or SSH built-in
  • Environments where applying kernel patches for asymmetric cipher support is not feasible
  • Teams needing extensive documentation, tutorials, or large community support for quick adoption

Pros & Cons

Pros

Kernel-Backed Performance

All cryptographic operations are processed by the Linux kernel, ensuring consistency and leveraging kernel-side optimizations, as highlighted in the README's focus on speed and kernel integration.

Zero-Copy Design

Uses scatter/gather lists to avoid memory copies during data processing, maximizing performance for cryptographic operations, which is a core philosophy stated in the README.

Minimal Dependencies

Only requires the C library and kernel, with no external dependencies, allowing easy integration or direct source copying into projects, as described in the integration section.

Drop-in Tool Replacements

Includes command-line tools like kcapi-enc and sha256sum that mimic coreutils and OpenSSL utilities, simplifying deployment for common tasks without additional software.

Cons

Linux-Exclusive Limitation

Tied specifically to the Linux kernel crypto API via Netlink, making it unusable on other operating systems like macOS or Windows, limiting portability.

Kernel Patch Complexity

Features like asymmetric ciphers require applying patches from the kernel-patches directory, adding setup overhead and maintenance challenges, as admitted in the README.

Limited High-Level Features

Focuses on low-level cryptographic operations (e.g., ciphers, hashes) and lacks built-in support for protocols like TLS or advanced abstractions found in libraries like OpenSSL.

API Stability Risks

With major version zero, the API is not considered stable and can change without warning, as per the versioning schema, potentially causing breaking changes for early adopters.

Open Source Alternative To

libkcapi is an open-source alternative to the following products:

coreutils
coreutils

coreutils is a collection of GNU core utilities providing essential command-line tools like ls, cp, and cat for Unix-like systems.

OpenSSL
OpenSSL

OpenSSL is a robust, full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols, providing cryptographic libraries and command-line tools.

Frequently Asked Questions

Quick Stats

Stars195
Forks78
Contributors0
Open Issues5
Last commit19 days ago
CreatedSince 2014

Tags

#c-library#security#linux-kernel#zero-copy#cryptography#cli-tools#performance

Built With

A
Autotools
L
Linux Kernel
C
C++

Links & Resources

Website

Included in

Cryptography6.8k
Auto-fetched 1 day ago

Related Projects

OpenSSLOpenSSL

General purpose TLS and crypto library

Stars30,238
Forks11,285
Last commit2 days ago
xxHashxxHash

Extremely fast non-cryptographic hash algorithm

Stars11,047
Forks900
Last commit1 month ago
tiny-AES128-Ctiny-AES128-C

Small portable AES128/192/256 in C

Stars4,960
Forks1,388
Last commit1 year ago
s2ns2n

An implementation of the TLS/SSL protocols

Stars4,728
Forks781
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub