diff options
author | Lei He <helei.sig11@bytedance.com> | 2022-05-25 17:01:14 +0800 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2022-05-26 11:41:51 +0100 |
commit | 4c5e512ee0c49efb42286600aef31739c0dcee5d (patch) | |
tree | dc6255202c5819ab77cf22598c5430a8128b286d /crypto/akcipher.c | |
parent | 99d423f10c636c39405924e68584f50f78a0bb8c (diff) |
crypto: Implement RSA algorithm by hogweed
Implement RSA algorithm by hogweed from nettle. Thus QEMU supports
a 'real' RSA backend to handle request from guest side. It's
important to test RSA offload case without OS & hardware requirement.
Signed-off-by: lei he <helei.sig11@bytedance.com>
Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'crypto/akcipher.c')
-rw-r--r-- | crypto/akcipher.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/akcipher.c b/crypto/akcipher.c index ab28bf415b..f287083f92 100644 --- a/crypto/akcipher.c +++ b/crypto/akcipher.c @@ -23,6 +23,9 @@ #include "crypto/akcipher.h" #include "akcipherpriv.h" +#if defined(CONFIG_NETTLE) && defined(CONFIG_HOGWEED) +#include "akcipher-nettle.c.inc" +#else QCryptoAkCipher *qcrypto_akcipher_new(const QCryptoAkCipherOptions *opts, QCryptoAkCipherKeyType type, const uint8_t *key, size_t keylen, @@ -37,6 +40,7 @@ bool qcrypto_akcipher_supports(QCryptoAkCipherOptions *opts) { return false; } +#endif int qcrypto_akcipher_encrypt(QCryptoAkCipher *akcipher, const void *in, size_t in_len, |