Lines Matching refs:hash
33 #include <crypto/hash.h>
75 MODULE_PARM_DESC(hash_pri, "Priority for hash algos");
514 * @digestsize: length of hash digest, in bytes
629 * handle_ahash_req() - Process an asynchronous hash request from the crypto
667 unsigned int chunksize = 0; /* length of hash carry + new data */
669 * length of new data, not from hash carry, to be submitted in
675 u32 db_size; /* Length of data field, incl gcm and hash padding */
676 int pad_len = 0; /* total pad len, including gcm, hash, stat padding */
712 * For hash algorithms below assignment looks bit odd but
713 * it's needed for AES-XCBC and AES-CMAC hash algorithms
715 * Based on the key values, hash algorithm is selected.
716 * For example for 128 bit key, hash algorithm is AES-128.
724 * Compute the amount remaining to hash. This may include data
740 u16 new_len; /* len of data to add to hash carry */
752 flow_log("Exiting with hash carry len: %u\n",
762 /* if we have hash carry, then prefix it to the data in this request */
889 * spu_hmac_outer_hash() - Request synchonous software compute of the outer hash
894 * Return: 0 if synchronous hash operation successful
895 * -EINVAL if the hash algo is unrecognized
939 * ahash_req_done() - Process a hash result from the SPU hardware.
970 /* if this an HMAC then do the outer hash */
990 * handle_ahash_resp() - Process a SPU response message for a hash request.
1006 * Save hash to use as input to next op if incremental. Might be copying
1032 * @digestsize: Length of hash digest, in bytes
1253 * Unlike incremental hash ops, where the spu returns the entire hash for
1254 * truncated algs like sha-224, the SPU returns just the truncated hash in
1683 * we saved data in hash carry, but tell crypto
1930 /* SPU2 hardware does not compute hash of zero length data */
1934 flow_log("Doing %sfinal %s zero-len hash request in software\n",
1953 * we saved data in hash carry, but tell crypto API
1980 /* If we add a hash whose digest is larger, catch it here. */
1997 * support incremental hash)
2024 struct crypto_shash *hash;
2032 * by calling synchronous hash functions.
2035 hash = crypto_alloc_shash(alg_name, 0, 0);
2036 if (IS_ERR(hash)) {
2037 ret = PTR_ERR(hash);
2044 crypto_shash_descsize(hash), gfp);
2049 ctx->shash->tfm = hash;
2053 ret = crypto_shash_setkey(hash, ctx->authkey,
2059 /* Initialize hash w/ this key and other params */
2073 crypto_free_shash(hash);
2105 * by calling synchronous hash functions.
2157 * by calling synchronous hash functions.
2161 /* Done with hash, can deallocate it now */
2199 * by calling synchronous hash functions.
2234 /* Done with hash, can deallocate it now */
2279 pr_err("%s() Error: unknown hash alg\n", __func__);
2375 pr_err("%s() Error: unknown hash alg\n", __func__);
2428 /* init the context as a hash */
2485 * outer hash in software.
2486 * Only for hash key len > hash block size, SPU2
2488 * it to digest size and feed it as hash key.
2539 * SPU-M on NSP has an issue where AES-CCM hash is not correct
3769 .alg.hash = {
3790 .alg.hash = {
3808 .alg.hash = {
3826 .alg.hash = {
3844 .alg.hash = {
3862 .alg.hash = {
3880 .alg.hash = {
3898 .alg.hash = {
3917 .alg.hash = {
3936 .alg.hash = {
3955 .alg.hash = {
3974 .alg.hash = {
3993 .alg.hash = {
4012 .alg.hash = {
4031 .alg.hash = {
4050 .alg.hash = {
4069 .alg.hash = {
4088 .alg.hash = {
4107 .alg.hash = {
4126 .alg.hash = {
4145 .alg.hash = {
4164 .alg.hash = {
4231 alg.hash);
4488 struct ahash_alg *hash = &driver_alg->alg.hash;
4491 /* AES-XCBC is the only AES hash type currently supported on SPU-M */
4502 hash->halg.base.cra_module = THIS_MODULE;
4503 hash->halg.base.cra_priority = hash_pri;
4504 hash->halg.base.cra_alignmask = 0;
4505 hash->halg.base.cra_ctxsize = sizeof(struct iproc_ctx_s);
4506 hash->halg.base.cra_init = ahash_cra_init;
4507 hash->halg.base.cra_exit = generic_cra_exit;
4508 hash->halg.base.cra_flags = CRYPTO_ALG_ASYNC |
4510 hash->halg.statesize = sizeof(struct spu_hash_export_s);
4513 hash->init = ahash_init;
4514 hash->update = ahash_update;
4515 hash->final = ahash_final;
4516 hash->finup = ahash_finup;
4517 hash->digest = ahash_digest;
4521 hash->setkey = ahash_setkey;
4524 hash->setkey = ahash_hmac_setkey;
4525 hash->init = ahash_hmac_init;
4526 hash->update = ahash_hmac_update;
4527 hash->final = ahash_hmac_final;
4528 hash->finup = ahash_hmac_finup;
4529 hash->digest = ahash_hmac_digest;
4531 hash->export = ahash_export;
4532 hash->import = ahash_import;
4534 err = crypto_register_ahash(hash);
4539 hash->halg.base.cra_driver_name);
4613 crypto_unregister_ahash(&driver_algs[j].alg.hash);
4771 crypto_unregister_ahash(&driver_algs[i].alg.hash);
4772 cdn = driver_algs[i].alg.hash.halg.base.cra_driver_name;
4773 dev_dbg(dev, " unregistered hash %s\n", cdn);