Home
last modified time | relevance | path

Searched refs:sha_ctx (Results 1 – 10 of 10) sorted by relevance

/linux/lib/crypto/
H A Dsha512.c305 __sha512_init(&ctx->sha_ctx, &key->istate, SHA512_BLOCK_SIZE); in __hmac_sha512_init()
313 __hmac_sha512_preparekey(&ctx->ctx.sha_ctx.state, &ctx->ctx.ostate, in hmac_sha384_init_usingrawkey()
315 ctx->ctx.sha_ctx.bytecount_lo = SHA512_BLOCK_SIZE; in hmac_sha384_init_usingrawkey()
316 ctx->ctx.sha_ctx.bytecount_hi = 0; in hmac_sha384_init_usingrawkey()
323 __hmac_sha512_preparekey(&ctx->ctx.sha_ctx.state, &ctx->ctx.ostate, in hmac_sha512_init_usingrawkey()
325 ctx->ctx.sha_ctx.bytecount_lo = SHA512_BLOCK_SIZE; in hmac_sha512_init_usingrawkey()
326 ctx->ctx.sha_ctx.bytecount_hi = 0; in hmac_sha512_init_usingrawkey()
333 /* Generate the padded input for the outer hash in ctx->sha_ctx.buf. */ in __hmac_sha512_final()
334 __sha512_final(&ctx->sha_ctx, ctx->sha_ctx in __hmac_sha512_final()
[all...]
H A Dsha256.c380 __sha256_init(&ctx->sha_ctx, &key->istate, SHA256_BLOCK_SIZE); in __hmac_sha256_init()
388 __hmac_sha256_preparekey(&ctx->ctx.sha_ctx.state, &ctx->ctx.ostate, in hmac_sha224_init_usingrawkey()
390 ctx->ctx.sha_ctx.bytecount = SHA256_BLOCK_SIZE; in hmac_sha224_init_usingrawkey()
397 __hmac_sha256_preparekey(&ctx->ctx.sha_ctx.state, &ctx->ctx.ostate, in hmac_sha256_init_usingrawkey()
399 ctx->ctx.sha_ctx.bytecount = SHA256_BLOCK_SIZE; in hmac_sha256_init_usingrawkey()
406 /* Generate the padded input for the outer hash in ctx->sha_ctx.buf. */ in __hmac_sha256_final()
407 __sha256_final(&ctx->sha_ctx, ctx->sha_ctx.buf, digest_size); in __hmac_sha256_final()
408 memset(&ctx->sha_ctx.buf[digest_size], 0, in __hmac_sha256_final()
410 ctx->sha_ctx in __hmac_sha256_final()
[all...]
/linux/crypto/
H A Dsha256.c223 return __crypto_sha256_export(&HMAC_SHA224_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha224_export()
231 return __crypto_sha256_import(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha224_import()
236 return __crypto_sha256_export_core(&HMAC_SHA224_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha224_export_core()
246 return __crypto_sha256_import_core(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha224_import_core()
290 return __crypto_sha256_export(&HMAC_SHA256_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha256_export()
298 return __crypto_sha256_import(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha256_import()
303 return __crypto_sha256_export_core(&HMAC_SHA256_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha256_export_core()
313 return __crypto_sha256_import_core(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha256_import_core()
H A Dsha512.c229 return __crypto_sha512_export(&HMAC_SHA384_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha384_export()
237 return __crypto_sha512_import(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha384_import()
242 return __crypto_sha512_export_core(&HMAC_SHA384_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha384_export_core()
252 return __crypto_sha512_import_core(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha384_import_core()
296 return __crypto_sha512_export(&HMAC_SHA512_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha512_export()
304 return __crypto_sha512_import(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha512_import()
309 return __crypto_sha512_export_core(&HMAC_SHA512_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha512_export_core()
319 return __crypto_sha512_import_core(&ctx->ctx.sha_ctx, in); in crypto_hmac_sha512_import_core()
H A Dsha1.c157 return __crypto_sha1_export(&HMAC_SHA1_CTX(desc)->sha_ctx, out); in crypto_hmac_sha1_export()
165 return __crypto_sha1_import(&ctx->sha_ctx, in); in crypto_hmac_sha1_import()
170 return __crypto_sha1_export_core(&HMAC_SHA1_CTX(desc)->sha_ctx, out); in crypto_hmac_sha1_export_core()
178 return __crypto_sha1_import_core(&ctx->sha_ctx, in); in crypto_hmac_sha1_import_core()
/linux/security/keys/trusted-keys/
H A Dtrusted_tpm1.c138 struct sha1_ctx sha_ctx; in TSS_authhmac()
149 sha1_init(&sha_ctx); in TSS_authhmac()
160 sha1_update(&sha_ctx, data, dlen); in TSS_authhmac()
164 sha1_final(&sha_ctx, paramdigest); in TSS_authhmac()
190 struct sha1_ctx sha_ctx; in TSS_checkhmac1()
211 sha1_init(&sha_ctx); in TSS_checkhmac1()
212 sha1_update(&sha_ctx, (const u8 *)&result, sizeof(result)); in TSS_checkhmac1()
213 sha1_update(&sha_ctx, (const u8 *)&ordinal, sizeof(ordinal)); in TSS_checkhmac1()
220 sha1_update(&sha_ctx, buffer + dpos, dlen); in TSS_checkhmac1()
223 sha1_final(&sha_ctx, paramdiges in TSS_checkhmac1()
133 struct sha1_ctx sha_ctx; TSS_authhmac() local
185 struct sha1_ctx sha_ctx; TSS_checkhmac1() local
255 struct sha1_ctx sha_ctx; TSS_checkhmac2() local
[all...]
/linux/include/crypto/
H A Dsha2.h144 struct __sha256_ctx sha_ctx; member
278 __sha256_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha224_update()
482 __sha256_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha256_update()
557 struct __sha512_ctx sha_ctx; member
691 __sha512_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha384_update()
866 __sha512_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha512_update()
/linux/fs/smb/client/
H A Dsmb2misc.c926 struct sha512_ctx sha_ctx; in smb311_update_preauth_hash() local
952 sha512_init(&sha_ctx); in smb311_update_preauth_hash()
953 sha512_update(&sha_ctx, ses->preauth_sha_hash, SMB2_PREAUTH_HASH_SIZE); in smb311_update_preauth_hash()
955 sha512_update(&sha_ctx, iov[i].iov_base, iov[i].iov_len); in smb311_update_preauth_hash()
956 sha512_final(&sha_ctx, ses->preauth_sha_hash); in smb311_update_preauth_hash()
/linux/fs/smb/server/
H A Dauth.c703 struct sha512_ctx sha_ctx; in ksmbd_gen_preauth_integrity_hash() local
709 sha512_init(&sha_ctx); in ksmbd_gen_preauth_integrity_hash()
710 sha512_update(&sha_ctx, pi_hash, 64); in ksmbd_gen_preauth_integrity_hash()
711 sha512_update(&sha_ctx, all_bytes_msg, msg_size); in ksmbd_gen_preauth_integrity_hash()
712 sha512_final(&sha_ctx, pi_hash); in ksmbd_gen_preauth_integrity_hash()
/linux/net/ipv6/
H A Daddrconf.c3366 static struct sha1_ctx sha_ctx; in ipv6_generate_stable_address() local
3394 sha1_init(&sha_ctx); in ipv6_generate_stable_address()
3403 sha1_update(&sha_ctx, data.__data, sizeof(data)); in ipv6_generate_stable_address()
3412 temp.s6_addr32[2] = (__force __be32)sha_ctx.state.h[0]; in ipv6_generate_stable_address()
3413 temp.s6_addr32[3] = (__force __be32)sha_ctx.state.h[1]; in ipv6_generate_stable_address()