Lines Matching refs:hash

31 #include <crypto/hash.h>
75 MODULE_PARM_DESC(hash_pri, "Priority for hash algos");
512 * @digestsize: length of hash digest, in bytes
627 * handle_ahash_req() - Process an asynchronous hash request from the crypto
665 unsigned int chunksize = 0; /* length of hash carry + new data */
667 * length of new data, not from hash carry, to be submitted in
673 u32 db_size; /* Length of data field, incl gcm and hash padding */
674 int pad_len = 0; /* total pad len, including gcm, hash, stat padding */
710 * For hash algorithms below assignment looks bit odd but
711 * it's needed for AES-XCBC and AES-CMAC hash algorithms
713 * Based on the key values, hash algorithm is selected.
714 * For example for 128 bit key, hash algorithm is AES-128.
722 * Compute the amount remaining to hash. This may include data
738 u16 new_len; /* len of data to add to hash carry */
750 flow_log("Exiting with hash carry len: %u\n",
760 /* if we have hash carry, then prefix it to the data in this request */
887 * spu_hmac_outer_hash() - Request synchonous software compute of the outer hash
892 * Return: 0 if synchronous hash operation successful
893 * -EINVAL if the hash algo is unrecognized
937 * ahash_req_done() - Process a hash result from the SPU hardware.
968 /* if this an HMAC then do the outer hash */
988 * handle_ahash_resp() - Process a SPU response message for a hash request.
1002 * Save hash to use as input to next op if incremental. Might be copying
1029 * @digestsize: Length of hash digest, in bytes
1250 * Unlike incremental hash ops, where the spu returns the entire hash for
1251 * truncated algs like sha-224, the SPU returns just the truncated hash in
1680 * we saved data in hash carry, but tell crypto
1927 /* SPU2 hardware does not compute hash of zero length data */
1931 flow_log("Doing %sfinal %s zero-len hash request in software\n",
1950 * we saved data in hash carry, but tell crypto API
1977 /* If we add a hash whose digest is larger, catch it here. */
1994 * support incremental hash)
2021 struct crypto_shash *hash;
2029 * by calling synchronous hash functions.
2032 hash = crypto_alloc_shash(alg_name, 0, 0);
2033 if (IS_ERR(hash)) {
2034 ret = PTR_ERR(hash);
2041 crypto_shash_descsize(hash), gfp);
2046 ctx->shash->tfm = hash;
2050 ret = crypto_shash_setkey(hash, ctx->authkey,
2056 /* Initialize hash w/ this key and other params */
2070 crypto_free_shash(hash);
2102 * by calling synchronous hash functions.
2154 * by calling synchronous hash functions.
2158 /* Done with hash, can deallocate it now */
2196 * by calling synchronous hash functions.
2231 /* Done with hash, can deallocate it now */
2276 pr_err("%s() Error: unknown hash alg\n", __func__);
2372 pr_err("%s() Error: unknown hash alg\n", __func__);
2426 /* init the context as a hash */
2483 * outer hash in software.
2484 * Only for hash key len > hash block size, SPU2
2486 * it to digest size and feed it as hash key.
2537 * SPU-M on NSP has an issue where AES-CCM hash is not correct
3730 .alg.hash = {
3751 .alg.hash = {
3769 .alg.hash = {
3787 .alg.hash = {
3805 .alg.hash = {
3823 .alg.hash = {
3841 .alg.hash = {
3859 .alg.hash = {
3878 .alg.hash = {
3897 .alg.hash = {
3916 .alg.hash = {
3935 .alg.hash = {
3954 .alg.hash = {
3973 .alg.hash = {
3992 .alg.hash = {
4011 .alg.hash = {
4030 .alg.hash = {
4049 .alg.hash = {
4068 .alg.hash = {
4087 .alg.hash = {
4106 .alg.hash = {
4125 .alg.hash = {
4192 alg.hash);
4456 struct ahash_alg *hash = &driver_alg->alg.hash;
4459 /* AES-XCBC is the only AES hash type currently supported on SPU-M */
4470 hash->halg.base.cra_module = THIS_MODULE;
4471 hash->halg.base.cra_priority = hash_pri;
4472 hash->halg.base.cra_alignmask = 0;
4473 hash->halg.base.cra_ctxsize = sizeof(struct iproc_ctx_s);
4474 hash->halg.base.cra_init = ahash_cra_init;
4475 hash->halg.base.cra_exit = generic_cra_exit;
4476 hash->halg.base.cra_flags = CRYPTO_ALG_ASYNC |
4478 hash->halg.statesize = sizeof(struct spu_hash_export_s);
4481 hash->init = ahash_init;
4482 hash->update = ahash_update;
4483 hash->final = ahash_final;
4484 hash->finup = ahash_finup;
4485 hash->digest = ahash_digest;
4489 hash->setkey = ahash_setkey;
4492 hash->setkey = ahash_hmac_setkey;
4493 hash->init = ahash_hmac_init;
4494 hash->update = ahash_hmac_update;
4495 hash->final = ahash_hmac_final;
4496 hash->finup = ahash_hmac_finup;
4497 hash->digest = ahash_hmac_digest;
4499 hash->export = ahash_export;
4500 hash->import = ahash_import;
4502 err = crypto_register_ahash(hash);
4507 hash->halg.base.cra_driver_name);
4581 crypto_unregister_ahash(&driver_algs[j].alg.hash);
4739 crypto_unregister_ahash(&driver_algs[i].alg.hash);
4740 cdn = driver_algs[i].alg.hash.halg.base.cra_driver_name;
4741 dev_dbg(dev, " unregistered hash %s\n", cdn);