crypto: ccree - add skcipher support

Add CryptoCell skcipher support

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Gilad Ben-Yossef
2018-01-22 09:27:01 +00:00
committed by Herbert Xu
parent 4c3f97276e
commit 63ee04c8b4
7 changed files with 1339 additions and 2 deletions

View File

@@ -15,6 +15,7 @@
#endif
#include <linux/dma-mapping.h>
#include <crypto/algapi.h>
#include <crypto/internal/skcipher.h>
#include <crypto/aes.h>
#include <crypto/sha.h>
#include <crypto/aead.h>
@@ -111,6 +112,7 @@ struct cc_drvdata {
struct platform_device *plat_dev;
cc_sram_addr_t mlli_sram_addr;
void *buff_mgr_handle;
void *cipher_handle;
void *request_mgr_handle;
void *ivgen_handle;
void *sram_mgr_handle;
@@ -124,8 +126,9 @@ struct cc_crypto_alg {
int cipher_mode;
int flow_mode; /* Note: currently, refers to the cipher mode only. */
int auth_mode;
unsigned int data_unit;
struct cc_drvdata *drvdata;
struct crypto_alg crypto_alg;
struct skcipher_alg skcipher_alg;
};
struct cc_alg_template {
@@ -140,6 +143,7 @@ struct cc_alg_template {
int cipher_mode;
int flow_mode; /* Note: currently, refers to the cipher mode only. */
int auth_mode;
unsigned int data_unit;
struct cc_drvdata *drvdata;
};