Home
last modified time | relevance | path

Searched refs:dctx (Results 1 – 9 of 9) sorted by relevance

/arch/mips/crypto/
Dpoly1305-glue.c20 void poly1305_init_arch(struct poly1305_desc_ctx *dctx, const u8 key[POLY1305_KEY_SIZE]) in poly1305_init_arch() argument
22 poly1305_init_mips(&dctx->h, key); in poly1305_init_arch()
23 dctx->s[0] = get_unaligned_le32(key + 16); in poly1305_init_arch()
24 dctx->s[1] = get_unaligned_le32(key + 20); in poly1305_init_arch()
25 dctx->s[2] = get_unaligned_le32(key + 24); in poly1305_init_arch()
26 dctx->s[3] = get_unaligned_le32(key + 28); in poly1305_init_arch()
27 dctx->buflen = 0; in poly1305_init_arch()
33 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc); in mips_poly1305_init() local
35 dctx->buflen = 0; in mips_poly1305_init()
36 dctx->rset = 0; in mips_poly1305_init()
[all …]
/arch/arm64/crypto/
Dpoly1305-glue.c28 void poly1305_init_arch(struct poly1305_desc_ctx *dctx, const u8 key[POLY1305_KEY_SIZE]) in poly1305_init_arch() argument
30 poly1305_init_arm64(&dctx->h, key); in poly1305_init_arch()
31 dctx->s[0] = get_unaligned_le32(key + 16); in poly1305_init_arch()
32 dctx->s[1] = get_unaligned_le32(key + 20); in poly1305_init_arch()
33 dctx->s[2] = get_unaligned_le32(key + 24); in poly1305_init_arch()
34 dctx->s[3] = get_unaligned_le32(key + 28); in poly1305_init_arch()
35 dctx->buflen = 0; in poly1305_init_arch()
41 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc); in neon_poly1305_init() local
43 dctx->buflen = 0; in neon_poly1305_init()
44 dctx->rset = 0; in neon_poly1305_init()
[all …]
Dpolyval-ce-glue.c94 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_arm64_init() local
96 memset(dctx, 0, sizeof(*dctx)); in polyval_arm64_init()
104 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_arm64_update() local
110 if (dctx->bytes) { in polyval_arm64_update()
111 n = min(srclen, dctx->bytes); in polyval_arm64_update()
112 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - dctx->bytes; in polyval_arm64_update()
114 dctx->bytes -= n; in polyval_arm64_update()
120 if (!dctx->bytes) in polyval_arm64_update()
121 internal_polyval_mul(dctx->buffer, in polyval_arm64_update()
128 internal_polyval_update(tctx, src, nblocks, dctx->buffer); in polyval_arm64_update()
[all …]
/arch/arm/crypto/
Dpoly1305-glue.c32 void poly1305_init_arch(struct poly1305_desc_ctx *dctx, const u8 key[POLY1305_KEY_SIZE]) in poly1305_init_arch() argument
34 poly1305_init_arm(&dctx->h, key); in poly1305_init_arch()
35 dctx->s[0] = get_unaligned_le32(key + 16); in poly1305_init_arch()
36 dctx->s[1] = get_unaligned_le32(key + 20); in poly1305_init_arch()
37 dctx->s[2] = get_unaligned_le32(key + 24); in poly1305_init_arch()
38 dctx->s[3] = get_unaligned_le32(key + 28); in poly1305_init_arch()
39 dctx->buflen = 0; in poly1305_init_arch()
45 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc); in arm_poly1305_init() local
47 dctx->buflen = 0; in arm_poly1305_init()
48 dctx->rset = 0; in arm_poly1305_init()
[all …]
/arch/x86/crypto/
Dpoly1305_glue.c132 void poly1305_init_arch(struct poly1305_desc_ctx *dctx, const u8 key[POLY1305_KEY_SIZE]) in poly1305_init_arch() argument
134 poly1305_simd_init(&dctx->h, key); in poly1305_init_arch()
135 dctx->s[0] = get_unaligned_le32(&key[16]); in poly1305_init_arch()
136 dctx->s[1] = get_unaligned_le32(&key[20]); in poly1305_init_arch()
137 dctx->s[2] = get_unaligned_le32(&key[24]); in poly1305_init_arch()
138 dctx->s[3] = get_unaligned_le32(&key[28]); in poly1305_init_arch()
139 dctx->buflen = 0; in poly1305_init_arch()
140 dctx->sset = true; in poly1305_init_arch()
144 static unsigned int crypto_poly1305_setdctxkey(struct poly1305_desc_ctx *dctx, in crypto_poly1305_setdctxkey() argument
148 if (unlikely(!dctx->sset)) { in crypto_poly1305_setdctxkey()
[all …]
Dpolyval-clmulni_glue.c103 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_x86_init() local
105 memset(dctx, 0, sizeof(*dctx)); in polyval_x86_init()
113 struct polyval_desc_ctx *dctx = shash_desc_ctx(desc); in polyval_x86_update() local
119 if (dctx->bytes) { in polyval_x86_update()
120 n = min(srclen, dctx->bytes); in polyval_x86_update()
121 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - dctx->bytes; in polyval_x86_update()
123 dctx->bytes -= n; in polyval_x86_update()
129 if (!dctx->bytes) in polyval_x86_update()
130 internal_polyval_mul(dctx->buffer, in polyval_x86_update()
137 internal_polyval_update(tctx, src, nblocks, dctx->buffer); in polyval_x86_update()
[all …]
Dghash-clmulni-intel_glue.c47 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local
49 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
79 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
81 u8 *dst = dctx->buffer; in ghash_update()
84 if (dctx->bytes) { in ghash_update()
85 int n = min(srclen, dctx->bytes); in ghash_update()
86 u8 *pos = dst + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
88 dctx->bytes -= n; in ghash_update()
94 if (!dctx->bytes) in ghash_update()
104 dctx->bytes = GHASH_BLOCK_SIZE - srclen; in ghash_update()
[all …]
/arch/s390/crypto/
Dghash_s390.c32 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_init() local
35 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
36 memcpy(dctx->key, ctx->key, GHASH_BLOCK_SIZE); in ghash_init()
57 struct ghash_desc_ctx *dctx = shash_desc_ctx(desc); in ghash_update() local
59 u8 *buf = dctx->buffer; in ghash_update()
61 if (dctx->bytes) { in ghash_update()
62 u8 *pos = buf + (GHASH_BLOCK_SIZE - dctx->bytes); in ghash_update()
64 n = min(srclen, dctx->bytes); in ghash_update()
65 dctx->bytes -= n; in ghash_update()
71 if (!dctx->bytes) { in ghash_update()
[all …]
/arch/sparc/crypto/
Ddes_glue.c48 struct des_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des_set_key() local
59 des_sparc64_key_expand((const u32 *) key, &dctx->encrypt_expkey[0]); in des_set_key()
60 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &dctx->encrypt_expkey[0]); in des_set_key()
184 struct des3_ede_sparc64_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_set_key() local
200 memcpy(&dctx->encrypt_expkey[0], &k1[0], sizeof(k1)); in des3_ede_set_key()
201 encrypt_to_decrypt(&dctx->encrypt_expkey[DES_EXPKEY_WORDS / 2], &k2[0]); in des3_ede_set_key()
202 memcpy(&dctx->encrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key()
205 encrypt_to_decrypt(&dctx->decrypt_expkey[0], &k3[0]); in des3_ede_set_key()
206 memcpy(&dctx->decrypt_expkey[DES_EXPKEY_WORDS / 2], in des3_ede_set_key()
208 encrypt_to_decrypt(&dctx->decrypt_expkey[(DES_EXPKEY_WORDS / 2) * 2], in des3_ede_set_key()