Lines Matching refs:bs
49 #define SHA2_CV_SIZE(bs) ((bs) >> 1) argument
50 #define SHA2_IMBL_SIZE(bs) ((bs) >> 3) argument
52 #define SHA2_IMBL_OFFSET(bs) (SHA2_CV_SIZE(bs)) argument
53 #define SHA2_KEY_OFFSET(bs) (SHA2_CV_SIZE(bs) + SHA2_IMBL_SIZE(bs)) argument
159 unsigned int bs = crypto_shash_blocksize(tfm); in s390_hmac_sha2_setkey() local
163 if (keylen > bs) in s390_hmac_sha2_setkey()
174 unsigned int bs = crypto_shash_blocksize(desc->tfm); in s390_hmac_sha2_init() local
176 memcpy(ctx->param + SHA2_KEY_OFFSET(bs), in s390_hmac_sha2_init()
177 tfm_ctx->key, bs); in s390_hmac_sha2_init()
205 unsigned int bs = crypto_shash_blocksize(desc->tfm); in s390_hmac_sha2_update() local
209 offset = ctx->buflen % bs; in s390_hmac_sha2_update()
211 if (offset + len < bs) in s390_hmac_sha2_update()
216 n = bs - offset; in s390_hmac_sha2_update()
219 _cpacf_kmac(&ctx->gr0.reg, ctx->param, ctx->buf, bs); in s390_hmac_sha2_update()
225 if (len >= bs) { in s390_hmac_sha2_update()
226 n = (len / bs) * bs; in s390_hmac_sha2_update()
243 unsigned int bs = crypto_shash_blocksize(desc->tfm); in s390_hmac_sha2_final() local
246 kmac_sha2_set_imbl(ctx->param, ctx->buflen, bs); in s390_hmac_sha2_final()
247 _cpacf_kmac(&ctx->gr0.reg, ctx->param, ctx->buf, ctx->buflen % bs); in s390_hmac_sha2_final()