Re: [RFC PATCH 2/2] rust: crypto: add RSA public-key encryption via crypto_akcipher

From: Eric Biggers

Date: Wed Jun 17 2026 - 13:53:24 EST


On Wed, Jun 17, 2026 at 04:01:33PM +0100, Mike Lothian wrote:
> Add a Rust binding for the asynchronous public-key cipher API
> (crypto_akcipher), driven synchronously, and a crypto::rsa_pubkey_encrypt()
> convenience built on it.

Could you keep the crypto_akcipher support private to the file and just
expose rsa_pubkey_encrypt()? I don't want the use of crypto_akcipher to
be growing significantly. It's a very bad API, as I think is clear by
all the workarounds you had to implement to use it. I'd like to replace
it with lib/crypto/ APIs for RSA eventually.

- Eric