Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 045e3678 authored by Yuan Kang's avatar Yuan Kang Committed by Herbert Xu
Browse files

crypto: caam - ahash hmac support



caam supports ahash hmac with sha algorithms and md5.

Signed-off-by: default avatarYuan Kang <Yuan.Kang@freescale.com>
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent a299c837
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -70,3 +70,15 @@ config CRYPTO_DEV_FSL_CAAM_CRYPTO_API


	  To compile this as a module, choose M here: the module
	  To compile this as a module, choose M here: the module
	  will be called caamalg.
	  will be called caamalg.

config CRYPTO_DEV_FSL_CAAM_AHASH_API
	tristate "Register hash algorithm implementations with Crypto API"
	depends on CRYPTO_DEV_FSL_CAAM
	default y
	select CRYPTO_AHASH
	help
	  Selecting this will offload ahash for users of the
	  scatterlist crypto API to the SEC4 via job ring.

	  To compile this as a module, choose M here: the module
	  will be called caamhash.
+1 −0
Original line number Original line Diff line number Diff line
@@ -4,5 +4,6 @@


obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM) += caam.o
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM) += caam.o
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API) += caamalg.o
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API) += caamalg.o
obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API) += caamhash.o


caam-objs := ctrl.o jr.o error.o key_gen.o
caam-objs := ctrl.o jr.o error.o key_gen.o
+1814 −0

File added.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Original line Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/device.h>
#include <linux/interrupt.h>
#include <linux/interrupt.h>
#include <linux/crypto.h>
#include <linux/crypto.h>
#include <linux/hash.h>
#include <linux/hw_random.h>
#include <linux/hw_random.h>
#include <linux/of_platform.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>
#include <linux/dma-mapping.h>
@@ -33,5 +34,6 @@
#include <crypto/authenc.h>
#include <crypto/authenc.h>
#include <crypto/scatterwalk.h>
#include <crypto/scatterwalk.h>
#include <crypto/internal/skcipher.h>
#include <crypto/internal/skcipher.h>
#include <crypto/internal/hash.h>


#endif /* !defined(CAAM_COMPAT_H) */
#endif /* !defined(CAAM_COMPAT_H) */
+2 −0
Original line number Original line Diff line number Diff line
@@ -88,6 +88,8 @@ struct caam_drv_private {
	atomic_t tfm_count ____cacheline_aligned;
	atomic_t tfm_count ____cacheline_aligned;
	/* list of registered crypto algorithms (mk generic context handle?) */
	/* list of registered crypto algorithms (mk generic context handle?) */
	struct list_head alg_list;
	struct list_head alg_list;
	/* list of registered hash algorithms (mk generic context handle?) */
	struct list_head hash_list;


	/*
	/*
	 * debugfs entries for developer view into driver/device
	 * debugfs entries for developer view into driver/device
Loading