aboutsummaryrefslogtreecommitdiff
path: root/crypto/afalgpriv.h
diff options
context:
space:
mode:
authorLongpeng(Mike) <longpeng2@huawei.com>2017-07-14 14:04:06 -0400
committerDaniel P. Berrange <berrange@redhat.com>2017-07-19 10:11:05 +0100
commit25c60df32b9aad71a86cbb3aeaed60bf7567918a (patch)
treefe58cccce4f3a4729cf8a393e820da69ac2d952f /crypto/afalgpriv.h
parentf0d92b56d8831de4b7df43ed3e6404cae5d42ed8 (diff)
downloadqemu-25c60df32b9aad71a86cbb3aeaed60bf7567918a.zip
qemu-25c60df32b9aad71a86cbb3aeaed60bf7567918a.tar.gz
qemu-25c60df32b9aad71a86cbb3aeaed60bf7567918a.tar.bz2
crypto: cipher: add afalg-backend cipher support
Adds afalg-backend cipher support: introduces some private APIs firstly, and then intergrates them into qcrypto_cipher_afalg_driver. Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'crypto/afalgpriv.h')
-rw-r--r--crypto/afalgpriv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/afalgpriv.h b/crypto/afalgpriv.h
index 76118cf..d0941d4 100644
--- a/crypto/afalgpriv.h
+++ b/crypto/afalgpriv.h
@@ -19,6 +19,15 @@
#define SALG_TYPE_LEN_MAX 14
#define SALG_NAME_LEN_MAX 64
+#ifndef SOL_ALG
+#define SOL_ALG 279
+#endif
+
+#define AFALG_TYPE_CIPHER "skcipher"
+
+#define ALG_OPTYPE_LEN 4
+#define ALG_MSGIV_LEN(len) (sizeof(struct af_alg_iv) + (len))
+
typedef struct QCryptoAFAlg QCryptoAFAlg;
struct QCryptoAFAlg {