Kernel Crypto exposing asymmetric operations to userland via libkcapi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kernel Crypto folks,

I've got a question about the Kernel Crypto API.

I'm working on adding a cryptographic backend based on the Kernel Crypto API to Sequoia PGP [0][1]. Sequoia supports several cryptographical backends already but using Kernel Crypto would allow us to significantly reduce dependencies when running on Linux.

After implementing hashes, AEAD encryption and symmetric ciphers, I noticed that the libkcapi API for asymmetric ciphers (and ECDH) is not working. The libkcapi maintainer kindly explained [2] that the patches that they proposed for inclusion in the kernel [3] were not merged.

I looked up the relevant thread [4], read it thoroughly and from what I can see most of the arguments are about private keys not being sufficiently protected and extensibility concerns with regards to keys stored in hardware security modules (TPMs etc.).

However, these are mostly irrelevant to the Sequoia PGP use case, since private keys in software that we read do not need additional protection (as they are available for software anyway). We'd still like to use them for signing, decryption, verification and encryption. As for keys stored in HSMs we handle access to them in userland via our keystore module [5].

My question is: Would it be possible to revisit the decision to expose operations with asymmetric keys (including ECDH) in Linux Crypto thus allowing libkcapi to work with non-patched kernels?

I'd like to help make this happen and I think there are other projects that are interested in a complete cryptographic suite of Kernel Crypto functions available in user-land.

Thank you for your time!

Kind regards,
Wiktor

[0]: https://gitlab.com/sequoia-pgp/sequoia/-/issues/1030
[1]: https://lists.sequoia-pgp.org/hyperkitty/list/devel@xxxxxxxxxxxxxxxxxxxxx/thread/ZU64CWYZ26OH5TH6PR3BBLDYDDZ6COLH/
[2]: https://github.com/smuellerDD/libkcapi/issues/164
[3]: https://github.com/smuellerDD/libkcapi/blob/master/kernel-patches/4.15-rc3/asym/v10-0000-cover-letter.patch [4]: https://lkml.kernel.org/lkml/9859277.cZClo5B21s@xxxxxxxxxxxxxxx/T/#m0dfdbd363d4419c7a2470ef884a33dbb250b6df1
[5]: https://gitlab.com/sequoia-pgp/sequoia-keystore



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux