Lines Matching refs:bs
54 unsigned int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_setkey() local
65 memset(consts, 0, bs); in crypto_cmac_digest_setkey()
68 switch (bs) { in crypto_cmac_digest_setkey()
106 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_cmac_digest_init() local
107 u8 *prev = &ctx->odds[bs]; in crypto_cmac_digest_init()
110 memset(prev, 0, bs); in crypto_cmac_digest_init()
122 int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_update() local
124 u8 *prev = odds + bs; in crypto_cmac_digest_update()
127 if ((ctx->len + len) <= bs) { in crypto_cmac_digest_update()
134 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_cmac_digest_update()
135 len -= bs - ctx->len; in crypto_cmac_digest_update()
136 p += bs - ctx->len; in crypto_cmac_digest_update()
138 crypto_xor(prev, odds, bs); in crypto_cmac_digest_update()
145 while (len > bs) { in crypto_cmac_digest_update()
146 crypto_xor(prev, p, bs); in crypto_cmac_digest_update()
148 p += bs; in crypto_cmac_digest_update()
149 len -= bs; in crypto_cmac_digest_update()
167 int bs = crypto_shash_blocksize(parent); in crypto_cmac_digest_final() local
169 u8 *prev = odds + bs; in crypto_cmac_digest_final()
172 if (ctx->len != bs) { in crypto_cmac_digest_final()
179 rlen = bs - ctx->len - 1; in crypto_cmac_digest_final()
183 offset += bs; in crypto_cmac_digest_final()
186 crypto_xor(prev, odds, bs); in crypto_cmac_digest_final()
187 crypto_xor(prev, (const u8 *)tctx->consts + offset, bs); in crypto_cmac_digest_final()