aboutsummaryrefslogtreecommitdiffstats
path: root/docs/primitives/symmetric-encryption.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/primitives/symmetric-encryption.rst')
-rw-r--r--docs/primitives/symmetric-encryption.rst19
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/primitives/symmetric-encryption.rst b/docs/primitives/symmetric-encryption.rst
index c4bbf0a5..7899e67d 100644
--- a/docs/primitives/symmetric-encryption.rst
+++ b/docs/primitives/symmetric-encryption.rst
@@ -77,6 +77,25 @@ Modes
reuse an ``initialization_vector`` with
a given ``key``.
+
+.. class:: cryptography.primitives.block.modes.CTR(nonce)
+
+ .. warning::
+
+ Counter mode is not recommended for use with block ciphers that have a
+ block size of less than 128-bits.
+
+ CTR (Counter) is a mode of operation for block ciphers. It is considered
+ cryptographically strong.
+
+ :param bytes nonce: Should be random bytes. It is critical to never reuse a
+ ``nonce`` with a given key. Any reuse of a nonce
+ with the same key compromises the security of every
+ message encrypted with that key. Must be the same
+ number of bytes as the ``block_size`` of the cipher
+ with a given key. The nonce does not need to be kept
+ secret and may be included alongside the ciphertext.
+
.. class:: cryptography.primitives.block.modes.OFB(initialization_vector)
OFB (Output Feedback) is a mode of operation for block ciphers. It