Skip to contentSkip to conversation

fscrypt: add additional documentation for SM4 support

PATCH In review Eric Biggers 2 participants 2 messages Dec 1, 2022 – Dec 2, 2022

Subsystems (2)
lore
Share & tools
lore

Eric Biggers

author maintainer
#0 lore raw

PATCH 1/1 fscrypt: add additional documentation for SM4 support

From: Eric Biggers <[email protected]>

Add a paragraph about SM4, like there is for the other modes.

---
 Documentation/filesystems/fscrypt.rst | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/filesystems/fscrypt.rst +6 -0
index c0784ec055530..ef183387da208 100644
@@ -370,6 +370,12 @@ CONFIG_CRYPTO_HCTR2 must be enabled.  Also, fast implementations of XCTR and
 POLYVAL should be enabled, e.g. CRYPTO_POLYVAL_ARM64_CE and
 CRYPTO_AES_ARM64_CE_BLK for ARM64.
 
+SM4 is a Chinese block cipher that is an alternative to AES.  It has
+not seen as much security review as AES, and it only has a 128-bit key
+size.  It may be useful in cases where its use is mandated.
+Otherwise, it should not be used.  For SM4 support to be available, it
+also needs to be enabled in the kernel crypto API.
+
 New encryption modes can be added relatively easily, without changes
 to individual filesystems.  However, authenticated encryption (AE)
 modes are not currently supported because of the difficulty of dealing
Signature · 1 line
2.38.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Eric,

Quoted 14 lines · Eric Biggers

From: Eric Biggers <[email protected]>

Add a paragraph about SM4, like there is for the other modes.

---
  Documentation/filesystems/fscrypt.rst | 6 ++++++
  1 file changed, 6 insertions(+)
Documentation/filesystems/fscrypt.rst +0 -0
index c0784ec055530..ef183387da208 100644

Documentation/filesystems/fscrypt.rst CONFIG_CRYPTO_HCTR2 must be enabled. Also, fast implementations of XCTR and · line 378

Quoted 9 lines
Documentation/filesystems/fscrypt.rst +6 -0
@@ -370,6 +370,12 @@ CONFIG_CRYPTO_HCTR2 must be enabled.  Also, fast implementations of XCTR and
  POLYVAL should be enabled, e.g. CRYPTO_POLYVAL_ARM64_CE and
  CRYPTO_AES_ARM64_CE_BLK for ARM64.
 
+SM4 is a Chinese block cipher that is an alternative to AES.  It has
+not seen as much security review as AES, and it only has a 128-bit key
+size.  It may be useful in cases where its use is mandated.
+Otherwise, it should not be used.  For SM4 support to be available, it
+also needs to be enabled in the kernel crypto API.
+

Looks good to me, this description is appropriate.

Thanks,
Tianjia

Quoted 3 lines
Documentation/filesystems/fscrypt.rst +0 -0
  New encryption modes can be added relatively easily, without changes
  to individual filesystems.  However, authenticated encryption (AE)
  modes are not currently supported because of the difficulty of dealing