Lines Matching refs:bs
65 int bs = crypto_shash_blocksize(parent); in crypto_xcbc_digest_setkey() local
68 u8 key1[bs]; in crypto_xcbc_digest_setkey()
73 crypto_cipher_encrypt_one(ctx->child, consts, (u8 *)ks + bs); in crypto_xcbc_digest_setkey()
74 crypto_cipher_encrypt_one(ctx->child, consts + bs, (u8 *)ks + bs * 2); in crypto_xcbc_digest_setkey()
77 return crypto_cipher_setkey(ctx->child, key1, bs); in crypto_xcbc_digest_setkey()
85 int bs = crypto_shash_blocksize(pdesc->tfm); in crypto_xcbc_digest_init() local
86 u8 *prev = PTR_ALIGN(&ctx->ctx[0], alignmask + 1) + bs; in crypto_xcbc_digest_init()
89 memset(prev, 0, bs); in crypto_xcbc_digest_init()
102 int bs = crypto_shash_blocksize(parent); in crypto_xcbc_digest_update() local
104 u8 *prev = odds + bs; in crypto_xcbc_digest_update()
107 if ((ctx->len + len) <= bs) { in crypto_xcbc_digest_update()
114 memcpy(odds + ctx->len, p, bs - ctx->len); in crypto_xcbc_digest_update()
115 len -= bs - ctx->len; in crypto_xcbc_digest_update()
116 p += bs - ctx->len; in crypto_xcbc_digest_update()
118 crypto_xor(prev, odds, bs); in crypto_xcbc_digest_update()
125 while (len > bs) { in crypto_xcbc_digest_update()
126 crypto_xor(prev, p, bs); in crypto_xcbc_digest_update()
128 p += bs; in crypto_xcbc_digest_update()
129 len -= bs; in crypto_xcbc_digest_update()
148 int bs = crypto_shash_blocksize(parent); in crypto_xcbc_digest_final() local
151 u8 *prev = odds + bs; in crypto_xcbc_digest_final()
154 if (ctx->len != bs) { in crypto_xcbc_digest_final()
161 rlen = bs - ctx->len -1; in crypto_xcbc_digest_final()
165 offset += bs; in crypto_xcbc_digest_final()
168 crypto_xor(prev, odds, bs); in crypto_xcbc_digest_final()
169 crypto_xor(prev, consts + offset, bs); in crypto_xcbc_digest_final()