summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authortobyp <tobyp@tobyp.net>2021-02-28 20:57:50 +0100
committerGitHub <noreply@github.com>2021-02-28 13:57:50 -0600
commitf69f27b1dd20ad2d24f48053a72545527e808104 (patch)
tree0aa2016d468252871dca10e5fe3e37eb830bc4ea /docs
parent0cb83aeb71822cd30c75c7c5acda09c4e8160ca9 (diff)
downloadcryptography-f69f27b1dd20ad2d24f48053a72545527e808104.tar.gz
Add SM4 symmetric block cipher (#5834)
Co-authored-by: Tobias Peter <tobias.peter@infineon.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/symmetric-encryption.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
index 8551acb26..6e10d67fe 100644
--- a/docs/hazmat/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -196,6 +196,19 @@ Algorithms
:term:`bits` in length.
:type key: :term:`bytes-like`
+.. class:: SM4(key)
+
+ .. versionadded:: 35.0.0
+
+ SM4 is a block cipher developed by the Chinese Government and standardized
+ in the `GB/T 32907-2016`_. It is used in the Chinese WAPI
+ (Wired Authentication and Privacy Infrastructure) standard. (An English
+ description is available at `draft-ribose-cfrg-sm4-10`_.)
+
+ :param key: The secret key. This must be kept secret. ``128``
+ :term:`bits` in length.
+ :type key: :term:`bytes-like`
+
Weak ciphers
------------
@@ -815,3 +828,5 @@ Exceptions
.. _`International Data Encryption Algorithm`: https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm
.. _`OpenPGP`: https://www.openpgp.org/
.. _`disk encryption`: https://en.wikipedia.org/wiki/Disk_encryption_theory#XTS
+.. _`GB/T 32907-2016`: http://www.cnnic.cn/gcjsyj/qyjsyj/mmsfbz/sm4/201312/t20131204_43341.htm
+.. _`draft-ribose-cfrg-sm4-10`: https://tools.ietf.org/html/draft-ribose-cfrg-sm4-10