Home
last modified time | relevance | path

Searched refs:SHA256_BLOCK_SIZE (Results 1 – 25 of 47) sorted by relevance

12

/linux/lib/crypto/
H A Dsha256.c153 data += SHA256_BLOCK_SIZE; in sha256_blocks_generic()
187 size_t partial = ctx->bytecount % SHA256_BLOCK_SIZE; in __sha256_update()
191 if (partial + len >= SHA256_BLOCK_SIZE) { in __sha256_update()
195 size_t l = SHA256_BLOCK_SIZE - partial; in __sha256_update()
204 nblocks = len / SHA256_BLOCK_SIZE; in __sha256_update()
205 len %= SHA256_BLOCK_SIZE; in __sha256_update()
209 data += nblocks * SHA256_BLOCK_SIZE; in __sha256_update()
222 size_t partial = ctx->bytecount % SHA256_BLOCK_SIZE; in __sha256_final()
225 if (partial > SHA256_BLOCK_SIZE - 8) { in __sha256_final()
226 memset(&ctx->buf[partial], 0, SHA256_BLOCK_SIZE - partial); in __sha256_final()
[all …]
/linux/drivers/crypto/inside-secure/eip93/
H A Deip93-hash.h20 u8 ipad[SHA256_BLOCK_SIZE] __aligned(sizeof(u32));
49 u8 data[SHA256_BLOCK_SIZE] __aligned(sizeof(u32));
57 u8 data[SHA256_BLOCK_SIZE] __aligned(sizeof(u32));
68 u8 data[SHA256_BLOCK_SIZE] __aligned(sizeof(u32));
H A Deip93-common.c708 u8 ipad[SHA256_BLOCK_SIZE], opad[SHA256_BLOCK_SIZE]; in eip93_hmac_setkey()
750 if (keylen > SHA256_BLOCK_SIZE) { in eip93_hmac_setkey()
764 memset(ipad + keylen, 0, SHA256_BLOCK_SIZE - keylen); in eip93_hmac_setkey()
765 memcpy(opad, ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
768 for (i = 0; i < SHA256_BLOCK_SIZE; i++) { in eip93_hmac_setkey()
774 memcpy(dest_ipad, ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
777 sg_init_one(&sg[0], ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
778 ahash_request_set_crypt(req, sg, dest_ipad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
792 sg_init_one(&sg[0], opad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
793 ahash_request_set_crypt(req, sg, dest_opad, SHA256_BLOCK_SIZE); in eip93_hmac_setkey()
H A Deip93-hash.c31 SHA256_BLOCK_SIZE, DMA_TO_DEVICE); in eip93_hash_free_data_blocks()
301 memcpy(rctx->data, ctx->ipad, SHA256_BLOCK_SIZE); in eip93_hash_init()
303 rctx->data_used = SHA256_BLOCK_SIZE; in eip93_hash_init()
304 rctx->len += SHA256_BLOCK_SIZE; in eip93_hash_init()
328 max_read = SHA256_BLOCK_SIZE - offset; in __eip93_hash_update()
352 max_read = SHA256_BLOCK_SIZE; in __eip93_hash_update()
376 SHA256_BLOCK_SIZE, wait_req); in __eip93_hash_update()
744 .cra_blocksize = SHA256_BLOCK_SIZE,
868 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/drivers/crypto/
H A Dpadlock-sha.c234 .cra_blocksize = SHA256_BLOCK_SIZE,
266 int blocks = len / SHA256_BLOCK_SIZE; in padlock_sha256_update_nano()
268 len -= blocks * SHA256_BLOCK_SIZE; in padlock_sha256_update_nano()
269 state->count += blocks * SHA256_BLOCK_SIZE; in padlock_sha256_update_nano()
314 .cra_blocksize = SHA256_BLOCK_SIZE,
H A Domap-sham.c416 d = SHA256_BLOCK_SIZE; in get_block_size()
974 bs = SHA256_BLOCK_SIZE; in omap_sham_init()
1555 .cra_blocksize = SHA256_BLOCK_SIZE,
1602 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/lib/crypto/powerpc/
H A Dsha256.h49 MAX_BYTES / SHA256_BLOCK_SIZE); in sha256_blocks()
55 data += unit * SHA256_BLOCK_SIZE; in sha256_blocks()
/linux/lib/crypto/tests/
H A Dsha256_kunit.c59 u8 salt[SHA256_BLOCK_SIZE]; in test_sha256_finup_2x()
133 const size_t data_len = 4 * SHA256_BLOCK_SIZE; in test_sha256_finup_2x_hugelen()
139 for (size_t align = 0; align < SHA256_BLOCK_SIZE; align++) { in test_sha256_finup_2x_hugelen()
/linux/drivers/crypto/nx/
H A Dnx-sha256.c99 to_process = total & ~(SHA256_BLOCK_SIZE - 1); in nx_sha256_update()
132 } while (leftover >= SHA256_BLOCK_SIZE); in nx_sha256_update()
256 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/crypto/
H A Dsha256.c35 partial = ctx.bytecount % SHA256_BLOCK_SIZE; in __crypto_sha256_export()
341 .base.cra_blocksize = SHA256_BLOCK_SIZE,
379 .base.cra_blocksize = SHA256_BLOCK_SIZE,
/linux/include/crypto/
H A Dsha2.h15 #define SHA256_BLOCK_SIZE 64 macro
108 u8 buf[SHA256_BLOCK_SIZE];
130 u8 buf[SHA256_BLOCK_SIZE] __aligned(__alignof__(__be64));
/linux/lib/crypto/s390/
H A Dsha256.h17 nblocks * SHA256_BLOCK_SIZE); in sha256_blocks()
/linux/drivers/crypto/qce/
H A Dsha.h16 #define QCE_SHA_MAX_BLOCKSIZE SHA256_BLOCK_SIZE
H A Dsha.c428 .blocksize = SHA256_BLOCK_SIZE,
446 .blocksize = SHA256_BLOCK_SIZE,
/linux/lib/crypto/mips/
H A Dsha256.h50 data += SHA256_BLOCK_SIZE; in sha256_blocks()
/linux/lib/crypto/arm64/
H A Dsha256.h50 if (static_branch_likely(&have_ce) && len >= SHA256_BLOCK_SIZE && in sha256_finup_2x_arch()
/linux/lib/crypto/x86/
H A Dsha256.h80 if (static_branch_likely(&have_sha_ni) && len >= SHA256_BLOCK_SIZE && in sha256_finup_2x_arch()
/linux/fs/verity/
H A Dhash_algs.c15 .block_size = SHA256_BLOCK_SIZE,
/linux/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c1247 req->block_sz = SHA256_BLOCK_SIZE; in safexcel_sha256_init()
1283 .cra_blocksize = SHA256_BLOCK_SIZE,
1304 req->block_sz = SHA256_BLOCK_SIZE; in safexcel_sha224_init()
1367 req->len = SHA256_BLOCK_SIZE; in safexcel_hmac_sha224_init()
1368 req->processed = SHA256_BLOCK_SIZE; in safexcel_hmac_sha224_init()
1374 req->block_sz = SHA256_BLOCK_SIZE; in safexcel_hmac_sha224_init()
1439 req->len = SHA256_BLOCK_SIZE; in safexcel_hmac_sha256_init()
1440 req->processed = SHA256_BLOCK_SIZE; in safexcel_hmac_sha256_init()
1446 req->block_sz = SHA256_BLOCK_SIZE; in safexcel_hmac_sha256_init()
1484 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/drivers/crypto/axis/
H A Dartpec6_crypto.c291 char partial_buffer[SHA256_BLOCK_SIZE];
292 char partial_buffer_out[SHA256_BLOCK_SIZE];
293 char key_buffer[SHA256_BLOCK_SIZE];
294 char pad_buffer[SHA256_BLOCK_SIZE + 32];
305 char partial_buffer[SHA256_BLOCK_SIZE];
314 char hmac_key[SHA256_BLOCK_SIZE];
2663 .cra_blocksize = SHA256_BLOCK_SIZE,
2687 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss.h236 u8 key[SHA256_BLOCK_SIZE];
/linux/drivers/crypto/intel/keembay/
H A Dkeembay-ocs-hcu-core.c594 rctx->blk_sz = SHA256_BLOCK_SIZE; in kmb_ocs_hcu_init()
961 .cra_blocksize = SHA256_BLOCK_SIZE,
987 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/arch/s390/crypto/
H A Dphmac_s390.c120 #define PHMAC_SHA256_PK_SIZE (SHA256_BLOCK_SIZE + 32)
396 case SHA256_BLOCK_SIZE: in kmac_sha2_set_imbl()
/linux/drivers/crypto/aspeed/
H A Daspeed-hace-hash.c568 rctx->block_size = SHA256_BLOCK_SIZE; in aspeed_sham_init()
673 .cra_blocksize = SHA256_BLOCK_SIZE,
/linux/drivers/crypto/starfive/
H A Djh7110-hash.c635 .cra_blocksize = SHA256_BLOCK_SIZE,
664 .cra_blocksize = SHA256_BLOCK_SIZE,

12