Lines Matching refs:bs
59 unsigned int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_setkey() local
71 memset(consts, 0, bs); in crypto_cmac_digest_setkey()
74 switch (bs) { in crypto_cmac_digest_setkey()
113 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_cmac_digest_init() local
114 u8 *prev = PTR_ALIGN((void *)ctx->ctx, alignmask + 1) + bs; in crypto_cmac_digest_init()
117 memset(prev, 0, bs); in crypto_cmac_digest_init()
130 int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_update() local
132 u8 *prev = odds + bs; in crypto_cmac_digest_update()
135 if ((ctx->len + len) <= bs) { in crypto_cmac_digest_update()
142 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_cmac_digest_update()
143 len -= bs - ctx->len; in crypto_cmac_digest_update()
144 p += bs - ctx->len; in crypto_cmac_digest_update()
146 crypto_xor(prev, odds, bs); in crypto_cmac_digest_update()
153 while (len > bs) { in crypto_cmac_digest_update()
154 crypto_xor(prev, p, bs); in crypto_cmac_digest_update()
156 p += bs; in crypto_cmac_digest_update()
157 len -= bs; in crypto_cmac_digest_update()
176 int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_final() local
180 u8 *prev = odds + bs; in crypto_cmac_digest_final()
183 if (ctx->len != bs) { in crypto_cmac_digest_final()
190 rlen = bs - ctx->len - 1; in crypto_cmac_digest_final()
194 offset += bs; in crypto_cmac_digest_final()
197 crypto_xor(prev, odds, bs); in crypto_cmac_digest_final()
198 crypto_xor(prev, consts + offset, bs); in crypto_cmac_digest_final()