Home
last modified time | relevance | path

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

123

/OK3568_Linux_fs/kernel/include/crypto/
H A Dsha256_base.h43 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_base_do_update()
47 if (unlikely((partial + len) >= SHA256_BLOCK_SIZE)) { in sha256_base_do_update()
51 int p = SHA256_BLOCK_SIZE - partial; in sha256_base_do_update()
60 blocks = len / SHA256_BLOCK_SIZE; in sha256_base_do_update()
61 len %= SHA256_BLOCK_SIZE; in sha256_base_do_update()
65 data += blocks * SHA256_BLOCK_SIZE; in sha256_base_do_update()
78 const int bit_offset = SHA256_BLOCK_SIZE - sizeof(__be64); in sha256_base_do_finalize()
81 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_base_do_finalize()
85 memset(sctx->buf + partial, 0x0, SHA256_BLOCK_SIZE - partial); in sha256_base_do_finalize()
/OK3568_Linux_fs/kernel/net/mptcp/
H A Dcrypto.c46 u8 input[SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE]; in mptcp_crypto_hmac_sha()
58 memset(input, 0x36, SHA256_BLOCK_SIZE); in mptcp_crypto_hmac_sha()
64 memcpy(&input[SHA256_BLOCK_SIZE], msg, len); in mptcp_crypto_hmac_sha()
69 sha256(input, SHA256_BLOCK_SIZE + len, &input[SHA256_BLOCK_SIZE]); in mptcp_crypto_hmac_sha()
72 memset(input, 0x5C, SHA256_BLOCK_SIZE); in mptcp_crypto_hmac_sha()
78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac); in mptcp_crypto_hmac_sha()
/OK3568_Linux_fs/kernel/arch/sparc/crypto/
H A Dsha256_glue.c68 done = SHA256_BLOCK_SIZE - partial; in __sha256_sparc64_update()
72 if (len - done >= SHA256_BLOCK_SIZE) { in __sha256_sparc64_update()
73 const unsigned int rounds = (len - done) / SHA256_BLOCK_SIZE; in __sha256_sparc64_update()
76 done += rounds * SHA256_BLOCK_SIZE; in __sha256_sparc64_update()
86 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_sparc64_update()
89 if (partial + len < SHA256_BLOCK_SIZE) { in sha256_sparc64_update()
104 static const u8 padding[SHA256_BLOCK_SIZE] = { 0x80, }; in sha256_sparc64_final()
109 index = sctx->count % SHA256_BLOCK_SIZE; in sha256_sparc64_final()
110 padlen = (index < 56) ? (56 - index) : ((SHA256_BLOCK_SIZE+56) - index); in sha256_sparc64_final()
172 .cra_blocksize = SHA256_BLOCK_SIZE,
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852be/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
H A Dsha256_i.h12 #define SHA256_BLOCK_SIZE 64 macro
17 u8 buf[SHA256_BLOCK_SIZE];
/OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723cs/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8188fu/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8822cs/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8852bs/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
H A Dsha256_i.h12 #define SHA256_BLOCK_SIZE 64 macro
17 u8 buf[SHA256_BLOCK_SIZE];
/OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8821cs/core/crypto/
H A Dsha256-internal.c159 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
162 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
163 in += SHA256_BLOCK_SIZE; in sha256_process()
164 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
166 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
171 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
174 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
208 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723ds/core/crypto/
H A Dsha256-internal.c159 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
162 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
163 in += SHA256_BLOCK_SIZE; in sha256_process()
164 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
166 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
171 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
174 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
208 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8723ds/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8189fs/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/external/rkwifibt/drivers/rtl8821cs/core/crypto/
H A Dsha256-internal.c158 if (md->curlen == 0 && inlen >= SHA256_BLOCK_SIZE) { in sha256_process()
161 md->length += SHA256_BLOCK_SIZE * 8; in sha256_process()
162 in += SHA256_BLOCK_SIZE; in sha256_process()
163 inlen -= SHA256_BLOCK_SIZE; in sha256_process()
165 n = MIN(inlen, (SHA256_BLOCK_SIZE - md->curlen)); in sha256_process()
170 if (md->curlen == SHA256_BLOCK_SIZE) { in sha256_process()
173 md->length += 8 * SHA256_BLOCK_SIZE; in sha256_process()
207 while (md->curlen < SHA256_BLOCK_SIZE) { in sha256_done()
/OK3568_Linux_fs/kernel/arch/mips/cavium-octeon/crypto/
H A Docteon-sha256.c107 partial = sctx->count % SHA256_BLOCK_SIZE; in __octeon_sha256_update()
112 if ((partial + len) >= SHA256_BLOCK_SIZE) { in __octeon_sha256_update()
116 done + SHA256_BLOCK_SIZE); in __octeon_sha256_update()
122 done += SHA256_BLOCK_SIZE; in __octeon_sha256_update()
124 } while (done + SHA256_BLOCK_SIZE <= len); in __octeon_sha256_update()
143 if ((sctx->count % SHA256_BLOCK_SIZE) + len < SHA256_BLOCK_SIZE) in octeon_sha256_update()
238 .cra_blocksize = SHA256_BLOCK_SIZE,
/OK3568_Linux_fs/kernel/drivers/crypto/nx/
H A Dnx-sha256.c68 u64 buf_len = (sctx->count % SHA256_BLOCK_SIZE); in nx_sha256_update()
76 total = (sctx->count % SHA256_BLOCK_SIZE) + len; in nx_sha256_update()
77 if (total < SHA256_BLOCK_SIZE) { in nx_sha256_update()
129 to_process = to_process & ~(SHA256_BLOCK_SIZE - 1); in nx_sha256_update()
163 } while (leftover >= SHA256_BLOCK_SIZE); in nx_sha256_update()
196 if (sctx->count >= SHA256_BLOCK_SIZE) { in nx_sha256_final()
209 len = sctx->count & (SHA256_BLOCK_SIZE - 1); in nx_sha256_final()
213 if (len != (sctx->count & (SHA256_BLOCK_SIZE - 1))) { in nx_sha256_final()
277 .cra_blocksize = SHA256_BLOCK_SIZE,
/OK3568_Linux_fs/kernel/arch/arm64/crypto/
H A Dsha256-glue.c77 .base.cra_blocksize = SHA256_BLOCK_SIZE,
111 chunk + sctx->count % SHA256_BLOCK_SIZE > SHA256_BLOCK_SIZE) in sha256_update_neon()
112 chunk = SHA256_BLOCK_SIZE - in sha256_update_neon()
113 sctx->count % SHA256_BLOCK_SIZE; in sha256_update_neon()
157 .base.cra_blocksize = SHA256_BLOCK_SIZE,
H A Dsha2-ce-glue.c46 src += (blocks - rem) * SHA256_BLOCK_SIZE; in __sha2_ce_transform()
83 bool finalize = !sctx->sst.count && !(len % SHA256_BLOCK_SIZE) && len; in sha256_ce_finup()
150 .cra_blocksize = SHA256_BLOCK_SIZE,
167 .cra_blocksize = SHA256_BLOCK_SIZE,
/OK3568_Linux_fs/kernel/arch/arm/crypto/
H A Dsha2-ce-glue.c36 (sctx->count % SHA256_BLOCK_SIZE) + len < SHA256_BLOCK_SIZE) in sha2_ce_update()
79 .cra_blocksize = SHA256_BLOCK_SIZE,
93 .cra_blocksize = SHA256_BLOCK_SIZE,
H A Dsha256_neon_glue.c33 (sctx->count % SHA256_BLOCK_SIZE) + len < SHA256_BLOCK_SIZE) in crypto_sha256_neon_update()
77 .cra_blocksize = SHA256_BLOCK_SIZE,
/OK3568_Linux_fs/external/security/rk_tee_user/v2/ta/crypt/include/
H A Dsha2_impl.h47 #define SHA256_BLOCK_SIZE (512 / 8) macro
48 #define SHA224_BLOCK_SIZE SHA256_BLOCK_SIZE
60 unsigned char block[2 * SHA256_BLOCK_SIZE];
/OK3568_Linux_fs/kernel/arch/x86/crypto/
H A Dsha256_ssse3_glue.c52 (sctx->count % SHA256_BLOCK_SIZE) + len < SHA256_BLOCK_SIZE) in _sha256_update()
112 .cra_blocksize = SHA256_BLOCK_SIZE,
177 .cra_blocksize = SHA256_BLOCK_SIZE,
253 .cra_blocksize = SHA256_BLOCK_SIZE,
328 .cra_blocksize = SHA256_BLOCK_SIZE,
/OK3568_Linux_fs/u-boot/drivers/mmc/
H A Drpmb.c43 #define SHA256_BLOCK_SIZE 64 macro
168 unsigned char k_ipad[SHA256_BLOCK_SIZE]; in rpmb_hmac()
169 unsigned char k_opad[SHA256_BLOCK_SIZE]; in rpmb_hmac()
187 for ( ; i < SHA256_BLOCK_SIZE; i++) { in rpmb_hmac()
191 sha256_update(&ctx, k_ipad, SHA256_BLOCK_SIZE); in rpmb_hmac()
199 sha256_update(&ctx, k_opad, SHA256_BLOCK_SIZE); in rpmb_hmac()
/OK3568_Linux_fs/kernel/drivers/crypto/
H A Dpadlock-sha.c154 leftover = ((state.count - 1) & (SHA256_BLOCK_SIZE - 1)) + 1; in padlock_sha256_finup()
155 space = SHA256_BLOCK_SIZE - leftover; in padlock_sha256_finup()
260 .cra_blocksize = SHA256_BLOCK_SIZE,
380 if ((partial + len) >= SHA256_BLOCK_SIZE) { in padlock_sha256_update_nano()
386 done + SHA256_BLOCK_SIZE); in padlock_sha256_update_nano()
391 done += SHA256_BLOCK_SIZE; in padlock_sha256_update_nano()
396 if (len - done >= SHA256_BLOCK_SIZE) { in padlock_sha256_update_nano()
487 .cra_blocksize = SHA256_BLOCK_SIZE,

123