af_alg and algif_hash are not enough, it prints an error message for various algorithms... [ 42s] libkcapi - Error: AF_ALG: bind failed (errno: -2) [ 42s] libkcapi - Error: Netlink error: cannot open netlink socket [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for hmac(sha1) (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for hmac(sha256) (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for hmac(sha384) (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for hmac(sha512) (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for sha1 (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for sha256 (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for sha384 (is required crypto_user.c patch missing? see documentation) [ 42s] libkcapi - Error: NETLINK_CRYPTO: cannot obtain cipher information for sha512 (is required crypto_user.c patch missing? see documentation) What's required exactly depends on the library user I suppose. So we'd basically have to include all algorithms and their arch-specific optimized implementations... The easiest way is to include and load all $moduledir/kernel/crypto/* modules, maintaining a manual list can be annoying.