Lines Matching defs:hash
10 #include <crypto/internal/hash.h>
67 rctx->csr.hash.hmac = 1;
68 rctx->csr.hash.key_flag = 1;
70 writel(rctx->csr.hash.v, cryp->base + STARFIVE_HASH_SHACSR);
174 rctx->csr.hash.v = 0;
175 rctx->csr.hash.reset = 1;
176 writel(rctx->csr.hash.v, cryp->base + STARFIVE_HASH_SHACSR);
181 rctx->csr.hash.v = 0;
182 rctx->csr.hash.mode = ctx->hash_mode;
183 rctx->csr.hash.ie = 1;
190 rctx->csr.hash.start = 1;
191 rctx->csr.hash.firstb = 1;
192 writel(rctx->csr.hash.v, cryp->base + STARFIVE_HASH_SHACSR);
406 static int starfive_hash_init_tfm(struct crypto_ahash *hash,
410 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
424 crypto_ahash_set_statesize(hash, crypto_ahash_statesize(ctx->ahash_fbk));
425 crypto_ahash_set_reqsize(hash, sizeof(struct starfive_cryp_request_ctx) +
434 static void starfive_hash_exit_tfm(struct crypto_ahash *hash)
436 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
487 static int starfive_hash_setkey(struct crypto_ahash *hash,
490 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
491 unsigned int digestsize = crypto_ahash_digestsize(hash);
492 unsigned int blocksize = crypto_ahash_blocksize(hash);
528 static int starfive_sha224_init_tfm(struct crypto_ahash *hash)
530 return starfive_hash_init_tfm(hash, "sha224-generic",
534 static int starfive_sha256_init_tfm(struct crypto_ahash *hash)
536 return starfive_hash_init_tfm(hash, "sha256-generic",
540 static int starfive_sha384_init_tfm(struct crypto_ahash *hash)
542 return starfive_hash_init_tfm(hash, "sha384-generic",
546 static int starfive_sha512_init_tfm(struct crypto_ahash *hash)
548 return starfive_hash_init_tfm(hash, "sha512-generic",
552 static int starfive_sm3_init_tfm(struct crypto_ahash *hash)
554 return starfive_hash_init_tfm(hash, "sm3-generic",
558 static int starfive_hmac_sha224_init_tfm(struct crypto_ahash *hash)
560 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
564 return starfive_hash_init_tfm(hash, "hmac(sha224-generic)",
568 static int starfive_hmac_sha256_init_tfm(struct crypto_ahash *hash)
570 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
574 return starfive_hash_init_tfm(hash, "hmac(sha256-generic)",
578 static int starfive_hmac_sha384_init_tfm(struct crypto_ahash *hash)
580 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
584 return starfive_hash_init_tfm(hash, "hmac(sha384-generic)",
588 static int starfive_hmac_sha512_init_tfm(struct crypto_ahash *hash)
590 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
594 return starfive_hash_init_tfm(hash, "hmac(sha512-generic)",
598 static int starfive_hmac_sm3_init_tfm(struct crypto_ahash *hash)
600 struct starfive_cryp_ctx *ctx = crypto_ahash_ctx(hash);
604 return starfive_hash_init_tfm(hash, "hmac(sm3-generic)",