A user-space library providing high-performance access to the Linux kernel crypto API via Netlink.
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.
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.
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.
Linux Kernel Crypto API User Space Interface Library
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.
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.
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.
Includes command-line tools like kcapi-enc and sha256sum that mimic coreutils and OpenSSL utilities, simplifying deployment for common tasks without additional software.
Tied specifically to the Linux kernel crypto API via Netlink, making it unusable on other operating systems like macOS or Windows, limiting portability.
Features like asymmetric ciphers require applying patches from the kernel-patches directory, adding setup overhead and maintenance challenges, as admitted in the README.
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.
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.
libkcapi is an open-source alternative to the following products:
coreutils is a collection of GNU core utilities providing essential command-line tools like ls, cp, and cat for Unix-like systems.
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.
General purpose TLS and crypto library
Extremely fast non-cryptographic hash algorithm
Small portable AES128/192/256 in C
An implementation of the TLS/SSL protocols
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.