Re: [PATCH v2 2/2] lib/crypto: docs: Add rst documentation to Documentation/crypto/

From: Randy Dunlap

Date: Sat Apr 18 2026 - 19:52:42 EST




On 4/18/26 12:21 PM, Eric Biggers wrote:
> Add a documentation file Documentation/crypto/libcrypto.rst which
> provides a high-level overview of lib/crypto/.
>
> Also add several sub-pages which include the kernel-doc for the
> algorithms that have it. This makes the existing, quite extensive
> kernel-doc start being included in the HTML and PDF documentation.
>
> Note that the intent is very much *not* that everyone has to read these
> Documentation/ files. The library is intended to be straightforward and
> use familiar conventions; generally it should be possible to dive right
> into the kernel-doc. You shouldn't need to read a lot of documentation
> to just call `sha256()`, for example, or to run the unit tests if you're
> already familiar with KUnit. (This differs from the traditional crypto
> API which has a larger barrier to entry.)
>
> Nevertheless, this seems worth adding. Hopefully it is useful and makes
> LWN no longer consider the library to be "meticulously undocumented".
>
> Reviewed-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>

Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Reviewed-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>

> ---
> Documentation/crypto/index.rst | 2 +-
> .../crypto/libcrypto-blockcipher.rst | 19 ++
> Documentation/crypto/libcrypto-hash.rst | 86 +++++++++
> Documentation/crypto/libcrypto-signature.rst | 11 ++
> Documentation/crypto/libcrypto-utils.rst | 6 +
> Documentation/crypto/libcrypto.rst | 165 ++++++++++++++++++
> Documentation/crypto/sha3.rst | 2 +
> 7 files changed, 290 insertions(+), 1 deletion(-)
> create mode 100644 Documentation/crypto/libcrypto-blockcipher.rst
> create mode 100644 Documentation/crypto/libcrypto-hash.rst
> create mode 100644 Documentation/crypto/libcrypto-signature.rst
> create mode 100644 Documentation/crypto/libcrypto-utils.rst
> create mode 100644 Documentation/crypto/libcrypto.rst
>

--
~Randy