Chapter 4. User Space Interface

Table of Contents

Introduction
User Space API General Remarks
In-place Cipher operation
Message Digest API
Symmetric Cipher API
AEAD Cipher API
AEAD Memory Structure
Random Number Generator API
Zero-Copy Interface
Setsockopt Interface
User space API example

Introduction

The concepts of the kernel crypto API visible to kernel space is fully applicable to the user space interface as well. Therefore, the kernel crypto API high level discussion for the in-kernel use cases applies here as well.

The major difference, however, is that user space can only act as a consumer and never as a provider of a transformation or cipher algorithm.

The following covers the user space interface exported by the kernel crypto API. A working example of this description is libkcapi that can be obtained from [1]. That library can be used by user space applications that require cryptographic services from the kernel.

Some details of the in-kernel kernel crypto API aspects do not apply to user space, however. This includes the difference between synchronous and asynchronous invocations. The user space API call is fully synchronous.

[1] http://www.chronox.de/libkcapi.html