Lines Matching refs:dctx

39 	struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc);
41 poly1305_core_init(&dctx->h);
42 dctx->buflen = 0;
43 dctx->rset = 0;
44 dctx->sset = false;
49 static unsigned int crypto_poly1305_setdctxkey(struct poly1305_desc_ctx *dctx,
54 if (unlikely(!dctx->sset)) {
55 if (!dctx->rset && len >= POLY1305_BLOCK_SIZE) {
56 struct poly1305_core_key *key = &dctx->core_r;
63 dctx->rset = 1;
66 dctx->s[0] = get_unaligned_le32(&inp[0]);
67 dctx->s[1] = get_unaligned_le32(&inp[4]);
68 dctx->s[2] = get_unaligned_le32(&inp[8]);
69 dctx->s[3] = get_unaligned_le32(&inp[12]);
71 dctx->sset = true;
80 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc);
83 if (unlikely(dctx->buflen)) {
84 bytes = min(srclen, POLY1305_BLOCK_SIZE - dctx->buflen);
85 memcpy(dctx->buf + dctx->buflen, src, bytes);
88 dctx->buflen += bytes;
90 if (dctx->buflen == POLY1305_BLOCK_SIZE) {
91 if (likely(!crypto_poly1305_setdctxkey(dctx, dctx->buf,
94 poly1305_64s(&dctx->h, dctx->buf,
98 dctx->buflen = 0;
104 used = crypto_poly1305_setdctxkey(dctx, src, bytes);
111 poly1305_p10le_4blocks(&dctx->h, src, srclen);
118 poly1305_64s(&dctx->h, src, POLY1305_BLOCK_SIZE, 1);
126 dctx->buflen = srclen;
127 memcpy(dctx->buf, src, srclen);
135 struct poly1305_desc_ctx *dctx = shash_desc_ctx(desc);
137 if (unlikely(!dctx->sset))
140 if ((dctx->buflen)) {
141 dctx->buf[dctx->buflen++] = 1;
142 memset(dctx->buf + dctx->buflen, 0,
143 POLY1305_BLOCK_SIZE - dctx->buflen);
145 poly1305_64s(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 0);
147 dctx->buflen = 0;
150 poly1305_emit_64(&dctx->h, &dctx->s, dst);