/crypto/ |
D | wp512.c | 786 u64 state[8]; /* the cipher state */ in wp512_process_buffer() local 793 state[0] = block[0] ^ (K[0] = wctx->hash[0]); in wp512_process_buffer() 794 state[1] = block[1] ^ (K[1] = wctx->hash[1]); in wp512_process_buffer() 795 state[2] = block[2] ^ (K[2] = wctx->hash[2]); in wp512_process_buffer() 796 state[3] = block[3] ^ (K[3] = wctx->hash[3]); in wp512_process_buffer() 797 state[4] = block[4] ^ (K[4] = wctx->hash[4]); in wp512_process_buffer() 798 state[5] = block[5] ^ (K[5] = wctx->hash[5]); in wp512_process_buffer() 799 state[6] = block[6] ^ (K[6] = wctx->hash[6]); in wp512_process_buffer() 800 state[7] = block[7] ^ (K[7] = wctx->hash[7]); in wp512_process_buffer() 886 L[0] = C0[(int)(state[0] >> 56) ] ^ in wp512_process_buffer() [all …]
|
D | aegis128-core.c | 42 void (*crypt_chunk)(struct aegis_state *state, u8 *dst, 69 void crypto_aegis128_update_simd(struct aegis_state *state, const void *msg); 70 void crypto_aegis128_encrypt_chunk_simd(struct aegis_state *state, u8 *dst, 72 void crypto_aegis128_decrypt_chunk_simd(struct aegis_state *state, u8 *dst, 75 static void crypto_aegis128_update(struct aegis_state *state) in crypto_aegis128_update() argument 80 tmp = state->blocks[AEGIS128_STATE_BLOCKS - 1]; in crypto_aegis128_update() 82 crypto_aegis_aesenc(&state->blocks[i], &state->blocks[i - 1], in crypto_aegis128_update() 83 &state->blocks[i]); in crypto_aegis128_update() 84 crypto_aegis_aesenc(&state->blocks[0], &tmp, &state->blocks[0]); in crypto_aegis128_update() 87 static void crypto_aegis128_update_a(struct aegis_state *state, in crypto_aegis128_update_a() argument [all …]
|
D | nhpoly1305.c | 75 static void process_nh_hash_value(struct nhpoly1305_state *state, in process_nh_hash_value() argument 80 poly1305_core_blocks(&state->poly_state, &key->poly_key, state->nh_hash, in process_nh_hash_value() 91 static void nhpoly1305_units(struct nhpoly1305_state *state, in nhpoly1305_units() argument 98 if (state->nh_remaining == 0) { in nhpoly1305_units() 101 nh_fn(key->nh_key, src, bytes, state->nh_hash); in nhpoly1305_units() 102 state->nh_remaining = NH_MESSAGE_BYTES - bytes; in nhpoly1305_units() 109 pos = NH_MESSAGE_BYTES - state->nh_remaining; in nhpoly1305_units() 110 bytes = min(srclen, state->nh_remaining); in nhpoly1305_units() 113 le64_add_cpu(&state->nh_hash[i], in nhpoly1305_units() 115 state->nh_remaining -= bytes; in nhpoly1305_units() [all …]
|
D | anubis.c | 580 u32 state[4]; in anubis_crypt() local 588 state[i] = be32_to_cpu(src[i]) ^ roundKey[0][i]; in anubis_crypt() 596 T0[(state[0] >> 24) ] ^ in anubis_crypt() 597 T1[(state[1] >> 24) ] ^ in anubis_crypt() 598 T2[(state[2] >> 24) ] ^ in anubis_crypt() 599 T3[(state[3] >> 24) ] ^ in anubis_crypt() 602 T0[(state[0] >> 16) & 0xff] ^ in anubis_crypt() 603 T1[(state[1] >> 16) & 0xff] ^ in anubis_crypt() 604 T2[(state[2] >> 16) & 0xff] ^ in anubis_crypt() 605 T3[(state[3] >> 16) & 0xff] ^ in anubis_crypt() [all …]
|
D | chacha_generic.c | 15 static void chacha_docrypt(u32 *state, u8 *dst, const u8 *src, in chacha_docrypt() argument 22 chacha_block(state, stream, nrounds); in chacha_docrypt() 29 chacha_block(state, stream, nrounds); in chacha_docrypt() 38 u32 state[16]; in chacha_stream_xor() local 43 crypto_chacha_init(state, ctx, iv); in chacha_stream_xor() 51 chacha_docrypt(state, walk.dst.virt.addr, walk.src.virt.addr, in chacha_stream_xor() 59 void crypto_chacha_init(u32 *state, const struct chacha_ctx *ctx, const u8 *iv) in crypto_chacha_init() argument 61 state[0] = 0x61707865; /* "expa" */ in crypto_chacha_init() 62 state[1] = 0x3320646e; /* "nd 3" */ in crypto_chacha_init() 63 state[2] = 0x79622d32; /* "2-by" */ in crypto_chacha_init() [all …]
|
D | khazad.c | 808 u64 state; in khazad_crypt() local 810 state = be64_to_cpu(*src) ^ roundKey[0]; in khazad_crypt() 813 state = T0[(int)(state >> 56) ] ^ in khazad_crypt() 814 T1[(int)(state >> 48) & 0xff] ^ in khazad_crypt() 815 T2[(int)(state >> 40) & 0xff] ^ in khazad_crypt() 816 T3[(int)(state >> 32) & 0xff] ^ in khazad_crypt() 817 T4[(int)(state >> 24) & 0xff] ^ in khazad_crypt() 818 T5[(int)(state >> 16) & 0xff] ^ in khazad_crypt() 819 T6[(int)(state >> 8) & 0xff] ^ in khazad_crypt() 820 T7[(int)(state ) & 0xff] ^ in khazad_crypt() [all …]
|
D | aegis128-neon-inner.c | 31 static struct aegis128_state aegis128_load_state_neon(const void *state) in aegis128_load_state_neon() argument 34 vld1q_u8(state), in aegis128_load_state_neon() 35 vld1q_u8(state + 16), in aegis128_load_state_neon() 36 vld1q_u8(state + 32), in aegis128_load_state_neon() 37 vld1q_u8(state + 48), in aegis128_load_state_neon() 38 vld1q_u8(state + 64) in aegis128_load_state_neon() 42 static void aegis128_save_state_neon(struct aegis128_state st, void *state) in aegis128_save_state_neon() argument 44 vst1q_u8(state, st.v[0]); in aegis128_save_state_neon() 45 vst1q_u8(state + 16, st.v[1]); in aegis128_save_state_neon() 46 vst1q_u8(state + 32, st.v[2]); in aegis128_save_state_neon() [all …]
|
D | aegis128-neon.c | 11 void crypto_aegis128_update_neon(void *state, const void *msg); 12 void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src, 14 void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src, 28 void crypto_aegis128_update_simd(union aegis_block *state, const void *msg) in crypto_aegis128_update_simd() argument 31 crypto_aegis128_update_neon(state, msg); in crypto_aegis128_update_simd() 35 void crypto_aegis128_encrypt_chunk_simd(union aegis_block *state, u8 *dst, in crypto_aegis128_encrypt_chunk_simd() argument 39 crypto_aegis128_encrypt_chunk_neon(state, dst, src, size); in crypto_aegis128_encrypt_chunk_simd() 43 void crypto_aegis128_decrypt_chunk_simd(union aegis_block *state, u8 *dst, in crypto_aegis128_decrypt_chunk_simd() argument 47 crypto_aegis128_decrypt_chunk_neon(state, dst, src, size); in crypto_aegis128_decrypt_chunk_simd()
|
D | sha512_generic.c | 99 sha512_transform(u64 *state, const u8 *input) in sha512_transform() argument 107 a=state[0]; b=state[1]; c=state[2]; d=state[3]; in sha512_transform() 108 e=state[4]; f=state[5]; g=state[6]; h=state[7]; in sha512_transform() 144 state[0] += a; state[1] += b; state[2] += c; state[3] += d; in sha512_transform() 145 state[4] += e; state[5] += f; state[6] += g; state[7] += h; in sha512_transform() 155 sha512_transform(sst->state, src); in sha512_generic_block_fn()
|
D | salsa20_generic.c | 35 static void salsa20_block(u32 *state, __le32 *stream) in salsa20_block() argument 40 memcpy(x, state, sizeof(x)); in salsa20_block() 78 stream[i] = cpu_to_le32(x[i] + state[i]); in salsa20_block() 80 if (++state[8] == 0) in salsa20_block() 81 state[9]++; in salsa20_block() 84 static void salsa20_docrypt(u32 *state, u8 *dst, const u8 *src, in salsa20_docrypt() argument 90 salsa20_block(state, stream); in salsa20_docrypt() 98 salsa20_block(state, stream); in salsa20_docrypt() 103 static void salsa20_init(u32 *state, const struct salsa20_ctx *ctx, in salsa20_init() argument 106 memcpy(state, ctx->initial_state, sizeof(ctx->initial_state)); in salsa20_init() [all …]
|
D | poly1305_generic.c | 90 static void poly1305_blocks_internal(struct poly1305_state *state, in poly1305_blocks_internal() argument 114 h0 = state->h[0]; in poly1305_blocks_internal() 115 h1 = state->h[1]; in poly1305_blocks_internal() 116 h2 = state->h[2]; in poly1305_blocks_internal() 117 h3 = state->h[3]; in poly1305_blocks_internal() 118 h4 = state->h[4]; in poly1305_blocks_internal() 151 state->h[0] = h0; in poly1305_blocks_internal() 152 state->h[1] = h1; in poly1305_blocks_internal() 153 state->h[2] = h2; in poly1305_blocks_internal() 154 state->h[3] = h3; in poly1305_blocks_internal() [all …]
|
D | rmd256.c | 22 u32 state[8]; member 45 static void rmd256_transform(u32 *state, const __le32 *in) in rmd256_transform() argument 50 aa = state[0]; in rmd256_transform() 51 bb = state[1]; in rmd256_transform() 52 cc = state[2]; in rmd256_transform() 53 dd = state[3]; in rmd256_transform() 56 aaa = state[4]; in rmd256_transform() 57 bbb = state[5]; in rmd256_transform() 58 ccc = state[6]; in rmd256_transform() 59 ddd = state[7]; in rmd256_transform() [all …]
|
D | rmd320.c | 22 u32 state[10]; member 49 static void rmd320_transform(u32 *state, const __le32 *in) in rmd320_transform() argument 54 aa = state[0]; in rmd320_transform() 55 bb = state[1]; in rmd320_transform() 56 cc = state[2]; in rmd320_transform() 57 dd = state[3]; in rmd320_transform() 58 ee = state[4]; in rmd320_transform() 61 aaa = state[5]; in rmd320_transform() 62 bbb = state[6]; in rmd320_transform() 63 ccc = state[7]; in rmd320_transform() [all …]
|
D | rmd128.c | 22 u32 state[4]; member 45 static void rmd128_transform(u32 *state, const __le32 *in) in rmd128_transform() argument 50 aa = state[0]; in rmd128_transform() 51 bb = state[1]; in rmd128_transform() 52 cc = state[2]; in rmd128_transform() 53 dd = state[3]; in rmd128_transform() 56 aaa = state[0]; in rmd128_transform() 57 bbb = state[1]; in rmd128_transform() 58 ccc = state[2]; in rmd128_transform() 59 ddd = state[3]; in rmd128_transform() [all …]
|
D | rmd160.c | 22 u32 state[5]; member 49 static void rmd160_transform(u32 *state, const __le32 *in) in rmd160_transform() argument 54 aa = state[0]; in rmd160_transform() 55 bb = state[1]; in rmd160_transform() 56 cc = state[2]; in rmd160_transform() 57 dd = state[3]; in rmd160_transform() 58 ee = state[4]; in rmd160_transform() 61 aaa = state[0]; in rmd160_transform() 62 bbb = state[1]; in rmd160_transform() 63 ccc = state[2]; in rmd160_transform() [all …]
|
D | adiantum.c | 239 struct poly1305_state state; in adiantum_hash_header() local 241 poly1305_core_init(&state); in adiantum_hash_header() 244 poly1305_core_blocks(&state, &tctx->header_hash_key, in adiantum_hash_header() 248 poly1305_core_blocks(&state, &tctx->header_hash_key, req->iv, in adiantum_hash_header() 251 poly1305_core_emit(&state, &rctx->header_hash); in adiantum_hash_header()
|
D | sha1_generic.c | 37 sha_transform(sst->state, src, temp); in sha1_generic_block_fn()
|
D | algif_hash.c | 237 char state[HASH_MAX_STATESIZE]; in hash_accept() local 246 err = more ? crypto_ahash_export(req, state) : 0; in hash_accept() 264 err = crypto_ahash_import(&ctx2->req, state); in hash_accept()
|
D | af_alg.c | 160 if (sock->state == SS_CONNECTED) in alg_bind() 250 if (sock->state == SS_CONNECTED) in alg_setsockopt() 258 if (sock->state == SS_CONNECTED) in alg_setsockopt() 312 newsock->state = SS_CONNECTED; in af_alg_accept()
|
D | sm3_generic.c | 130 sm3_compress(w, wt, sst->state); in sm3_transform()
|