/linux-master/crypto/ |
H A D | cryptd.c | 15 #include <crypto/internal/hash.h> 436 struct crypto_shash *hash; local 438 hash = crypto_spawn_shash(spawn); 439 if (IS_ERR(hash)) 440 return PTR_ERR(hash); 442 ctx->child = hash; 445 crypto_shash_descsize(hash)); 454 struct crypto_shash *hash; local 456 hash = crypto_clone_shash(ctx->child); 457 if (IS_ERR(hash)) [all...] |
H A D | crypto_engine.c | 13 #include <crypto/internal/hash.h>
|
H A D | ecdsa.c | 94 static int _ecdsa_verify(struct ecc_ctx *ctx, const u64 *hash, const u64 *r, const u64 *s) argument 110 /* hash is given */ 111 pr_devel("hash : %016llx %016llx ... %016llx\n", 112 hash[ndigits - 1], hash[ndigits - 2], hash[0]); 116 /* u1 = (hash * s1) mod n */ 117 vli_mod_mult_slow(u1, hash, s1, curve->n, ndigits); 146 u64 hash[ECC_MAX_DIGITS]; local 167 /* if the hash i [all...] |
H A D | essiv.c | 7 * used for block encryption, by encrypting it using the hash of the 34 #include <crypto/internal/hash.h> 56 struct crypto_shash *hash; member in struct:essiv_tfm_ctx 81 err = crypto_shash_tfm_digest(tctx->hash, key, keylen, salt); 90 crypto_shash_digestsize(tctx->hash)); 97 SHASH_DESC_ON_STACK(desc, tctx->hash); 112 desc->tfm = tctx->hash; 123 crypto_shash_digestsize(tctx->hash)); 274 struct crypto_shash *hash; local 281 hash [all...] |
H A D | gcm.c | 11 #include <crypto/internal/hash.h> 15 #include <crypto/hash.h> 99 be128 hash; member in struct:__anon132 122 sg_init_one(data->sg, &data->hash, sizeof(data->hash)); 129 sizeof(data->hash), data->iv); 140 err = crypto_ahash_setkey(ghash, (u8 *)&data->hash, sizeof(be128));
|
H A D | ghash-generic.c | 3 * GHASH: hash function for GCM (Galois/Counter Mode). 11 * GHASH is a keyed hash function used in GCM authentication tag generation. 14 * takes a 16-byte hash key H, additional authenticated data A, and a ciphertext 22 * since the API supports only a single data stream per hash. Thus, the 28 * an "��-almost-XOR-universal hash function", not a cryptographic hash function. 40 #include <crypto/internal/hash.h> 182 MODULE_DESCRIPTION("GHASH hash function");
|
H A D | hash.h | 10 #include <crypto/internal/hash.h>
|
H A D | hctr2.c | 20 #include <crypto/internal/hash.h> 50 * This struct is allocated with extra space for two exported hash 51 * states. Since the hash state size is not known at compile-time, we 75 * This struct is allocated with extra space for one exported hash 76 * state. Since the hash state size is not known at compile-time, we 100 * The input data for each HCTR2 hash step begins with a 16-byte block that 103 * length, we precompute the two hash states resulting from hashing the two 460 /* Polyval ��-���U hash function */ 490 * The hash function is called twice, so it is weighted higher than the
|
H A D | hmac.c | 15 #include <crypto/internal/hash.h> 26 struct crypto_shash *hash; member in struct:hmac_ctx 38 struct crypto_shash *hash = tctx->hash; local 41 SHASH_DESC_ON_STACK(shash, hash); 47 shash->tfm = hash; 88 desc->tfm = tctx->hash; 140 struct crypto_shash *hash; local 145 hash = crypto_spawn_shash(spawn); 146 if (IS_ERR(hash)) 160 struct crypto_shash *hash; local [all...] |
H A D | jitterentropy-kcapi.c | 40 #include <crypto/hash.h> 153 * Insert the time stamp into the hash context representing the pool. 226 struct crypto_shash *hash; local 236 * Jitter RNG's unpredictable behavior. If we have a slower hash 241 hash = crypto_alloc_shash(JENT_CONDITIONING_HASH, 0, 0); 242 if (IS_ERR(hash)) { 244 return PTR_ERR(hash); 246 rng->tfm = hash; 248 size = sizeof(struct shash_desc) + crypto_shash_descsize(hash); 255 sdesc->tfm = hash; [all...] |
H A D | md5.c | 18 #include <crypto/internal/hash.h> 40 static void md5_transform(__u32 *hash, __u32 const *in) argument 44 a = hash[0]; 45 b = hash[1]; 46 c = hash[2]; 47 d = hash[3]; 117 hash[0] += a; 118 hash[1] += b; 119 hash[2] += c; 120 hash[ [all...] |
H A D | michael_mic.c | 9 #include <crypto/internal/hash.h>
|
H A D | nhpoly1305.c | 3 * NHPoly1305 - ��-almost-���-universal hash function for Adiantum 15 * ��-almost-���-universal (��-���U) hash function for equal-length inputs over 17 * chunks of the input with the NH hash function [2], reducing the input length 23 * This is *not* a cryptographic hash function; do not use it as such! 35 #include <crypto/internal/hash.h> 43 __le64 hash[NH_NUM_PASSES]) 69 hash[0] = cpu_to_le64(sums[0]); 70 hash[1] = cpu_to_le64(sums[1]); 71 hash[2] = cpu_to_le64(sums[2]); 72 hash[ 42 nh_generic(const u32 *key, const u8 *message, size_t message_len, __le64 hash[NH_NUM_PASSES]) argument [all...] |
H A D | poly1305_generic.c | 15 #include <crypto/internal/hash.h>
|
H A D | polyval-generic.c | 3 * POLYVAL: hash function for HCTR2. 14 * POLYVAL is a keyed hash function similar to GHASH. POLYVAL uses a different 26 * Like GHASH, POLYVAL is not a cryptographic hash function and should 51 #include <crypto/internal/hash.h> 243 MODULE_DESCRIPTION("POLYVAL hash function");
|
H A D | sha1_generic.c | 14 #include <crypto/internal/hash.h>
|
H A D | sha256_generic.c | 10 #include <crypto/internal/hash.h> 54 unsigned int len, u8 *hash) 57 return crypto_sha256_final(desc, hash); 53 crypto_sha256_finup(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *hash) argument
|
H A D | sha3_generic.c | 11 #include <crypto/internal/hash.h>
|
H A D | sha512_generic.c | 8 #include <crypto/internal/hash.h> 164 static int sha512_final(struct shash_desc *desc, u8 *hash) argument 167 return sha512_base_finish(desc, hash); 171 unsigned int len, u8 *hash) 174 return sha512_final(desc, hash); 170 crypto_sha512_finup(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *hash) argument
|
H A D | shash.c | 17 #include "hash.h" 198 struct crypto_shash *hash = __crypto_shash_cast(tfm); local 199 struct shash_alg *alg = crypto_shash_alg(hash); 201 alg->exit_tfm(hash); 206 struct crypto_shash *hash = __crypto_shash_cast(tfm); local 207 struct shash_alg *alg = crypto_shash_alg(hash); 210 hash->descsize = alg->descsize; 212 shash_set_needkey(hash, alg); 220 err = alg->init_tfm(hash); 225 if (WARN_ON_ONCE(hash 315 crypto_clone_shash(struct crypto_shash *hash) argument [all...] |
H A D | sm2.c | 15 #include <crypto/hash.h> 326 static int _sm2_verify(struct mpi_ec_ctx *ec, MPI hash, MPI sig_r, MPI sig_s) argument 359 mpi_addm(t, hash, x1, ec->n); 384 MPI hash; local 406 hash = mpi_read_raw_data(buffer + req->src_len, req->dst_len); 407 if (!hash) 410 ret = _sm2_verify(ec, hash, sig.sig_r, sig.sig_s); 412 mpi_free(hash);
|
H A D | sm3_generic.c | 3 * SM3 secure hash, as specified by OSCCA GM/T 0004-2012 SM3 and 4 * described at https://tools.ietf.org/html/draft-shen-sm3-hash-01 11 #include <crypto/internal/hash.h> 44 unsigned int len, u8 *hash) 50 sm3_final(sctx, hash); 43 crypto_sm3_finup(struct shash_desc *desc, const u8 *data, unsigned int len, u8 *hash) argument
|
H A D | streebog_generic.c | 3 * Streebog hash function as specified by GOST R 34.11-2012 and 15 #include <crypto/internal/hash.h> 999 memcpy(&ctx->hash, &ctx->h, sizeof(struct streebog_uint512)); 1043 memcpy(digest, &ctx->hash.qword[4], STREEBOG256_DIGEST_SIZE); 1045 memcpy(digest, &ctx->hash.qword[0], STREEBOG512_DIGEST_SIZE);
|
H A D | tcrypt.c | 23 #include <crypto/hash.h>
|
H A D | testmgr.c | 20 #include <crypto/hash.h> 150 struct hash_test_suite hash; member in union:alg_test_desc::__anon149 216 /* flush type for hash algorithms */ 228 /* finalization function for hash algorithms */ 1267 /* Test one hash test vector in one configuration, using the shash API */ 1450 /* Test one hash test vector in one configuration, using the ahash API */ 1684 * Generate a hash test vector from the given implementation. 1726 * Test the hash algorithm represented by @req against the corresponding generic 1772 pr_warn("alg: hash: skipping comparison tests for %s because %s is unavailable\n", 1776 pr_err("alg: hash [all...] |