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>
This commit is contained in:
Longpeng(Mike)
2017-07-14 14:04:06 -04:00
committed by Daniel P. Berrange
parent f0d92b56d8
commit 25c60df32b
5 changed files with 271 additions and 4 deletions

View File

@@ -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 {