anolis: blk-crypto: Add support for SM4-XTS blk crypto mode
ANBZ: #3240 SM4 is a symmetric algorithm widely used in China, and SM4-XTS is also used to encrypt length-preserving data, this patch enables the use of SM4-XTS algorithm in block inline encryption, and provides support for fscrypt. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com> Link: https://gitee.com/anolis/cloud-kernel/pulls/895
This commit is contained in:
parent
b3c1eb7288
commit
731ea68c98
|
@ -33,6 +33,11 @@ const struct blk_crypto_mode blk_crypto_modes[] = {
|
|||
.keysize = 32,
|
||||
.ivsize = 32,
|
||||
},
|
||||
[BLK_ENCRYPTION_MODE_SM4_XTS] = {
|
||||
.cipher_str = "xts(sm4)",
|
||||
.keysize = 32,
|
||||
.ivsize = 16,
|
||||
},
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -13,6 +13,7 @@ enum blk_crypto_mode_num {
|
|||
BLK_ENCRYPTION_MODE_AES_256_XTS,
|
||||
BLK_ENCRYPTION_MODE_AES_128_CBC_ESSIV,
|
||||
BLK_ENCRYPTION_MODE_ADIANTUM,
|
||||
BLK_ENCRYPTION_MODE_SM4_XTS,
|
||||
BLK_ENCRYPTION_MODE_MAX,
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue