Lines Matching refs:consts
68 u8 __aligned(8) consts[];
632 be128 *consts = (be128 *)ctx->consts; in sm4_cmac_setkey() local
638 memset(consts, 0, SM4_BLOCK_SIZE); in sm4_cmac_setkey()
646 sm4_ce_crypt_block(ctx->key.rkey_enc, (u8 *)consts, (const u8 *)consts); in sm4_cmac_setkey()
651 a = be64_to_cpu(consts[0].a); in sm4_cmac_setkey()
652 b = be64_to_cpu(consts[0].b); in sm4_cmac_setkey()
653 consts[0].a = cpu_to_be64((a << 1) | (b >> 63)); in sm4_cmac_setkey()
654 consts[0].b = cpu_to_be64((b << 1) ^ ((a >> 63) ? 0x87 : 0)); in sm4_cmac_setkey()
656 a = be64_to_cpu(consts[0].a); in sm4_cmac_setkey()
657 b = be64_to_cpu(consts[0].b); in sm4_cmac_setkey()
658 consts[1].a = cpu_to_be64((a << 1) | (b >> 63)); in sm4_cmac_setkey()
659 consts[1].b = cpu_to_be64((b << 1) ^ ((a >> 63) ? 0x87 : 0)); in sm4_cmac_setkey()
684 sm4_ce_crypt(ctx->key.rkey_enc, ctx->consts, ks[1], 2); in sm4_xcbc_setkey()
759 const u8 *consts = tctx->consts; in sm4_cmac_final() local
763 consts += SM4_BLOCK_SIZE; in sm4_cmac_final()
767 sm4_ce_mac_update(tctx->key.rkey_enc, ctx->digest, consts, 1, in sm4_cmac_final()