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()
334 __sha512_final(&ctx->sha_ctx, ctx->sha_ctx.buf, digest_size); in __hmac_sha512_final()
335 memset(&ctx->sha_ctx.buf[digest_size], 0, in __hmac_sha512_final()
337 ctx->sha_ctx.buf[digest_size] = 0x80; in __hmac_sha512_final()
[all …]
H A Dsha1.c277 ctx->sha_ctx.state = key->istate; in hmac_sha1_init()
278 ctx->sha_ctx.bytecount = SHA1_BLOCK_SIZE; in hmac_sha1_init()
286 __hmac_sha1_preparekey(&ctx->sha_ctx.state, &ctx->ostate, in hmac_sha1_init_usingrawkey()
288 ctx->sha_ctx.bytecount = SHA1_BLOCK_SIZE; in hmac_sha1_init_usingrawkey()
295 __sha1_final(&ctx->sha_ctx, ctx->sha_ctx.buf); in hmac_sha1_final()
296 memset(&ctx->sha_ctx.buf[SHA1_DIGEST_SIZE], 0, in hmac_sha1_final()
298 ctx->sha_ctx.buf[SHA1_DIGEST_SIZE] = 0x80; in hmac_sha1_final()
299 *(__be32 *)&ctx->sha_ctx.buf[SHA1_BLOCK_SIZE - 4] = in hmac_sha1_final()
303 sha1_blocks(&ctx->ostate, ctx->sha_ctx.buf, 1); in hmac_sha1_final()
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()
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.buf[digest_size] = 0x80; in __hmac_sha256_final()
411 *(__be32 *)&ctx->sha_ctx.buf[SHA256_BLOCK_SIZE - 4] = in __hmac_sha256_final()
415 sha256_blocks(&ctx->ostate, ctx->sha_ctx.buf, 1); in __hmac_sha256_final()
/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/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()
H A Dsha1.h115 struct sha1_ctx sha_ctx; member
172 sha1_update(&ctx->sha_ctx, data, data_len); in hmac_sha1_update()
/linux/fs/smb/client/
H A Dsmb2misc.c899 struct sha512_ctx sha_ctx; in smb311_update_preauth_hash() local
925 sha512_init(&sha_ctx); in smb311_update_preauth_hash()
926 sha512_update(&sha_ctx, ses->preauth_sha_hash, SMB2_PREAUTH_HASH_SIZE); in smb311_update_preauth_hash()
928 sha512_update(&sha_ctx, iov[i].iov_base, iov[i].iov_len); in smb311_update_preauth_hash()
929 sha512_final(&sha_ctx, ses->preauth_sha_hash); in smb311_update_preauth_hash()
/linux/fs/smb/server/
H A Dauth.c720 struct sha512_ctx sha_ctx; in ksmbd_gen_preauth_integrity_hash() local
726 sha512_init(&sha_ctx); in ksmbd_gen_preauth_integrity_hash()
727 sha512_update(&sha_ctx, pi_hash, 64); in ksmbd_gen_preauth_integrity_hash()
728 sha512_update(&sha_ctx, all_bytes_msg, msg_size); in ksmbd_gen_preauth_integrity_hash()
729 sha512_final(&sha_ctx, pi_hash); in ksmbd_gen_preauth_integrity_hash()